Package de.erichseifert.vectorgraphics2d
Class GraphicsState
java.lang.Object
de.erichseifert.vectorgraphics2d.GraphicsState
- All Implemented Interfaces:
Cloneable
Representation of the Graphics2D status at a certain point in time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Color
Current background color.private Shape
Shape used for clipping paint operations.private Color
Current foreground color.private Composite
Method used for compositing.static final Color
Default background color.static final Shape
Default clipping shape.static final Color
Default color.static final Composite
Default composite mode.static final Font
Default font.static final Color
Default paint.static final Stroke
Default stroke.static final AffineTransform
Default transformation.static final Color
Default XOR mode.private Font
Current font.private RenderingHints
Rendering hints.private Paint
Paint used to fill shapes.private Stroke
Stroke used for drawing shapes.private AffineTransform
Current transformation matrix.private Color
XOR mode used for rendering. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
getClip()
getColor()
getFont()
getHints()
getPaint()
boolean
void
setBackground
(Color background) void
void
void
setComposite
(Composite composite) void
void
void
void
void
setXorMode
(Color xorMode) transformShape
(Shape shape) private static Shape
transformShape
(Shape s, AffineTransform tx) untransformShape
(Shape shape) private static Shape
untransformShape
(Shape s, AffineTransform tx)
-
Field Details
-
DEFAULT_BACKGROUND
Default background color. -
DEFAULT_COLOR
Default color. -
DEFAULT_CLIP
Default clipping shape. -
DEFAULT_COMPOSITE
Default composite mode. -
DEFAULT_FONT
Default font. -
DEFAULT_PAINT
Default paint. -
DEFAULT_STROKE
Default stroke. -
DEFAULT_TRANSFORM
Default transformation. -
DEFAULT_XOR_MODE
Default XOR mode. -
hints
Rendering hints. -
background
Current background color. -
color
Current foreground color. -
clip
Shape used for clipping paint operations. -
composite
Method used for compositing. -
font
Current font. -
paint
Paint used to fill shapes. -
stroke
Stroke used for drawing shapes. -
transform
Current transformation matrix. -
xorMode
XOR mode used for rendering.
-
-
Constructor Details
-
GraphicsState
public GraphicsState()
-
-
Method Details
-
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
transformShape
-
untransformShape
-
transformShape
-
untransformShape
-
getHints
-
getBackground
-
setBackground
-
getColor
-
setColor
-
getClip
-
setClip
-
getComposite
-
setComposite
-
getFont
-
setFont
-
getPaint
-
setPaint
-
getStroke
-
setStroke
-
getTransform
-
setTransform
-
getXorMode
-
setXorMode
-
equals
-
isDefault
public boolean isDefault()
-