Package java.awt

Examples of java.awt.BasicStroke.createStrokedShape()


            contains = shape2D.contains(x, y);
        }

        if (getStroke() != null) {
            BasicStroke basicStroke = new BasicStroke(getStrokeThickness());
            java.awt.Shape strokeShape = basicStroke.createStrokedShape(shape2D);
            contains |= strokeShape.contains(x, y);
        }

        return contains;
    }
View Full Code Here


        Paint stroke = getStroke();
        if (stroke != null) {
            graphics.setPaint(stroke);
            BasicStroke basicStroke = new BasicStroke(getStrokeThickness());
            java.awt.Shape strokeShape = basicStroke.createStrokedShape(shape2D);
            graphics.fill(strokeShape);
        }
    }

    @Override
View Full Code Here

            if (getStroke() == null) {
                boundingShape = shape2D;
            } else {
                int strokeThickness = getStrokeThickness();
                BasicStroke basicStroke = new BasicStroke(strokeThickness);
                java.awt.Shape strokeShape = basicStroke.createStrokedShape(shape2D);
                boundingShape = strokeShape;
            }

            java.awt.Rectangle bounds = boundingShape.getBounds();
            setBounds(bounds.x, bounds.y, bounds.width, bounds.height);
View Full Code Here

        BasicStroke bs = createStroke(strokeDesc);
        Shape src = Tools.Shape.load(srcName);
        Shape dstExpected = Tools.Shape.load(fileName);

        Shape dstActual = bs.createStrokedShape(src);

        String srcFile = Tools.File.extractFileName(srcName);
        String testFile = Tools.File.extractFileName(fileName);

        if (OUTPUT) {
View Full Code Here

        BasicStroke bs = createStroke(strokeDesc);
        Shape src = Tools.Shape.load(srcName);
        Shape dstExpected = Tools.Shape.load(fileName);

        Shape dstActual = bs.createStrokedShape(src);

        String srcFile = Tools.File.extractFileName(srcName);
        String testFile = Tools.File.extractFileName(fileName);

        if (OUTPUT) {
View Full Code Here

        Stroke overlineStroke =
            new BasicStroke(overlineThickness);

        Point2D position = gv.getGlyphPosition(0);
        return overlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           position.getX(), position.getY()+y,
                           position.getX()+getAdvance(), position.getY()+y));
    }
View Full Code Here

        Stroke underlineStroke =
            new BasicStroke(underlineThickness);

        Point2D position = gv.getGlyphPosition(0);
        return underlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           position.getX(), position.getY()+y,
                           position.getX()+getAdvance(), position.getY()+y));
    }
View Full Code Here

        Stroke strikethroughStroke =
            new BasicStroke(metrics.getStrikethroughThickness());

        Point2D position = gv.getGlyphPosition(0);
        return strikethroughStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           position.getX(), position.getY()+y,
                           position.getX()+getAdvance(), position.getY()+y));
    }
View Full Code Here

        AttributedCharacterIterator aci = node.getAttributedCharacterIterator();
        BasicStroke stroke = (BasicStroke) aci.getAttribute(
                        GVTAttributedCharacterIterator.TextAttribute.STROKE);
        Shape outline = getOutline(node, frc, includeDecoration);
        if (outline != null && (stroke != null)) {
            outline = stroke.createStrokedShape(outline);
        } else {
            outline = null;
        }
        return outline;
    }
View Full Code Here

                                          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

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.