Package java.awt.geom

Examples of java.awt.geom.GeneralPath.transform()


        -45, Arc2D.OPEN), true);
    generalPath.lineTo((float) x, (float) (y + topLeftHeight));//8
    generalPath.append(configureArc(x, y, 2 * topLeftWidth, 2 * topLeftHeight, -180, -45, Arc2D.OPEN), true);

    generalPath.closePath();
    generalPath.transform(BorderRenderer.scaleInstance);
    borderShape = generalPath;
    return generalPath;
  }

  public Shape getBorderTopShape()
View Full Code Here


    final GeneralPath generalPath = new GeneralPath(GeneralPath.WIND_NON_ZERO, 20);
    generalPath.append(configureArc(x, y, 2 * topLeftWidth, 2 * topLeftHeight, -225, -45, Arc2D.OPEN), true);
    generalPath.lineTo((float) (x + w - topRightWidth), (float) y);//2
    generalPath.append(configureArc(x + w - 2 * topRightWidth, y, 2 * topRightWidth, 2 * topRightHeight, 90, -45,
        Arc2D.OPEN), true);
    generalPath.transform(BorderRenderer.scaleInstance);
    borderShapeTop = generalPath;
    return generalPath;
  }

  public Shape getBorderBottomShape()
View Full Code Here

        GeneralPath p2 = new GeneralPath();
        p2.append(p1, false);
        p1.lineTo(10, 10);

        System.out.println("Transform");
        p2.transform(AffineTransform.getScaleInstance(5, 5));
    }
}
View Full Code Here

            && shape.dropsShadow()
            && shape.getType() != DiagramShape.TYPE_CUSTOM){
          GeneralPath shadow = new GeneralPath(path);
          AffineTransform translate = new AffineTransform();
          translate.setToTranslation(offset, offset);
          shadow.transform(translate);
          g2.setColor(new Color(150,150,150));
          g2.fill(shadow);
       
        }
      }
View Full Code Here

            {
                glyphPath = glyph.getPath();
                if (hasScaling)
                {
                    AffineTransform atScale = AffineTransform.getScaleInstance(scale, scale);
                    glyphPath.transform(atScale);
                }
                glyphs.put(gid, glyphPath);
            }
        }
        return glyphPath != null ? (GeneralPath) glyphPath.clone() : null; // todo: expensive
View Full Code Here

            GeneralPath path = glyph.getPath();

            // scale to 1000upem, per PostScript convention
            float scale = 1000f / getUnitsPerEm();
            AffineTransform atScale = AffineTransform.getScaleInstance(scale, scale);
            path.transform(atScale);

            return path;
        }
    }
View Full Code Here

        if ((rotate != null) && (angle != 0)) {
            /// we have rotation huston, please spin me
            getTransform().setToRotation(angle, rotate.getX(), rotate.getY());
            shape1.transform(getTransform());
            shape2.transform(getTransform());
        }

        if (getFillPaint() != null) {
            g2.setPaint(getFillPaint());
            g2.fill(shape1);
View Full Code Here

        shape.append(new Arc2D.Double(0.0, -7.0, 10, 14, 154.5, 25.5,
                Arc2D.OPEN), true);
        shape.closePath();
        getTransform().setToTranslation(plotArea.getMinX(), plotArea.getMaxY());
        getTransform().scale(plotArea.getWidth(), plotArea.getHeight() / 3);
        shape.transform(getTransform());

        if ((rotate != null) && (angle != 0)) {
            /// we have rotation
            getTransform().setToRotation(angle, rotate.getX(), rotate.getY());
            shape.transform(getTransform());
View Full Code Here

        shape.transform(getTransform());

        if ((rotate != null) && (angle != 0)) {
            /// we have rotation
            getTransform().setToRotation(angle, rotate.getX(), rotate.getY());
            shape.transform(getTransform());
        }

        defaultDisplay(g2, shape);
    }
View Full Code Here

      final int height = shape.getBounds().height;
      final GeneralPath path = new GeneralPath(shape);
      return new Icon() {
          public void paintIcon(Component c, Graphics g, int x, int y) {
              Graphics2D g2 = (Graphics2D) g;
              path.transform(AffineTransform.getTranslateInstance(x, y));
              if (fillPaint != null) {
                  g2.setPaint(fillPaint);
                  g2.fill(path);
              }
              if (outlinePaint != null) {
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.