Class MetaState
Class to keep the state.
public class MetaState
- Inheritance
-
MetaState
- Inherited Members
Constructors
MetaState()
Creates new MetaState
public MetaState()
MetaState(MetaState)
Clones a new MetaState from the specified MetaState.
public MetaState(MetaState state)
Parameters
state
MetaStatethe state to clone
Fields
ALTERNATE
public const int ALTERNATE = 1
Field Value
MetaObjects
List of MetaObjects.
public IList<MetaObject> MetaObjects
Field Value
OPAQUE
public const int OPAQUE = 2
Field Value
TA_BASELINE
public const int TA_BASELINE = 24
Field Value
TA_BOTTOM
public const int TA_BOTTOM = 8
Field Value
TA_CENTER
public const int TA_CENTER = 6
Field Value
TA_LEFT
public const int TA_LEFT = 0
Field Value
TA_NOUPDATECP
public const int TA_NOUPDATECP = 0
Field Value
TA_RIGHT
public const int TA_RIGHT = 2
Field Value
TA_TOP
public const int TA_TOP = 0
Field Value
TA_UPDATECP
public const int TA_UPDATECP = 1
Field Value
TRANSPARENT
public const int TRANSPARENT = 1
Field Value
WINDING
public const int WINDING = 2
Field Value
backgroundMode
The current background mode.
public int backgroundMode
Field Value
Remarks
The current background mode. Default value is OPAQUE.
currentBackgroundColor
The current background color.
public Color currentBackgroundColor
Field Value
Remarks
The current background color. Default value is DeviceRgb#WHITE.
currentBrush
Current Brush.
public MetaBrush currentBrush
Field Value
currentFont
Current Font.
public MetaFont currentFont
Field Value
currentPen
Current Pen.
public MetaPen currentPen
Field Value
currentPoint
Current Point.
public Point currentPoint
Field Value
currentTextColor
Current text color.
public Color currentTextColor
Field Value
Remarks
Current text color. Default value is DeviceRgb#BLACK.
extentWx
Current extent for Wx.
public int extentWx
Field Value
extentWy
Current extent for Wy.
public int extentWy
Field Value
lineJoin
Curent line join.
public int lineJoin
Field Value
Remarks
Curent line join. Default value is 1.
offsetWx
Current offset for Wx.
public int offsetWx
Field Value
offsetWy
Current offset for Wy.
public int offsetWy
Field Value
polyFillMode
Current polygon fill mode.
public int polyFillMode
Field Value
Remarks
Current polygon fill mode. Default value is ALTERNATE.
savedStates
Stack of saved states.
public Stack<MetaState> savedStates
Field Value
scalingX
Current x value for scaling.
public float scalingX
Field Value
scalingY
Current y value for scaling.
public float scalingY
Field Value
textAlign
Current text alignment.
public int textAlign
Field Value
Methods
AddMetaObject(MetaObject)
Add a MetaObject to the State.
public virtual void AddMetaObject(MetaObject @object)
Parameters
object
MetaObjectMetaObject to be added
Cleanup(PdfCanvas)
Restres the state of the specified PdfCanvas object for as many times as there are saved states on the stack.
public virtual void Cleanup(PdfCanvas cb)
Parameters
cb
PdfCanvasPdfCanvas object
DeleteMetaObject(int)
Deletes the MetaObject at the specified index.
public virtual void DeleteMetaObject(int index)
Parameters
index
intindex of the MetaObject to delete
GetBackgroundMode()
Getter for property backgroundMode.
public virtual int GetBackgroundMode()
Returns
- int
Value of property backgroundMode.
GetCurrentBackgroundColor()
Getter for property currentBackgroundColor.
public virtual Color GetCurrentBackgroundColor()
Returns
- Color
Value of property currentBackgroundColor.
GetCurrentBrush()
Returns the current MetaBrush object.
public virtual MetaBrush GetCurrentBrush()
Returns
- MetaBrush
current MetaBrush
GetCurrentFont()
Returns the current MetaFont object.
public virtual MetaFont GetCurrentFont()
Returns
- MetaFont
current MetaFont
GetCurrentPen()
Returns the current MetaPen object.
public virtual MetaPen GetCurrentPen()
Returns
- MetaPen
current MetaPen
GetCurrentPoint()
Returns the current Point.
public virtual Point GetCurrentPoint()
Returns
- Point
current Point
GetCurrentTextColor()
Getter for property currentTextColor.
public virtual Color GetCurrentTextColor()
Returns
- Color
Value of property currentTextColor.
GetLineNeutral()
Returns true if lineJoin is 0.
public virtual bool GetLineNeutral()
Returns
- bool
true if lineJoin is 0
GetPolyFillMode()
Getter for property polyFillMode.
public virtual int GetPolyFillMode()
Returns
- int
Value of property polyFillMode.
GetTextAlign()
Getter for property textAlign.
public virtual int GetTextAlign()
Returns
- int
Value of property textAlign.
RestoreState(int, PdfCanvas)
Restores the state to the next state on the saved states stack.
public virtual void RestoreState(int index, PdfCanvas cb)
Parameters
index
intindex of the state to be restored
cb
PdfCanvasPdfCanvas object on which restoreState() will be called
SaveState(PdfCanvas)
Saves the state of this MetaState object.
public virtual void SaveState(PdfCanvas cb)
Parameters
cb
PdfCanvasPdfCanvas object on which saveState() will be called
SelectMetaObject(int, PdfCanvas)
Select the MetaObject at the specified index and prepare the PdfCanvas.
public virtual void SelectMetaObject(int index, PdfCanvas cb)
Parameters
SetBackgroundMode(int)
Setter for property backgroundMode.
public virtual void SetBackgroundMode(int backgroundMode)
Parameters
backgroundMode
intNew value of property backgroundMode.
SetCurrentBackgroundColor(Color)
Setter for property currentBackgroundColor.
public virtual void SetCurrentBackgroundColor(Color currentBackgroundColor)
Parameters
currentBackgroundColor
ColorNew value of property currentBackgroundColor.
SetCurrentPoint(Point)
Sets the current Point to the specified Point.
public virtual void SetCurrentPoint(Point p)
Parameters
p
PointPoint to set
SetCurrentTextColor(Color)
Setter for property currentTextColor.
public virtual void SetCurrentTextColor(Color currentTextColor)
Parameters
currentTextColor
ColorNew value of property currentTextColor.
SetExtentWx(int)
Sets the Wx extent value.
public virtual void SetExtentWx(int extentWx)
Parameters
extentWx
intWx extent value
SetExtentWy(int)
Sets the Wy extent value.
public virtual void SetExtentWy(int extentWy)
Parameters
extentWy
intWy extent value
SetLineJoinPolygon(PdfCanvas)
Sets the line join style to ROUND if lineJoin is 0.
public virtual void SetLineJoinPolygon(PdfCanvas cb)
Parameters
cb
PdfCanvasPdfCanvas to set the line join style
SetLineJoinRectangle(PdfCanvas)
Sets the line join style to MITER if lineJoin isn't 0.
public virtual void SetLineJoinRectangle(PdfCanvas cb)
Parameters
cb
PdfCanvasPdfCanvas to set the line join style
SetMetaState(MetaState)
Sets every field of this MetaState to the values of the fields of the specified MetaState.
public virtual void SetMetaState(MetaState state)
Parameters
state
MetaStatestate to copy
SetOffsetWx(int)
Sets the Wx offset value.
public virtual void SetOffsetWx(int offsetWx)
Parameters
offsetWx
intWx offset value
SetOffsetWy(int)
Sets the Wy offset value.
public virtual void SetOffsetWy(int offsetWy)
Parameters
offsetWy
intWy offset value
SetPolyFillMode(int)
Setter for property polyFillMode.
public virtual void SetPolyFillMode(int polyFillMode)
Parameters
polyFillMode
intNew value of property polyFillMode.
SetScalingX(float)
Sets the x value for scaling.
public virtual void SetScalingX(float scalingX)
Parameters
scalingX
floatx value for scaling
SetScalingY(float)
Sets the y value for scaling.
public virtual void SetScalingY(float scalingY)
Parameters
scalingY
floaty value for scaling
SetTextAlign(int)
Setter for property textAlign.
public virtual void SetTextAlign(int textAlign)
Parameters
textAlign
intNew value of property textAlign.
TransformAngle(float)
Transforms the specified angle.
public virtual float TransformAngle(float angle)
Parameters
angle
floatthe angle to transform
Returns
- float
the transformed angle
Remarks
Transforms the specified angle. If scalingY is less than 0, the angle is multiplied by -1. If scalingX is less than 0, the angle is subtracted from Math.PI.
TransformX(int)
Transform the specified value.
public virtual float TransformX(int x)
Parameters
x
intthe value to transform
Returns
- float
the transformed value
TransformY(int)
Transform the specified value.
public virtual float TransformY(int y)
Parameters
y
intthe value to transform
Returns
- float
transformed value