|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fop.pdf.PDFState
This keeps information about the current state when writing to pdf. It allows for creating new graphics states with the q operator. This class is only used to store the information about the state the caller needs to handle the actual pdf operators. When setting the state for pdf there are three possible ways of handling the situation. The values can be set to override previous or default values. A new state can be added and then the values set. The current state can be popped and values will return to a previous state then the necessary values can be overridden. The current transform behaves differently to other values as the matrix is combined with the current resolved value. It is impossible to optimise the result without analysing the all the possible combinations after completing.
Nested Class Summary | |
class |
PDFState.Data
|
Constructor Summary | |
PDFState()
PDF State for storing graphics state. |
Method Summary | |
boolean |
checkClip(java.awt.Shape cl)
Check if the clip will change the current state. |
boolean |
checkTransform(java.awt.geom.AffineTransform tf)
Check the current transform. |
void |
concatenate(java.awt.geom.AffineTransform tf)
Concatenates the given AffineTransform to the current one. |
PDFState.Data |
getData()
|
PDFGState |
getGState()
Get the grapics state. |
int |
getStackLevel()
Get the current stack level. |
java.awt.geom.AffineTransform |
getTransform()
Get the current transform. |
PDFState.Data |
pop()
Pop the state from the stack and set current values to popped state. |
void |
push()
Push the current state onto the stack. |
boolean |
setBackColor(java.awt.Color col)
Set the current background color. |
void |
setClip(java.awt.Shape cl)
Set the current clip. |
boolean |
setColor(java.awt.Color col)
Set the current color. |
boolean |
setLineWidth(float width)
Set the current line width. |
boolean |
setPaint(java.awt.Paint p)
Set the current paint. |
void |
setTransform(java.awt.geom.AffineTransform tf)
Deprecated. This method name is misleading. Use concatenate(AffineTransform) instead! |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PDFState()
Method Detail |
public void push()
public PDFState.Data getData()
public PDFState.Data pop()
public int getStackLevel()
public boolean setLineWidth(float width)
width
- the line width in points
public boolean setColor(java.awt.Color col)
col
- the color to set
public boolean setBackColor(java.awt.Color col)
col
- the new background color
public boolean setPaint(java.awt.Paint p)
p
- the new paint
public boolean checkClip(java.awt.Shape cl)
cl
- the clip shape to check
public void setClip(java.awt.Shape cl)
cl
- the new clip in the current statepublic boolean checkTransform(java.awt.geom.AffineTransform tf)
tf
- the transform the check against
public void setTransform(java.awt.geom.AffineTransform tf)
tf
- the transform to concatonate to the current level transformpublic void concatenate(java.awt.geom.AffineTransform tf)
tf
- the transform to concatenate to the current level transformpublic java.awt.geom.AffineTransform getTransform()
public PDFGState getGState()
|
fop 0.93 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |