/** * Fills the interior of a <code>Shape</code> using the settings of the * <code>Graphics2D</code> context. The rendering attributes applied * include the <code>Clip</code>, <code>Transform</code>, * <code>Paint</code>, and <code>Composite</code>. * @param shape the <code>Shape</code> to be filled * @see #setPaint * @see java.awt.Graphics#setColor * @see #_transform * @see #setTransform * @see #setComposite * @see #clip * @see #setClip */ public void fill(Shape shape){ Path2D.Double path = new Path2D.Double(_transform.createTransformedShape(shape)); FreeformShape<?,?> p = _group.createFreeform(); p.setPath(path); applyPaint(p); p.setStrokeStyle(); //Fills must be "No Line" }
/** * Strokes the outline of a <code>Shape</code> using the settings of the * current <code>Graphics2D</code> context. The rendering attributes * applied include the <code>Clip</code>, <code>Transform</code>, * <code>Paint</code>, <code>Composite</code> and * <code>Stroke</code> attributes. * @param shape the <code>Shape</code> to be rendered * @see #setStroke * @see #setPaint * @see java.awt.Graphics#setColor * @see #_transform * @see #setTransform * @see #clip * @see #setClip * @see #setComposite */ public void draw(Shape shape){ Path2D.Double path = new Path2D.Double(_transform.createTransformedShape(shape)); FreeformShape<?,?> p = _group.createFreeform(); p.setPath(path); p.setFillColor(null); applyStroke(p); if (_paint instanceof Color) { p.setStrokeStyle((Color)_paint); } }
/** * Fills the interior of a <code>Shape</code> using the settings of the * <code>Graphics2D</code> context. The rendering attributes applied * include the <code>Clip</code>, <code>Transform</code>, * <code>Paint</code>, and <code>Composite</code>. * @param shape the <code>Shape</code> to be filled * @see #setPaint * @see java.awt.Graphics#setColor * @see #_transform * @see #setTransform * @see #setComposite * @see #clip * @see #setClip */ public void fill(Shape shape){ Path2D.Double path = new Path2D.Double(_transform.createTransformedShape(shape)); FreeformShape<?,?> p = _group.createFreeform(); p.setPath(path); applyPaint(p); p.setStrokeStyle(); //Fills must be "No Line" }
/** * Strokes the outline of a <code>Shape</code> using the settings of the * current <code>Graphics2D</code> context. The rendering attributes * applied include the <code>Clip</code>, <code>Transform</code>, * <code>Paint</code>, <code>Composite</code> and * <code>Stroke</code> attributes. * @param shape the <code>Shape</code> to be rendered * @see #setStroke * @see #setPaint * @see java.awt.Graphics#setColor * @see #_transform * @see #setTransform * @see #clip * @see #setClip * @see #setComposite */ public void draw(Shape shape){ Path2D.Double path = new Path2D.Double(_transform.createTransformedShape(shape)); FreeformShape<?,?> p = _group.createFreeform(); p.setPath(path); p.setFillColor(null); applyStroke(p); if (_paint instanceof Color) { p.setStrokeStyle((Color)_paint); } }