Class ContentStream
Stream of PDF commands (contents of a page).
Inheritance
Inherited Members
Namespace: Codecrete.SwissQRBill.Generator.PDF
Assembly: Codecrete.SwissQRBill.Core.dll
Syntax
public class ContentStream
Methods
| Improve this Doc View SourceAddRect(Single, Single, Single, Single)
Adds a closed rectangle to the current path.
Declaration
public void AddRect(float x, float y, float width, float height)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | x-coordinate |
System.Single | y | y-coordinate |
System.Single | width | The width. |
System.Single | height | The height. |
BeginText()
Begins a text object.
Declaration
public void BeginText()
CloseAndFillAndStroke()
Closes, fills and strokes the current path using the non-zero winding rule.
Declaration
public void CloseAndFillAndStroke()
CloseAndFillEvenOddAndStroke()
Closes, fills and strokes the current path using the even-odd rule.
Declaration
public void CloseAndFillEvenOddAndStroke()
CloseAndStroke()
Closes and strokes the current path.
Declaration
public void CloseAndStroke()
ClosePath()
Closes the current path.
Declaration
public void ClosePath()
CurveTo(Single, Single, Single, Single, Single, Single)
Adds a bezier curve to the current path.
Declaration
public void CurveTo(float x1, float y1, float x2, float y2, float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x1 | x-coordinate of control point 1 |
System.Single | y1 | y-coordinate of control point 1 |
System.Single | x2 | x-coordinate of control point 2 |
System.Single | y2 | y-coordinate of control point 2 |
System.Single | x | x-coordinate |
System.Single | y | y-coordinate |
EndText()
Ends a text object.
Declaration
public void EndText()
Fill()
Fills the current path using the non-zero winding rule.
Declaration
public void Fill()
FillAndStroke()
Fills and strokes the current path using the non-zero winding rule.
Declaration
public void FillAndStroke()
FillEvenOdd()
Closes the current path using the even-odd rule.
Declaration
public void FillEvenOdd()
FillEvenOddAndStroke()
Closes and strokes the current path using the even-odd rule.
Declaration
public void FillEvenOddAndStroke()
LineTo(Single, Single)
Adds a straight line to the current path.
Declaration
public void LineTo(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | x-coordinate |
System.Single | y | y-coordinate |
MoveTo(Single, Single)
Moves the current point of the current path.
Declaration
public void MoveTo(float x, float y)
Parameters
Type | Name | Description |
---|---|---|
System.Single | x | x-coordinate |
System.Single | y | y-coordinate |
NewLineAtOffset(Single, Single)
Moves to the next line, offset by the specified distance from the current one.
Declaration
public void NewLineAtOffset(float tx, float ty)
Parameters
Type | Name | Description |
---|---|---|
System.Single | tx | x-distance |
System.Single | ty | y-distance |
RestoreGraphicsState()
Restores the graphics state.
Declaration
public void RestoreGraphicsState()
SaveGraphicsState()
Saves the graphics state.
Declaration
public void SaveGraphicsState()
SetFont(Font, Single)
Sets the current font.
Declaration
public void SetFont(Font font, float fontSize)
Parameters
Type | Name | Description |
---|---|---|
Font | font | the font. |
System.Single | fontSize | The font size. |
SetLineCapStyle(Int32)
Sets the line cap style.
Declaration
public void SetLineCapStyle(int style)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | style | Line cap style (see PDF reference). |
SetLineDashPattern(Single[], Single)
Sets the line dash pattern.
Declaration
public void SetLineDashPattern(float[] pattern, float offset)
Parameters
Type | Name | Description |
---|---|---|
System.Single[] | pattern | Array of on and off length. |
System.Single | offset | Offset to first on element. |
SetLineWidth(Single)
Sets the line width.
Declaration
public void SetLineWidth(float width)
Parameters
Type | Name | Description |
---|---|---|
System.Single | width | Line width, in point. |
SetNonStrokingColor(Single, Single, Single)
Sets the non-stroking color.
Declaration
public void SetNonStrokingColor(float red, float green, float blue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | red | Red color component (between 0.0 and 1.0) |
System.Single | green | Green color component (between 0.0 and 1.0) |
System.Single | blue | Blue Color component (between 0.0 and 1.0) |
SetStrokingColor(Single, Single, Single)
Sets the stroking color.
Declaration
public void SetStrokingColor(float red, float green, float blue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | red | Red color component (between 0.0 and 1.0) |
System.Single | green | Green color component (between 0.0 and 1.0) |
System.Single | blue | Blue Color component (between 0.0 and 1.0) |
ShowText(String)
Add the specified text to the curren text object.
Declaration
public void ShowText(string text)
Parameters
Type | Name | Description |
---|---|---|
System.String | text | The text. |
Stroke()
Stores the current path.
Declaration
public void Stroke()
Transform(TransformationMatrix)
Sets the transformation matrix.
Declaration
public void Transform(TransformationMatrix matrix)
Parameters
Type | Name | Description |
---|---|---|
TransformationMatrix | matrix | The transformation matrix. |