Package ch.sahits.game.graphic.image.model

Examples of ch.sahits.game.graphic.image.model.NamedPolygon.addPoint()


      // close
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      gv = opPainter.createGlyphVector(g2d, "X", 18);
      xPadding = imageUtils.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
      g2d.drawGlyphVector(gv, xPadding, y); // centeralign
View Full Code Here


      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      gv = opPainter.createGlyphVector(g2d, "X", 18);
      xPadding = imageUtils.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
      g2d.drawGlyphVector(gv, xPadding, y); // centeralign

View Full Code Here

      int footerWidth = bg.getWidth()-getInset().left-getInset().right-2*30;
      x += 3*footerWidth/4;
      // close
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      NamedPolygon polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
View Full Code Here

      x += 3*footerWidth/4;
      // close
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      NamedPolygon polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
      gv = opPainter.createGlyphVector(g2d, "X", 18);
View Full Code Here

      // close
      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      NamedPolygon polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
      gv = opPainter.createGlyphVector(g2d, "X", 18);
      int xPadding = imageUtils.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
View Full Code Here

      g2d.drawImage(waxSeal, x,y-(int)(positions.lineHeight*0.8), null);
      NamedPolygon polygon = new NamedPolygon("Close");
      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 CloseAction(this));
      g2d.setColor(new Color(0xEA,0xC1,0x17)); // Gold
      gv = opPainter.createGlyphVector(g2d, "X", 18);
      int xPadding = imageUtils.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
      g2d.drawGlyphVector(gv, xPadding, y); // centeralign
View Full Code Here

    final Rectangle bounds = getBounds();
    final Insets insets = getInsets();
    final int x =bounds.x+bounds.width-scrollDown.getWidth()-insets.right;
    int y = bounds.y+insets.top;
    NamedPolygon poly = new NamedPolygon("scrollUp");
    poly.addPoint(x, y);
    poly.addPoint(x+scrollUp.getWidth(), y);
    poly.addPoint(x+scrollUp.getWidth(), y+scrollUp.getHeight());
    poly.addPoint(x, y+scrollUp.getHeight());
    polygons.add(poly, new ScrollUpAction());
   
View Full Code Here

    final Insets insets = getInsets();
    final int x =bounds.x+bounds.width-scrollDown.getWidth()-insets.right;
    int y = bounds.y+insets.top;
    NamedPolygon poly = new NamedPolygon("scrollUp");
    poly.addPoint(x, y);
    poly.addPoint(x+scrollUp.getWidth(), y);
    poly.addPoint(x+scrollUp.getWidth(), y+scrollUp.getHeight());
    poly.addPoint(x, y+scrollUp.getHeight());
    polygons.add(poly, new ScrollUpAction());
   
    y = getBounds().y+bounds.height-insets.bottom-scrollDown.getHeight();
View Full Code Here

    final int x =bounds.x+bounds.width-scrollDown.getWidth()-insets.right;
    int y = bounds.y+insets.top;
    NamedPolygon poly = new NamedPolygon("scrollUp");
    poly.addPoint(x, y);
    poly.addPoint(x+scrollUp.getWidth(), y);
    poly.addPoint(x+scrollUp.getWidth(), y+scrollUp.getHeight());
    poly.addPoint(x, y+scrollUp.getHeight());
    polygons.add(poly, new ScrollUpAction());
   
    y = getBounds().y+bounds.height-insets.bottom-scrollDown.getHeight();
    poly = new NamedPolygon("scrollDown");
View Full Code Here

    int y = bounds.y+insets.top;
    NamedPolygon poly = new NamedPolygon("scrollUp");
    poly.addPoint(x, y);
    poly.addPoint(x+scrollUp.getWidth(), y);
    poly.addPoint(x+scrollUp.getWidth(), y+scrollUp.getHeight());
    poly.addPoint(x, y+scrollUp.getHeight());
    polygons.add(poly, new ScrollUpAction());
   
    y = getBounds().y+bounds.height-insets.bottom-scrollDown.getHeight();
    poly = new NamedPolygon("scrollDown");
    poly.addPoint(x, y);
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.