Package ch.sahits.game.graphic.display.util

Examples of ch.sahits.game.graphic.display.util.NamedPolygon.addPoint()


       
        // Buy button
        g2d.drawImage(waxSeal, xBuy,y-(int)(positions.lineHeight*0.8), null);
        NamedPolygon polygon = new NamedPolygon(ware.name()+"Buy");
        // The positions of the polygons must be global
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new City2ShipAction(ware));
       
View Full Code Here


        // Buy button
        g2d.drawImage(waxSeal, xBuy,y-(int)(positions.lineHeight*0.8), null);
        NamedPolygon polygon = new NamedPolygon(ware.name()+"Buy");
        // The positions of the polygons must be global
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new City2ShipAction(ware));
       
        // Sell button
View Full Code Here

        g2d.drawImage(waxSeal, xBuy,y-(int)(positions.lineHeight*0.8), null);
        NamedPolygon polygon = new NamedPolygon(ware.name()+"Buy");
        // The positions of the polygons must be global
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new City2ShipAction(ware));
       
        // Sell button
        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
View Full Code Here

        NamedPolygon polygon = new NamedPolygon(ware.name()+"Buy");
        // The positions of the polygons must be global
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xBuy+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xBuy, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new City2ShipAction(ware));
       
        // Sell button
        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
        polygon = new NamedPolygon(ware.name()+"Sell");
View Full Code Here

        polygons.add(polygon, new City2ShipAction(ware));
       
        // Sell button
        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
        polygon = new NamedPolygon(ware.name()+"Sell");
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new Ship2CityAction(ware));
      }
View Full Code Here

       
        // Sell button
        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
        polygon = new NamedPolygon(ware.name()+"Sell");
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new Ship2CityAction(ware));
      }
      // Footer buttons
View Full Code Here

        // Sell button
        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
        polygon = new NamedPolygon(ware.name()+"Sell");
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new Ship2CityAction(ware));
      }
      // Footer buttons
      y = bg.getHeight()-getInset().bottom-positions.lineHeight;
View Full Code Here

        g2d.drawImage(waxSeal, xSell,y-(int)(positions.lineHeight*0.8), null);
        polygon = new NamedPolygon(ware.name()+"Sell");
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
        polygon.addPoint(positions.xSell+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygon.addPoint(positions.xSell, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
        polygons.add(polygon, new Ship2CityAction(ware));
      }
      // Footer buttons
      y = bg.getHeight()-getInset().bottom-positions.lineHeight;
      x = getInset().left+30;
View Full Code Here

      // 1 item
      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
      NamedPolygon polygon;
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      polygon = new NamedPolygon("One");
      polygon.addPoint(topLeft.x+x, topLeft.y+y-(int)(positions.lineHeight*0.8));
      polygon.addPoint(topLeft.x+x+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
      polygon.addPoint(topLeft.x+x+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
      polygon.addPoint(topLeft.x+x, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
      footerPolygons.add(polygon, new TransferAmountChangeAction(ETransferAmount.ONE));
      gv = OpenPatricianPainter.createGlyphVector(g2d, "1", 18);
View Full Code Here

      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
      NamedPolygon polygon;
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      polygon = new NamedPolygon("One");
      polygon.addPoint(topLeft.x+x, topLeft.y+y-(int)(positions.lineHeight*0.8));
      polygon.addPoint(topLeft.x+x+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8));
      polygon.addPoint(topLeft.x+x+waxSeal.getWidth(), topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
      polygon.addPoint(topLeft.x+x, topLeft.y+y-(int)(positions.lineHeight*0.8)+waxSeal.getHeight());
      footerPolygons.add(polygon, new TransferAmountChangeAction(ETransferAmount.ONE));
      gv = OpenPatricianPainter.createGlyphVector(g2d, "1", 18);
      int xPadding = ImageUtil.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.