Package com.google.code.appengine.awt

Examples of com.google.code.appengine.awt.Stroke


        // test if clip intersects pi
        if (getClip() != null) {
            GeneralPath gp = new GeneralPath();
            gp.append(pi, true);
            // create the stroked shape
            Stroke stroke = getStroke() == null? defaultStroke : getStroke();
            Rectangle2D bounds = stroke.createStrokedShape(gp).getBounds();
            // clip should intersect the path
            // if clip contains the bounds completely, clipping is not needed
            drawClipped = getClip().intersects(bounds) && !getClip().contains(bounds);
        }
View Full Code Here


    public void setLineWidth(int width) {
        setLineWidth((double) width);
    }

    public void setLineWidth(double width) {
        Stroke stroke = getStroke();
        if (stroke instanceof BasicStroke) {
            BasicStroke cs = (BasicStroke) stroke;
            if (cs.getLineWidth() != width) {
                stroke = new BasicStroke((float) width, cs.getEndCap(), cs
                        .getLineJoin(), cs.getMiterLimit(), cs.getDashArray(),
View Full Code Here

            fill(bounds);
            setPaint(paint);
        }
        if (framed) {
            Paint paint = getPaint();
            Stroke stroke = getStroke();
            setColor(frameColor);
            setLineWidth(frameWidth);
            draw(bounds);
            setPaint(paint);
            setStroke(stroke);
View Full Code Here

    @Override
    public void draw(Graphics2D g2, float x, float y) {
        AffineTransform at = AffineTransform.getTranslateInstance(x, y);
        if (fStroke == STROKE){
            Stroke oldStroke = g2.getStroke();
            g2.setStroke(new BasicStroke());
            g2.draw(at.createTransformedShape(fShape));
            g2.setStroke(oldStroke);
        } else {
            g2.fill(at.createTransformedShape(fShape));
View Full Code Here

     *
     * @param renderer EMFRenderer storing the drawing session data
     */
    public void render(EMFRenderer renderer) {
        GeneralPath currentPath = renderer.getPath();
        Stroke currentPenStroke = renderer.getPenStroke();
        // The WidenPath function redefines the current path as the area
        // that would be painted if the path were stroked using the pen
        // currently selected into the given device context.
        if (currentPath != null && currentPenStroke != null) {
            GeneralPath newPath = new GeneralPath(
                renderer.getWindingRule());
            newPath.append(currentPenStroke.createStrokedShape(currentPath), false);
            renderer.setPath(newPath);
        }
    }
View Full Code Here

        }

        float left = xOffset + (float) trs.getLogicalBounds().getMinX();
        float right = xOffset + (float) trs.getLogicalBounds().getMaxX();

        Stroke savedStroke = g2d.getStroke();

        d.getStrokes(trs.metrics);

        if (d.strikeThrough) {
            float y = trs.y + yOffset + trs.metrics.strikethroughOffset;
View Full Code Here

TOP

Related Classes of com.google.code.appengine.awt.Stroke

Copyright © 2018 www.massapicom. 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.