Package org.apache.batik.gvt

Examples of org.apache.batik.gvt.FillShapePainter


        Paint strokePaint = convertStrokePaint(e, node, ctx);

        Shape shape = node.getShape();
        if (shape == null) return null;
        if (fillPaint != null && strokePaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);

            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            CompositeShapePainter cp = new CompositeShapePainter(shape);
            cp.addShapePainter(fp);
            cp.addShapePainter(sp);
            return cp;
        } else if (strokePaint != null) {
            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            return sp;
        } else if (fillPaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        } else {
            return null;
        }
    }
View Full Code Here


        Paint strokePaint = convertStrokePaint(e, node, ctx);

        Shape shape = node.getShape();
        if (shape == null) return null;
        if (fillPaint != null && strokePaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);

            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            CompositeShapePainter cp = new CompositeShapePainter(shape);
            cp.addShapePainter(fp);
            cp.addShapePainter(sp);
            return cp;
        } else if (strokePaint != null) {
            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            return sp;
        } else if (fillPaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        } else {
            return null;
        }
    }
View Full Code Here

        }
        Paint strokePaint = convertStrokePaint(e, node, ctx);

        Shape shape = node.getShape();
        if (fillPaint != null && strokePaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);

            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e, ctx));
            sp.setPaint(strokePaint);
            CompositeShapePainter cp = new CompositeShapePainter(shape);
            cp.addShapePainter(fp);
            cp.addShapePainter(sp);
            return cp;
        } else if (strokePaint != null) {
            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e, ctx));
            sp.setPaint(strokePaint);
            return sp;
        } else if (fillPaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        } else {
            return null;
        }
    }
View Full Code Here

            Paint paint = (Paint)evt.getNewValue();
            ShapeNode shapeNode = (ShapeNode)node;
            Shape shape = shapeNode.getShape();
            ShapePainter painter = shapeNode.getShapePainter();
            if (painter instanceof FillShapePainter) {
                FillShapePainter fp = (FillShapePainter)painter;
                fp.setPaint(paint);
                shapeNode.setShapePainter(fp);
            } else if (painter instanceof CompositeShapePainter) {
                CompositeShapePainter cp = (CompositeShapePainter)painter;
                FillShapePainter fp = (FillShapePainter)cp.getShapePainter(0);
                fp.setPaint(paint);
                shapeNode.setShapePainter(cp);
            }
            break;
        } case PaintServer.KEY_STROKE: {
              Paint paint = (Paint)evt.getNewValue();
View Full Code Here

        Paint fillPaint = convertFillPaint(e, node, ctx);
        Paint strokePaint = convertStrokePaint(e, node, ctx);

        Shape shape = node.getShape();
        if (fillPaint != null && strokePaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);

            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            CompositeShapePainter cp = new CompositeShapePainter(shape);
            cp.addShapePainter(fp);
            cp.addShapePainter(sp);
            return cp;
        } else if (strokePaint != null) {
            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e));
            sp.setPaint(strokePaint);
            return sp;
        } else if (fillPaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        } else {
            return null;
        }
    }
View Full Code Here

                                                    BridgeContext ctx) {
        Shape shape = node.getShape();
        if (shape == null) return null;

        Paint  fillPaint   = convertFillPaint  (e, node, ctx);
        FillShapePainter fp = new FillShapePainter(shape);
        fp.setPaint(fillPaint);

        Stroke stroke      = convertStroke     (e);
        if (stroke == null)
            return fp;
View Full Code Here

        Paint fillPaint = convertFillPaint(e, node, ctx);
        Paint strokePaint = convertStrokePaint(e, node, ctx);
        Shape shape = node.getShape();

        if (fillPaint != null && strokePaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);

            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e, ctx));
            sp.setPaint(strokePaint);
            CompositeShapePainter cp = new CompositeShapePainter(shape);
            cp.addShapePainter(fp);
            cp.addShapePainter(sp);
            return cp;
        } else if (strokePaint != null) {
            StrokeShapePainter sp = new StrokeShapePainter(shape);
            sp.setStroke(PaintServer.convertStroke(e, ctx));
            sp.setPaint(strokePaint);
            return sp;
        } else if (fillPaint != null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        } else {
            return null;
        }
    }
View Full Code Here

                                                    BridgeContext ctx) {
        Shape shape = node.getShape();
        if (shape == null) return null;

        Paint  fillPaint   = convertFillPaint  (e, node, ctx);
        FillShapePainter fp = new FillShapePainter(shape);
        fp.setPaint(fillPaint);

        Stroke stroke      = convertStroke     (e);
        if (stroke == null)
            return fp;
View Full Code Here

        Shape shape = node.getShape();
        if (shape == null) return null;

        if (stroke == null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        }

        FillShapePainter fp = new FillShapePainter(shape);
        fp.setPaint(fillPaint);

        StrokeShapePainter sp = new StrokeShapePainter(shape);
        sp.setStroke(PaintServer.convertStroke(e));
        sp.setPaint(strokePaint);
View Full Code Here

        Shape shape = node.getShape();
        if (shape == null) return null;

        if (stroke == null) {
            FillShapePainter fp = new FillShapePainter(shape);
            fp.setPaint(fillPaint);
            return fp;
        }

        FillShapePainter fp = new FillShapePainter(shape);
        fp.setPaint(fillPaint);

        StrokeShapePainter sp = new StrokeShapePainter(shape);
        sp.setStroke(PaintServer.convertStroke(e));
        sp.setPaint(strokePaint);
View Full Code Here

TOP

Related Classes of org.apache.batik.gvt.FillShapePainter

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.