Constructor and Description |
---|
PaintableShape(java.awt.Shape shape,
java.awt.Paint fillPaint)
Constructor.
|
PaintableShape(java.awt.Shape shape,
java.awt.Stroke drawStroke,
java.awt.Paint drawPaint)
Constructor.
|
PaintableShape(java.awt.Shape shape,
java.awt.Stroke drawStroke,
java.awt.Paint drawPaint,
java.awt.Paint fillPaint)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(PaintableVisitor visitor)
Accept a visitor.
|
java.awt.Paint |
getDrawPaint()
Get the draw paint.
|
java.awt.Stroke |
getDrawStroke()
Get the draw stroke.
|
java.awt.Paint |
getFillPaint()
Get the fill paint.
|
java.awt.Shape |
getShape()
Get the shape.
|
void |
paintTo(java.awt.Graphics2D g2,
Context context)
Paint this object to the given graphics context.
|
public PaintableShape(@NotNull java.awt.Shape shape, @Nullable java.awt.Stroke drawStroke, @Nullable java.awt.Paint drawPaint, @Nullable java.awt.Paint fillPaint)
shape
- shape to drawdrawStroke
- stroke for drawing the shape, if null
the shape isn't drawndrawPaint
- paint for drawing, if null
the shape isn't drawnfillPaint
- paint for filling, if null
the shape isn't filledpublic PaintableShape(@NotNull java.awt.Shape shape, @Nullable java.awt.Stroke drawStroke, @Nullable java.awt.Paint drawPaint)
shape
- shape to drawdrawStroke
- stroke for drawing the shape, if null
the shape isn't drawndrawPaint
- paint for drawing, if null
the shape isn't drawnpublic void paintTo(@NotNull java.awt.Graphics2D g2, @NotNull Context context)
Paintable
public void accept(@NotNull PaintableVisitor visitor)
@NotNull public java.awt.Shape getShape()
@Nullable public java.awt.Stroke getDrawStroke()
null
)@Nullable public java.awt.Paint getDrawPaint()
null
)@Nullable public java.awt.Paint getFillPaint()
null
)