Package java.awt.geom

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


            dstShape.append(tlc.getOutline(locs[n], locs[n+1]), false);
        }

        if (tx != null) {
            dstShape.transform(tx);
        }
        return dstShape;
    }

    public int hashCode() {
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

              }
              if (outlinePaint != null) {
                  g2.setPaint(outlinePaint);
                  g2.draw(path);
              }
              path.transform(AffineTransform.getTranslateInstance(-x, -y));
        }

        public int getIconWidth() {
            return width;
        }
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 (fill) {
                    g2.fill(path);
                }
                if (outline) {
                    g2.draw(path);
View Full Code Here

                    g2.fill(path);
                }
                if (outline) {
                    g2.draw(path);
                }
                path.transform(AffineTransform.getTranslateInstance(-x, -y));
            }

            public int getIconWidth() {
                return width;
            }
View Full Code Here

        try {
            // undo the effect of the transform applied in read
            AffineTransform xformA = this.at.createInverse();
            xformA.translate(x, y);
            pathA.transform(xformA);
        } catch (NoninvertibleTransformException nte) {
            pathA.transform(AffineTransform.getTranslateInstance(x, y));
        }

        GeneralPath pathB = getOutline(b, getWidth(b, null));
View Full Code Here

            // undo the effect of the transform applied in read
            AffineTransform xformA = this.at.createInverse();
            xformA.translate(x, y);
            pathA.transform(xformA);
        } catch (NoninvertibleTransformException nte) {
            pathA.transform(AffineTransform.getTranslateInstance(x, y));
        }

        GeneralPath pathB = getOutline(b, getWidth(b, null));

        try {
View Full Code Here

        GeneralPath pathB = getOutline(b, getWidth(b, null));

        try {
            AffineTransform xformB = this.at.createInverse();
            pathB.transform(xformB);
        } catch (NoninvertibleTransformException nte) {
            // ignore
        }

        gp.append(pathB, false);
View Full Code Here

        FlPoint curpoint = new FlPoint();

        this.sloc = 0;
        parse(cs, gp, curpoint, advance);

        gp.transform(at);
        return gp;
    }

    /**
     * Get a glyph outline by name
View Full Code Here

                Point2D p = new Point2D.Float(advance.x, advance.y);
                this.at.transform(p, p);

                double scale = width / p.getX();
                AffineTransform xform = AffineTransform.getScaleInstance(scale, 1.0);
                gp.transform(xform);
            }

            // put the parsed object in the cache
            this.name2outline.put(name, gp);
            this.name2width.put(name, advance);
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.