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 ColorCurrent background color.private ShapeShape used for clipping paint operations.private ColorCurrent foreground color.private CompositeMethod used for compositing.static final ColorDefault background color.static final ShapeDefault clipping shape.static final ColorDefault color.static final CompositeDefault composite mode.static final FontDefault font.static final ColorDefault paint.static final StrokeDefault stroke.static final AffineTransformDefault transformation.static final ColorDefault XOR mode.private FontCurrent font.private RenderingHintsRendering hints.private PaintPaint used to fill shapes.private StrokeStroke used for drawing shapes.private AffineTransformCurrent transformation matrix.private ColorXOR mode used for rendering. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()booleangetClip()getColor()getFont()getHints()getPaint()booleanvoidsetBackground(Color background) voidvoidvoidsetComposite(Composite composite) voidvoidvoidvoidvoidsetXorMode(Color xorMode) transformShape(Shape shape) private static ShapetransformShape(Shape s, AffineTransform tx) untransformShape(Shape shape) private static ShapeuntransformShape(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:
clonein 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()
-