/** * 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){ GeneralPath path = new GeneralPath(_transform.CreateTransformedShape(shape)); Freeform p = new Freeform(_group); p.SetPath(path); ApplyPaint(p); p.SetLineColor(null); //Fills must be "No Line" _group.AddShape(p); }
/** * 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){ GeneralPath path = new GeneralPath(_transform.CreateTransformedShape(shape)); Freeform p = new Freeform(_group); p.SetPath(path); p.GetFill().SetForegroundColor(null); ApplyStroke(p); _group.AddShape(p); }