public class PSState
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_DASH
Default for setdash
|
static java.awt.Color |
DEFAULT_RGB_COLOR
Default color in PostScript
|
Constructor and Description |
---|
PSState()
Default constructor
|
PSState(PSState org,
boolean copyTransforms)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkTransform(java.awt.geom.AffineTransform tf)
Check the current transform.
|
void |
concatMatrix(java.awt.geom.AffineTransform transform)
Concats the given transformation matrix with the current one.
|
java.awt.geom.AffineTransform |
getTransform()
Returns the transform.
|
void |
reestablish(PSGenerator gen)
Reestablishes the graphics state represented by this instance by issueing the
necessary commands.
|
boolean |
useColor(java.awt.Color value)
Establishes the specified color (RGB).
|
boolean |
useDash(java.lang.String pattern)
Establishes the specified dash.
|
boolean |
useFont(java.lang.String name,
float size)
Establishes the specified font and size.
|
boolean |
useLineCap(int value)
Establishes the specified line cap.
|
boolean |
useLineJoin(int value)
Establishes the specified line join.
|
boolean |
useLineWidth(double value)
Establishes the specified line width.
|
boolean |
useMiterLimit(float value)
Establishes the specified miter limit.
|
public static final java.lang.String DEFAULT_DASH
public static final java.awt.Color DEFAULT_RGB_COLOR
public PSState()
public PSState(PSState org, boolean copyTransforms)
org
- the original to copy fromcopyTransforms
- true if the list of matrix concats should be cloned, toopublic java.awt.geom.AffineTransform getTransform()
public boolean checkTransform(java.awt.geom.AffineTransform tf)
tf
- the transform the check againstpublic void concatMatrix(java.awt.geom.AffineTransform transform)
transform
- The new transformation matrixpublic boolean useLineCap(int value)
value
- line cap (0, 1 or 2) as defined by the setlinecap commandpublic boolean useLineJoin(int value)
value
- line join (0, 1 or 2) as defined by the setlinejoin commandpublic boolean useMiterLimit(float value)
value
- the miter limit as defined by the setmiterlimit commandpublic boolean useLineWidth(double value)
value
- line width as defined by the setlinewidth commandpublic boolean useDash(java.lang.String pattern)
pattern
- dash pattern as defined by the setdash commandpublic boolean useColor(java.awt.Color value)
value
- color as defined by the setrgbcolor commandpublic boolean useFont(java.lang.String name, float size)
name
- name of the font for the "F" command (see FOP Std Proc Set)size
- size of the fontpublic void reestablish(PSGenerator gen) throws java.io.IOException
gen
- The generator to use for outputjava.io.IOException
- In case of an I/O problemCopyright 1999-2012 The Apache Software Foundation. All Rights Reserved.