Examples of createStrokedShape()


Examples of java.awt.BasicStroke.createStrokedShape()

            p.quadTo(30, 10, 85, 15);

            Stroke str = new BasicStroke(35, BasicStroke.CAP_BUTT,
                    BasicStroke.JOIN_ROUND);

            Shape s = str.createStrokedShape(p);
            AffineTransform at = new AffineTransform();
            at.translate(5, 25);

            Area area = new Area(s);
            s = at.createTransformedShape(s);
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

         * being created each time, but it would normally be created
         * only once.
         */
        public Rectangle2D getBounds() {
            Stroke s = new BasicStroke(1.0f);
            return s.createStrokedShape(_bounds).getBounds2D();
        }

        /** Get the shape of this figure. In this example, it's
         * just the bounding rectangle that we stored in the
         * constructor. Note that in general, figures assume
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

        Stroke overlineStroke =
            new BasicStroke(overlineThickness);
        Rectangle2D logicalBounds = gv.getLogicalBounds();

        return overlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           logicalBounds.getMinX() + overlineThickness/2.0, offset.getY()+y,
                           logicalBounds.getMaxX() - overlineThickness/2.0, offset.getY()+y));
    }
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

        BasicStroke underlineStroke =
            new BasicStroke(underlineThickness);

        Rectangle2D logicalBounds = gv.getLogicalBounds();

        return underlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           logicalBounds.getMinX() + underlineThickness/2.0, offset.getY()+y,
                           logicalBounds.getMaxX() - underlineThickness/2.0, offset.getY()+y));
    }
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

        Stroke strikethroughStroke =
            new BasicStroke(strikethroughThickness);

        Rectangle2D logicalBounds = gv.getLogicalBounds();
        return strikethroughStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           logicalBounds.getMinX() + strikethroughThickness/2.0, offset.getY()+y,
                           logicalBounds.getMaxX() - strikethroughThickness/2.0, offset.getY()+y));
    }
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

                                          TextLayout layout) {
        double y = layout.getBaselineOffsets()[java.awt.Font.ROMAN_BASELINE] -
                layout.getAscent();
        Stroke overlineStroke =
            new BasicStroke(getDecorationThickness(runaci, layout));
        return  overlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           0f, y,
                           layout.getAdvance(), y));
    }
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

        double y = (layout.getBaselineOffsets()[java.awt.Font.ROMAN_BASELINE]
                        + layout.getDescent())/2;
        Stroke underlineStroke =
            new BasicStroke(getDecorationThickness(runaci, layout));

        return underlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           0f, y,
                           layout.getAdvance(), y));
    }
View Full Code Here

Examples of java.awt.BasicStroke.createStrokedShape()

        // TODO: the strikethrough offset should be calculated
        // from the font instead!
        Stroke strikethroughStroke =
            new BasicStroke(getDecorationThickness(runaci, layout));

        return strikethroughStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           0f, y,
                           layout.getAdvance(), y));
    }
View Full Code Here

Examples of java.awt.Stroke.createStrokedShape()

        Stroke overlineStroke =
            new BasicStroke(overlineThickness);
        Rectangle2D logicalBounds = gv.getLogicalBounds();

        return overlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           logicalBounds.getMinX() + overlineThickness/2.0, offset.getY()+y,
                           logicalBounds.getMaxX() - overlineThickness/2.0, offset.getY()+y));
    }
View Full Code Here

Examples of java.awt.Stroke.createStrokedShape()

        // Float dy = (Float) aci.getAttribute(DY);
        // if (dy != null)
        //     y += dy.floatValue();

        Rectangle2D logicalBounds = gv.getLogicalBounds();
        return strikethroughStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           logicalBounds.getMinX() + strikethroughThickness/2.0, offset.getY()+y,
                           logicalBounds.getMaxX() - strikethroughThickness/2.0, offset.getY()+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.