|
fop 0.91beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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.
Inner 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. |
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)
Set a new transform. |
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 pointspublic boolean setColor(java.awt.Color col)
col
- the color to setpublic boolean setBackColor(java.awt.Color col)
col
- the new background colorpublic boolean setPaint(java.awt.Paint p)
p
- the new paintpublic boolean checkClip(java.awt.Shape cl)
cl
- the clip shape to checkpublic 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 againstpublic void setTransform(java.awt.geom.AffineTransform tf)
tf
- the transform to concatonate to the current level transformpublic java.awt.geom.AffineTransform getTransform()
public PDFGState getGState()
|
fop 0.91beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |