public class MetaState extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ALTERNATE |
int |
backgroundMode
The current background mode.
|
Color |
currentBackgroundColor
The current background color.
|
MetaBrush |
currentBrush
Current Brush.
|
MetaFont |
currentFont
Current Font.
|
MetaPen |
currentPen
Current Pen.
|
Point |
currentPoint
Current Point.
|
Color |
currentTextColor
Current text color.
|
int |
extentWx
Current extent for Wx.
|
int |
extentWy
Current extent for Wy.
|
int |
lineJoin
Curent line join.
|
List<MetaObject> |
MetaObjects
List of MetaObjects.
|
int |
offsetWx
Current offset for Wx.
|
int |
offsetWy
Current offset for Wy.
|
static int |
OPAQUE |
int |
polyFillMode
Current polygon fill mode.
|
Stack<MetaState> |
savedStates
Stack of saved states.
|
float |
scalingX
Current x value for scaling.
|
float |
scalingY
Current y value for scaling.
|
static int |
TA_BASELINE |
static int |
TA_BOTTOM |
static int |
TA_CENTER |
static int |
TA_LEFT |
static int |
TA_NOUPDATECP |
static int |
TA_RIGHT |
static int |
TA_TOP |
static int |
TA_UPDATECP |
int |
textAlign
Current text alignment.
|
static int |
TRANSPARENT |
static int |
WINDING |
Constructor and Description |
---|
MetaState()
Creates new MetaState
|
MetaState(MetaState state)
Clones a new MetaState from the specified MetaState.
|
Modifier and Type | Method and Description |
---|---|
void |
addMetaObject(MetaObject object)
Add a MetaObject to the State.
|
void |
cleanup(PdfCanvas cb)
Restres the state of the specified PdfCanvas object for as many times as there are saved states on the stack.
|
void |
deleteMetaObject(int index)
Deletes the MetaObject at the specified index.
|
int |
getBackgroundMode()
Getter for property backgroundMode.
|
Color |
getCurrentBackgroundColor()
Getter for property currentBackgroundColor.
|
MetaBrush |
getCurrentBrush()
Returns the current MetaBrush object.
|
MetaFont |
getCurrentFont()
Returns the current MetaFont object.
|
MetaPen |
getCurrentPen()
Returns the current MetaPen object.
|
Point |
getCurrentPoint()
Returns the current Point.
|
Color |
getCurrentTextColor()
Getter for property currentTextColor.
|
boolean |
getLineNeutral()
Returns true if lineJoin is 0.
|
int |
getPolyFillMode()
Getter for property polyFillMode.
|
int |
getTextAlign()
Getter for property textAlign.
|
void |
restoreState(int index, PdfCanvas cb)
Restores the state to the next state on the saved states stack.
|
void |
saveState(PdfCanvas cb)
Saves the state of this MetaState object.
|
void |
selectMetaObject(int index, PdfCanvas cb)
Select the MetaObject at the specified index and prepare the PdfCanvas.
|
void |
setBackgroundMode(int backgroundMode)
Setter for property backgroundMode.
|
void |
setCurrentBackgroundColor(Color currentBackgroundColor)
Setter for property currentBackgroundColor.
|
void |
setCurrentPoint(Point p)
Sets the current Point to the specified Point.
|
void |
setCurrentTextColor(Color currentTextColor)
Setter for property currentTextColor.
|
void |
setExtentWx(int extentWx)
Sets the Wx extent value.
|
void |
setExtentWy(int extentWy)
Sets the Wy extent value.
|
void |
setLineJoinPolygon(PdfCanvas cb)
Sets the line join style to PdfCanvasConstants.LineJoinStyle.ROUND if lineJoin is 0.
|
void |
setLineJoinRectangle(PdfCanvas cb)
Sets the line join style to PdfCanvasConstants.LineJoinStyle.MITER if lineJoin isn't 0.
|
void |
setMetaState(MetaState state)
Sets every field of this MetaState to the values of the fields of the specified MetaState.
|
void |
setOffsetWx(int offsetWx)
Sets the Wx offset value.
|
void |
setOffsetWy(int offsetWy)
Sets the Wy offset value.
|
void |
setPolyFillMode(int polyFillMode)
Setter for property polyFillMode.
|
void |
setScalingX(float scalingX)
Sets the x value for scaling.
|
void |
setScalingY(float scalingY)
Sets the y value for scaling.
|
void |
setTextAlign(int textAlign)
Setter for property textAlign.
|
float |
transformAngle(float angle)
Transforms the specified angle.
|
float |
transformX(int x)
Transform the specified value.
|
float |
transformY(int y)
Transform the specified value.
|
public static final int TA_NOUPDATECP
public static final int TA_UPDATECP
public static final int TA_LEFT
public static final int TA_RIGHT
public static final int TA_CENTER
public static final int TA_TOP
public static final int TA_BOTTOM
public static final int TA_BASELINE
public static final int TRANSPARENT
public static final int OPAQUE
public static final int ALTERNATE
public static final int WINDING
public List<MetaObject> MetaObjects
public Point currentPoint
public MetaPen currentPen
public MetaBrush currentBrush
public MetaFont currentFont
public Color currentBackgroundColor
public Color currentTextColor
public int backgroundMode
public int polyFillMode
public int lineJoin
public int textAlign
public int offsetWx
public int offsetWy
public int extentWx
public int extentWy
public float scalingX
public float scalingY
public MetaState()
public MetaState(MetaState state)
state
- the state to clone
public void setMetaState(MetaState state)
state
- state to copy
public void addMetaObject(MetaObject object)
object
- MetaObject to be added
public void selectMetaObject(int index, PdfCanvas cb)
index
- position of the MetaObject
cb
- PdfCanvas to prepare
public void deleteMetaObject(int index)
index
- index of the MetaObject to delete
public void saveState(PdfCanvas cb)
cb
- PdfCanvas object on which saveState() will be called
public void restoreState(int index, PdfCanvas cb)
index
- index of the state to be restored
cb
- PdfCanvas object on which restoreState() will be called
public void cleanup(PdfCanvas cb)
cb
- PdfCanvas object
public float transformX(int x)
x
- the value to transform
public float transformY(int y)
y
- the value to transform
public void setScalingX(float scalingX)
scalingX
- x value for scaling
public void setScalingY(float scalingY)
scalingY
- y value for scaling
public void setOffsetWx(int offsetWx)
offsetWx
- Wx offset value
public void setOffsetWy(int offsetWy)
offsetWy
- Wy offset value
public void setExtentWx(int extentWx)
extentWx
- Wx extent value
public void setExtentWy(int extentWy)
extentWy
- Wy extent value
public float transformAngle(float angle)
angle
- the angle to transform
public void setCurrentPoint(Point p)
p
- Point to set
public Point getCurrentPoint()
public MetaBrush getCurrentBrush()
public MetaPen getCurrentPen()
public MetaFont getCurrentFont()
public Color getCurrentBackgroundColor()
public void setCurrentBackgroundColor(Color currentBackgroundColor)
currentBackgroundColor
- New value of property currentBackgroundColor.
public Color getCurrentTextColor()
public void setCurrentTextColor(Color currentTextColor)
currentTextColor
- New value of property currentTextColor.
public int getBackgroundMode()
public void setBackgroundMode(int backgroundMode)
backgroundMode
- New value of property backgroundMode.
public int getTextAlign()
public void setTextAlign(int textAlign)
textAlign
- New value of property textAlign.
public int getPolyFillMode()
public void setPolyFillMode(int polyFillMode)
polyFillMode
- New value of property polyFillMode.
public void setLineJoinRectangle(PdfCanvas cb)
PdfCanvasConstants.LineJoinStyle.MITER
if lineJoin isn't 0.
cb
- PdfCanvas to set the line join style
public void setLineJoinPolygon(PdfCanvas cb)
PdfCanvasConstants.LineJoinStyle.ROUND
if lineJoin is 0.
cb
- PdfCanvas to set the line join style
public boolean getLineNeutral()
Copyright © 1998–2017 iText Group NV. All rights reserved.