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

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


      g2d.drawGlyphVector(gv, xPadding, y); // centeralign
      x += footerWidth/4;
      // 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 = OpenPatricianPainter.createGlyphVector(g2d, "X", 18);
View Full Code Here


      x += footerWidth/4;
      // 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 = OpenPatricianPainter.createGlyphVector(g2d, "X", 18);
      xPadding = ImageUtil.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
View Full Code Here

      // 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 = OpenPatricianPainter.createGlyphVector(g2d, "X", 18);
      xPadding = ImageUtil.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 = OpenPatricianPainter.createGlyphVector(g2d, "X", 18);
      xPadding = ImageUtil.computeCenterAlignX(x, waxSeal.getWidth(), (int)gv.getVisualBounds().getWidth());
      g2d.drawGlyphVector(gv, xPadding, y); // centeralign

View Full Code Here

   */
  private void initPortPolygons(double scale,Rectangle bounds) {
    // TODO implement PolygonLoader
    OffsetCalculator offsetter = new OffsetCalculator(getBounds().x+bounds.x, getBounds().y+bounds.y); // top left corner of this view plus any black borders
    NamedPolygon poly = new NamedPolygon(polyNames[0]);
    poly.addPoint(offsetter.computeXOffset(508, scale), offsetter.computeYOffset(678, scale));
    poly.addPoint(offsetter.computeXOffset(574, scale), offsetter.computeYOffset(520, scale));
    poly.addPoint(offsetter.computeXOffset(534, scale), offsetter.computeYOffset(546, scale));
    poly.addPoint(offsetter.computeXOffset(736, scale), offsetter.computeYOffset(586, scale));
    poly.addPoint(offsetter.computeXOffset(702, scale), offsetter.computeYOffset(672, scale));
    poly.addPoint(offsetter.computeXOffset(786, scale), offsetter.computeYOffset(758, scale));
View Full Code Here

  private void initPortPolygons(double scale,Rectangle bounds) {
    // TODO implement PolygonLoader
    OffsetCalculator offsetter = new OffsetCalculator(getBounds().x+bounds.x, getBounds().y+bounds.y); // top left corner of this view plus any black borders
    NamedPolygon poly = new NamedPolygon(polyNames[0]);
    poly.addPoint(offsetter.computeXOffset(508, scale), offsetter.computeYOffset(678, scale));
    poly.addPoint(offsetter.computeXOffset(574, scale), offsetter.computeYOffset(520, scale));
    poly.addPoint(offsetter.computeXOffset(534, scale), offsetter.computeYOffset(546, scale));
    poly.addPoint(offsetter.computeXOffset(736, scale), offsetter.computeYOffset(586, scale));
    poly.addPoint(offsetter.computeXOffset(702, scale), offsetter.computeYOffset(672, scale));
    poly.addPoint(offsetter.computeXOffset(786, scale), offsetter.computeYOffset(758, scale));
    poly.addPoint(offsetter.computeXOffset(526, scale), offsetter.computeYOffset(756, scale));
View Full Code Here

    // TODO implement PolygonLoader
    OffsetCalculator offsetter = new OffsetCalculator(getBounds().x+bounds.x, getBounds().y+bounds.y); // top left corner of this view plus any black borders
    NamedPolygon poly = new NamedPolygon(polyNames[0]);
    poly.addPoint(offsetter.computeXOffset(508, scale), offsetter.computeYOffset(678, scale));
    poly.addPoint(offsetter.computeXOffset(574, scale), offsetter.computeYOffset(520, scale));
    poly.addPoint(offsetter.computeXOffset(534, scale), offsetter.computeYOffset(546, scale));
    poly.addPoint(offsetter.computeXOffset(736, scale), offsetter.computeYOffset(586, scale));
    poly.addPoint(offsetter.computeXOffset(702, scale), offsetter.computeYOffset(672, scale));
    poly.addPoint(offsetter.computeXOffset(786, scale), offsetter.computeYOffset(758, scale));
    poly.addPoint(offsetter.computeXOffset(526, scale), offsetter.computeYOffset(756, scale));
    int meanY = (poly.ypoints[1] + poly.ypoints[5]) / 2;
View Full Code Here

   * Setting the positions of the polygons on the screen
   */
  private void initStartPolygons() {
    // TODO implement PolygonLoader
    NamedPolygon poly = new NamedPolygon(names[TEXT_FOCUS_NEW]);
    poly.addPoint(offsetter.computeXOffset(590),
        offsetter.computeYOffset(38));
    poly.addPoint(offsetter.computeXOffset(662),
        offsetter.computeYOffset(45));
    poly.addPoint(offsetter.computeXOffset(654),
        offsetter.computeYOffset(74));
View Full Code Here

    OffsetCalculator offsetter = new OffsetCalculator(getBounds().x+bounds.x, getBounds().y+bounds.y); // top left corner of this view plus any black borders
    NamedPolygon poly = new NamedPolygon(polyNames[0]);
    poly.addPoint(offsetter.computeXOffset(508, scale), offsetter.computeYOffset(678, scale));
    poly.addPoint(offsetter.computeXOffset(574, scale), offsetter.computeYOffset(520, scale));
    poly.addPoint(offsetter.computeXOffset(534, scale), offsetter.computeYOffset(546, scale));
    poly.addPoint(offsetter.computeXOffset(736, scale), offsetter.computeYOffset(586, scale));
    poly.addPoint(offsetter.computeXOffset(702, scale), offsetter.computeYOffset(672, scale));
    poly.addPoint(offsetter.computeXOffset(786, scale), offsetter.computeYOffset(758, scale));
    poly.addPoint(offsetter.computeXOffset(526, scale), offsetter.computeYOffset(756, scale));
    int meanY = (poly.ypoints[1] + poly.ypoints[5]) / 2;
    portPolygons.put(meanY, poly); // maybe we should use meanX instead
View Full Code Here

    NamedPolygon poly = new NamedPolygon(polyNames[0]);
    poly.addPoint(offsetter.computeXOffset(508, scale), offsetter.computeYOffset(678, scale));
    poly.addPoint(offsetter.computeXOffset(574, scale), offsetter.computeYOffset(520, scale));
    poly.addPoint(offsetter.computeXOffset(534, scale), offsetter.computeYOffset(546, scale));
    poly.addPoint(offsetter.computeXOffset(736, scale), offsetter.computeYOffset(586, scale));
    poly.addPoint(offsetter.computeXOffset(702, scale), offsetter.computeYOffset(672, scale));
    poly.addPoint(offsetter.computeXOffset(786, scale), offsetter.computeYOffset(758, scale));
    poly.addPoint(offsetter.computeXOffset(526, scale), offsetter.computeYOffset(756, scale));
    int meanY = (poly.ypoints[1] + poly.ypoints[5]) / 2;
    portPolygons.put(meanY, poly); // maybe we should use meanX instead
  }
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.