Class JxnShape2DPainter
- java.lang.Object
-
- JxnAbstractPainter
-
- JxnShape2DPainter
-
- All Implemented Interfaces:
KmgXYPainter
public class JxnShape2DPainter extends JxnAbstractPainter
Defines a painter object for the display of an object from packagejava.awt.geom
(implementations ofjava.awt.Shape
) in aPlotFrame
. This allows to interactively explore and use the drawing features of → Java 2D from Jxn.
Example:shape = @
Note: The scaling ofjava.awt.geom
.CubicCurve2D$Double
( 0.5, 0.5, 0.5, 0.0, 0.0, -0.5, -0.5, -0.5 )
plot( -0.4 + 0.4j ).
add
( @JxnShape2DPainter
( shape, B, true ) )
java.awt.geom
objects requires the internal application ofjava.awt.geom.AffineTransform
in the paint method. The (Java internal) transform unexpectedly also affects thejava.awt.BasicStroke
setting and thuslineWidth
may be applied (in an undesired way) differently in horizontal and vertical direction.- See Also:
- → Java 2D Tutorial
-
-
Constructor Summary
Constructors Constructor Description JxnShape2DPainter(Shape shape, Color shapeColor, boolean fill)
Creates a graphical object for display in aPlotFrame
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
paint(KmgGraphicsScaler sk)
Paints the graphical object (called internally).-
Methods inherited from class JxnAbstractPainter
applyStroke, applyStroke, getKmgDoubleBounds, lw, plot, plot90, setColor, setIgnoreBounds, setIgnoreBounds, setLineWidth, setLineWidthDefault, setStroke
-
-
-
-
Constructor Detail
-
JxnShape2DPainter
public JxnShape2DPainter(Shape shape, Color shapeColor, boolean fill)
Creates a graphical object for display in aPlotFrame
.- Parameters:
shape
- seejava.awt.geom
fill
- if false draws the outline
-
-
Method Detail
-
paint
public void paint(KmgGraphicsScaler sk)
Description copied from interface:KmgXYPainter
Paints the graphical object (called internally).
-
-