Package java.awt

Examples of java.awt.Stroke.createStrokedShape()


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

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


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

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

          Rectangle bounds = handler.getBounds();
          Stroke stroke = handler.getSelectionStroke();

          if (stroke != null)
          {
            bounds = stroke.createStrokedShape(bounds).getBounds();
          }

          if (handleBounds == null)
          {
            handleBounds = bounds;
View Full Code Here

            if (strikethrough) {
                Stroke stStroke = new BasicStroke(cm.strikethroughThickness);
                float shiftY = y + cm.strikethroughOffset;
                Line2D line = new Line2D.Float(x1, shiftY, x2, shiftY);
                Area slArea = new Area(stStroke.createStrokedShape(line));
                if(area == null) {
                    area = slArea;
                } else {
                    area.add(slArea);
                }
View Full Code Here

                                float x2,
                                float y) {

            Stroke ulStroke = getStroke(thickness);
            Line2D line = new Line2D.Float(x1, y + shift, x2, y + shift);
            return ulStroke.createStrokedShape(line);
        }
    }

    // Implementation of UNDERLINE_LOW_GRAY.
    private static class IMGrayUnderline extends Underline {
View Full Code Here

            layout.getBaselineOffsets()[java.awt.Font.ROMAN_BASELINE] -
                layout.getAscent();
        Stroke overlineStroke =
            new BasicStroke(thickness);
        java.awt.Shape overlineShape =
                    overlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           location.getX()+xoffset, y,
                           location.getX()+xoffset+layout.getAdvance(), y));
        Paint paint = (Paint) runaci.getAttribute(
            TextAttribute.FOREGROUND);
View Full Code Here

                   (layout.getBaselineOffsets()[java.awt.Font.ROMAN_BASELINE]
                        + layout.getDescent())/2;
        Stroke underlineStroke =
            new BasicStroke(thickness);
        java.awt.Shape underlineShape =
                    underlineStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           location.getX()+xoffset, y,
                           location.getX()+xoffset+layout.getAdvance(), y));

        // TODO: change getAdvance to getVisibleAdvance for
View Full Code Here

        // TODO: the strikethrough offset should be calculated
        // from the font instead!
        Stroke strikethroughStroke =
            new BasicStroke(thickness);
        java.awt.Shape strikethroughShape =
                    strikethroughStroke.createStrokedShape(
                           new java.awt.geom.Line2D.Double(
                           location.getX()+xoffset, y,
                           location.getX()+xoffset+layout.getAdvance(), y));
        Paint paint = (Paint) runaci.getAttribute(
            TextAttribute.FOREGROUND);
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

        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

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.