Opait PDF Library
|
PdfPainter composes a PDF page content stream by printing PDF commands. More...
Public Member Functions | |
void | Dispose () |
byte[] | GetContent () |
Gets the content of the page as a byte array. More... | |
void | SetContent (byte[] content) |
Sets the content of the page from the specified byte array. More... | |
void | ClearContent () |
Clears the existing content. | |
void | AppendContent (byte[] content) |
Appends the specified content to the end of current content. More... | |
void | AppendContent (PdfPage page) |
Appends the content of the specified page to this page. More... | |
void | SetContentStream (MemoryStream content) |
Replaces the content stream with the specified stream. More... | |
long | SeekEnd () |
Goes to the end of the content stream for appends. More... | |
void | EndPath () |
End path without filling or stroking ('n'). | |
void | ClosePath () |
Close path (h). | |
void | Fill () |
Fill path (f). | |
void | Stroke () |
Stroke path (S). | |
void | CloseStroke () |
Close and stroke path (s). | |
void | FillStroke () |
Fill and stroke path (B). | |
void | CloseFillStroke () |
Close, fill, and stroke path (b). | |
void | SetGray (double g) |
Set gray level for non-stroking operations (g). More... | |
void | SetStrokeGray (double g) |
Set gray level for stroking operations (G). More... | |
void | SetColor (double r, double g, double b) |
Set RGB color for non-stroking operations (rg). More... | |
void | SetStrokeColor (double r, double g, double b) |
Set RGB color for stroking operations (RG) More... | |
void | SetColor (Color c) |
Set RGB color for non-stroking operations (rg) More... | |
void | SetStrokeColor (Color c) |
Set RGB color for stroking operations (RG). More... | |
void | SetAlpha (double alpha) |
Set opacity value for non-stroking operations More... | |
void | SetStrokeAlpha (double alpha) |
Set opacity value for stroking operations More... | |
void | SetBlendMode (BlendMode blend) |
Set color blending mode. More... | |
void | SetCmyk (double c, double m, double y, double k) |
Set CMYK color for non-stroking operations (rg). More... | |
void | SetStrokeCmyk (double c, double m, double y, double k) |
Set CMYK color for stroking operations (RG). More... | |
void | SetFillStrokeColor (Color c) |
Set RGB color for both filling and stroking operations. More... | |
void | SetFillStrokeGray (double g) |
Set gray level both fill and stroke operations. More... | |
void | SetFillStrokeColor (double r, double g, double b) |
Set RGB color for both fill and stroke operations. More... | |
void | SetFillStrokeCmyk (double c, double m, double y, double k) |
Set CMYK color for both fill and stroke operations. More... | |
void | MoveTo (double x, double y) |
Begin new sub-path (m) More... | |
void | MoveTo (PdfPoint pt) |
Begin new sub-path (m) More... | |
void | MoveToPolar (PdfPoint center, double radius, double alpha) |
Begin a new sub-path starting from a point on a circle. More... | |
void | MoveToPolar (double radius, double alpha) |
Begin a new sub-path starting from a point on a circle with the center at the origin. More... | |
void | LineTo (double x, double y) |
Append a straight line segment to the current sub-path (l). More... | |
void | LineTo (PdfPoint pt) |
Append a straight line segment to the current sub-path (l). More... | |
void | LineToPolar (PdfPoint center, double radius, double alpha) |
Append a straight line to the current sub-path with endpoint on a circle. More... | |
void | LineToPolar (double radius, double alpha) |
Append a straight line to the current sub-path with endpoint on a circle about the origin. More... | |
void | Polygon (PdfPoint[] points) |
Adds a polygon defined by an array of points to the current graphics path. More... | |
void | Rectangle (double x, double y, double width, double height) |
Append a rectangle to the current path as a complete subpath (re). More... | |
void | Rectangle (PdfRectangle rc) |
Append a rectangle to the current path as a complete sub-path (re). More... | |
void | CurveTo (double x1, double y1, double x2, double y2, double x3, double y3) |
Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points (c or y). More... | |
void | CurveTo (double x2, double y2, double x3, double y3) |
Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points (v). More... | |
void | Circle (double x, double y, double radius) |
Appends a circle to the current path, given its center and radius. More... | |
void | Ellipse (double x, double y, double a, double b) |
Appends an ellipse to the current path, given its center and radii. More... | |
void | Ellipse (PdfRectangle rc) |
Appends an ellipse to the current path, given its bounding rectangle. More... | |
void | ArcTo (double x, double y, double radius, double angleFrom, double angleTo) |
Appends a circular arc to the current path, given a center, a radius and delimited by two angles measured in degrees, counter-clockwise. More... | |
void | DrawCurve (PdfPoint[] points, double tension=0.5) |
Draws a cardinal spline through a specified array of Point structures. More... | |
void | DrawClosedCurve (PdfPoint[] points, double tension=0.5) |
Draws a closed cardinal spline through a specified array of Point structures. More... | |
void | DrawImage (PdfImagePage image) |
Draws an image. More... | |
void | DrawImage (PdfImagePage image, PdfMatrix m) |
Draws an image after applying given transformation matrix More... | |
void | FitImage (PdfImagePage image) |
Scale and draw an image to cover a frame or the canvas. More... | |
void | FitImage (PdfImagePage image, PdfRectangle rect) |
Scale and draw an image to cover a frame or the canvas. More... | |
void | Concat (PdfMatrix m) |
Concatenates with the current transformation matrix (cm). More... | |
void | Save () |
Saves the graphics state (q) | |
void | Restore () |
Restores the graphics state (Q) | |
void | Transform (double scaleX, double scaleY, double translateX, double translateY, double angle) |
Scale, translate and rotate the coordinates. More... | |
void | Scale (double sx, double sy) |
Scales the coordinates in x and y directions. More... | |
void | Translate (double x, double y) |
Translates the coordinates. More... | |
void | Translate (PdfPoint point) |
Translates the coordinates. More... | |
void | Rotate (double angle) |
Rotates the coordinates. More... | |
void | Rotate (double x, double y, double angle) |
Translate, then rotate the coordinates. More... | |
void | Rotate (PdfPoint pt, double angle) |
Translate, then rotate the coordinates. More... | |
void | ClipPath () |
Modify the current clipping path by intersecting it with the current path. | |
void | SetLineWidth (double width) |
Set the line width in the graphics state (w) More... | |
void | SetLineSolid () |
Resets a previous dash pattern to solid line. | |
void | SetLineDash (int dash, int gap=0, int phase=0) |
Sets dash and gap pattern (d). More... | |
void | SetLineDash (string pattern, int phase=0) |
Sets user defined array of dashes and gaps. The pattern must be enclosed in square brackets (e.g. '[3 1 1 1]' for a dash-dot pattern). More... | |
void | SetLineCap (PdfLineCap cap) |
Set the line cap style in the graphics state. More... | |
void | SetLineJoin (PdfLineJoin join) |
Set the line join style in the graphics state. More... | |
void | SetMiterLimit (double miterLimit) |
Set the miter limit in the graphics state. More... | |
void | SetCharSpacing (double charSpace) |
Set the character spacing in unscaled text units (Tc). Initial value: 0. More... | |
void | SetWordSpacing (double wordSpace) |
Set the word spacing in unscaled text units (Tw). Initial value: 0. More... | |
void | SetHorzScale (double scale) |
Set the horizontal scaling. (Tz) Initial value: 100. More... | |
void | SetLeading (double leading) |
Set the text leading: the vertical distance between the baselines of adjacent lines of text. (TL) More... | |
void | SetRendering (PdfRendering value) |
Set the text rendering mode. More... | |
void | SetFont (PdfFont font, double size) |
Sets the supplied font for subsequent text output. More... | |
void | SetTextRise (double rise) |
Sets the text rise: the distance to move the baseline up or down from its default location. (Ts) More... | |
void | NextLine () |
Move to the start of the next line (T*). | |
void | NextLine (double x, double y) |
Move to the start of the next line, offset from the start of the current line by (x,y). (Td) More... | |
void | NextLineSetLeading (double x, double y) |
Same as NextLine except that it also sets the leading parameter in the text state. (TD) More... | |
void | SetTextMatrix (PdfMatrix m) |
Sets the text matrix and the text line matrix. (Tm) More... | |
void | BeginText () |
Begin text object (BT). | |
void | SetTextPos (double x, double y) |
Sets the absolute position for the next text output. More... | |
double | GetTextWidth (string text) |
Computes the width of a text string without drawing it. More... | |
void | DrawText (string text, bool newLine=false) |
Draws text either at the current location or at the start of the next line. More... | |
void | ContinueText (string text) |
Moves to the next line and draws a text string More... | |
void | DrawText (double x, double y, string text) |
Draws text at given location. More... | |
void | DrawText (double x, double y, double angle, string text) |
Draws text at specified location and rotation angle. More... | |
void | CenterText (double x, double y, double dx, string text) |
Centers text horizontally. More... | |
void | EndText () |
End text object (ET). | |
void | DrawWatermark (string text, int fontSize=80, double alpha=0.5, int rotate=45, bool stroke=false) |
Draws a diagonal watermark with default parameters. More... | |
void | DrawWatermark (string text, PdfFont font, double fontSize, Color color, double alpha=0.5, int rotate=45, bool stroke=false) |
Draws a watermark text. More... | |
void | DrawText (PdfFont font, double size, double left, double bottom, string text) |
Draws a text using the specified font. More... | |
void | CenterText (PdfFont font, double size, double left, double bottom, double width, string text) |
Centers text horizontally. The font size is dynamically adjusted to ensure that the specified text fits in the given width. More... | |
Properties | |
double | Width [get, set] |
Gets the width of the canvas in logical units. | |
double | Height [get, set] |
Gets the height of the canvas in logical units. | |
double | FontAscent [get] |
Gets the maximum ascent height. | |
double | FontDescent [get] |
Gets the maximum descent depth. | |
PdfPoint | TextPos [get] |
Gets the current text position. | |
PdfPoint | LinePos [get] |
Gets the current line position. | |
PdfPainter composes a PDF page content stream by printing PDF commands.
void Opait.Pdf.PdfPainter.AppendContent | ( | byte[] | content | ) |
Appends the specified content to the end of current content.
content | The content to append. |
void Opait.Pdf.PdfPainter.AppendContent | ( | PdfPage | page | ) |
Appends the content of the specified page to this page.
page | The PDF page whose content will be appended to this page.. |
void Opait.Pdf.PdfPainter.ArcTo | ( | double | x, |
double | y, | ||
double | radius, | ||
double | angleFrom, | ||
double | angleTo | ||
) |
Appends a circular arc to the current path, given a center, a radius and delimited by two angles measured in degrees, counter-clockwise.
x | The x-coordinate of the center. |
y | The y-coordinate of the center. |
radius | The radius of the arc. |
angleFrom | The starting angle in degrees. |
angleTo | The ending angle in degrees. |
void Opait.Pdf.PdfPainter.CenterText | ( | double | x, |
double | y, | ||
double | dx, | ||
string | text | ||
) |
Centers text horizontally.
x | The x-coordinate of drawing region. |
y | The y-coordinate of drawing region. |
dx | The width of the drawing region. |
text | The text to center between x and x + dx. |
void Opait.Pdf.PdfPainter.CenterText | ( | PdfFont | font, |
double | size, | ||
double | left, | ||
double | bottom, | ||
double | width, | ||
string | text | ||
) |
Centers text horizontally. The font size is dynamically adjusted to ensure that the specified text fits in the given width.
font | The font for drawing text. |
size | The font size in points. |
left | The left coordinate of the text in PDF units. |
width | The maximum width of the rendered text. |
bottom | The bottom coordinate of the text in PDF units. |
text | The text to draw. |
void Opait.Pdf.PdfPainter.Circle | ( | double | x, |
double | y, | ||
double | radius | ||
) |
Appends a circle to the current path, given its center and radius.
x | The x-coordinate of the center. |
y | The y-coordinate of the center. |
radius | The radius of the circle. |
void Opait.Pdf.PdfPainter.Concat | ( | PdfMatrix | m | ) |
Concatenates with the current transformation matrix (cm).
m | The transformation matrix to concatenate. |
void Opait.Pdf.PdfPainter.ContinueText | ( | string | text | ) |
Moves to the next line and draws a text string
text | The text string to draw. |
void Opait.Pdf.PdfPainter.CurveTo | ( | double | x1, |
double | y1, | ||
double | x2, | ||
double | y2, | ||
double | x3, | ||
double | y3 | ||
) |
Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points (c or y).
x1 | The x-coordinate of the first control point. |
y1 | The y-coordinate of the first control point. |
x2 | The x-coordinate of the second control point. |
y2 | The y-coordinate of the second control point. |
x3 | The x-coordinate of the end point. |
y3 | The x-coordinate of the end point. |
void Opait.Pdf.PdfPainter.CurveTo | ( | double | x2, |
double | y2, | ||
double | x3, | ||
double | y3 | ||
) |
Append a cubic Bézier curve to the current path. The curve extends from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bézier control points (v).
x2 | The x-coordinate of the second control point. |
y2 | The y-coordinate of the second control point. |
x3 | The x-coordinate of the end point. |
y3 | The x-coordinate of the end point. |
void Opait.Pdf.PdfPainter.DrawClosedCurve | ( | PdfPoint[] | points, |
double | tension = 0.5 |
||
) |
Draws a closed cardinal spline through a specified array of Point structures.
points | Control points for the Bezier curve. |
tension | The tension of the cardinal spline. |
void Opait.Pdf.PdfPainter.DrawCurve | ( | PdfPoint[] | points, |
double | tension = 0.5 |
||
) |
Draws a cardinal spline through a specified array of Point structures.
points | Control points for the Bezier curve. |
tension | The tension of the cardinal spline. |
void Opait.Pdf.PdfPainter.DrawImage | ( | PdfImagePage | image | ) |
Draws an image.
image | The image to draw. |
void Opait.Pdf.PdfPainter.DrawImage | ( | PdfImagePage | image, |
PdfMatrix | m | ||
) |
Draws an image after applying given transformation matrix
image | The image to draw. |
m | The transformation matrix to apply. |
void Opait.Pdf.PdfPainter.DrawText | ( | double | x, |
double | y, | ||
double | angle, | ||
string | text | ||
) |
Draws text at specified location and rotation angle.
x | The x-coordinate. |
y | The y-coordinate. |
angle | The angle of text in degrees. |
text | The text string to draw. |
void Opait.Pdf.PdfPainter.DrawText | ( | double | x, |
double | y, | ||
string | text | ||
) |
Draws text at given location.
x | The x-coordinate. |
y | The y-coordinate. |
text | The text string to draw. |
void Opait.Pdf.PdfPainter.DrawText | ( | PdfFont | font, |
double | size, | ||
double | left, | ||
double | bottom, | ||
string | text | ||
) |
Draws a text using the specified font.
font | The font for drawing text. |
size | The font size in points. |
left | The left coordinate of the text in PDF units. |
bottom | The bottom coordinate of the text in PDF units. |
text | The text to draw. |
void Opait.Pdf.PdfPainter.DrawText | ( | string | text, |
bool | newLine = false |
||
) |
Draws text either at the current location or at the start of the next line.
text | The text string to draw. |
newLine | If true, start the text on the next line. |
void Opait.Pdf.PdfPainter.DrawWatermark | ( | string | text, |
int | fontSize = 80 , |
||
double | alpha = 0.5 , |
||
int | rotate = 45 , |
||
bool | stroke = false |
||
) |
Draws a diagonal watermark with default parameters.
text | The text to draw. |
fontSize | The maximum font size to use. |
alpha | The transparency alpha constant [0-1] => [transparent-opaque] |
rotate | The counterclockwise rotation about the center of the page. |
stroke | If true, stoke the text, otherwise fill. |
void Opait.Pdf.PdfPainter.DrawWatermark | ( | string | text, |
PdfFont | font, | ||
double | fontSize, | ||
Color | color, | ||
double | alpha = 0.5 , |
||
int | rotate = 45 , |
||
bool | stroke = false |
||
) |
Draws a watermark text.
text | The text to draw. |
font | The font to use. |
fontSize | The maximum font size to use. |
color | The color of the watermark. |
alpha | The transparency alpha constant [0-1] => [transparent-opaque] |
rotate | The counterclockwise rotation about the center of the page. |
stroke | If true, stoke the text, otherwise fill. |
void Opait.Pdf.PdfPainter.Ellipse | ( | double | x, |
double | y, | ||
double | a, | ||
double | b | ||
) |
Appends an ellipse to the current path, given its center and radii.
x | The x-coordinate of the center. |
y | The y-coordinate of the center. |
a | The distance from center point to the right edge. |
b | The distance from the center to the top edge. |
void Opait.Pdf.PdfPainter.Ellipse | ( | PdfRectangle | rc | ) |
Appends an ellipse to the current path, given its bounding rectangle.
rc | The rectangle that defines the ellipse. |
void Opait.Pdf.PdfPainter.FitImage | ( | PdfImagePage | image | ) |
Scale and draw an image to cover a frame or the canvas.
image | The image to draw. |
void Opait.Pdf.PdfPainter.FitImage | ( | PdfImagePage | image, |
PdfRectangle | rect | ||
) |
Scale and draw an image to cover a frame or the canvas.
image | The image to draw. |
rect | The rectangle to fit the image into. |
byte[] Opait.Pdf.PdfPainter.GetContent | ( | ) |
Gets the content of the page as a byte array.
double Opait.Pdf.PdfPainter.GetTextWidth | ( | string | text | ) |
Computes the width of a text string without drawing it.
text | The text string to measure. |
void Opait.Pdf.PdfPainter.LineTo | ( | double | x, |
double | y | ||
) |
Append a straight line segment to the current sub-path (l).
x | The x-coordinate of the ending point. |
y | The y-coordinate of the ending point. |
void Opait.Pdf.PdfPainter.LineTo | ( | PdfPoint | pt | ) |
Append a straight line segment to the current sub-path (l).
pt | The ending point of the line. |
void Opait.Pdf.PdfPainter.LineToPolar | ( | double | radius, |
double | alpha | ||
) |
Append a straight line to the current sub-path with endpoint on a circle about the origin.
radius | Radius of the circle. |
alpha | Angle between vertical axis and a line from the point to the origin. |
void Opait.Pdf.PdfPainter.LineToPolar | ( | PdfPoint | center, |
double | radius, | ||
double | alpha | ||
) |
Append a straight line to the current sub-path with endpoint on a circle.
center | Center point of the circle. |
radius | Radius of the circle. |
alpha | Angle between vertical axis and a line from the point to the origin. |
void Opait.Pdf.PdfPainter.MoveTo | ( | double | x, |
double | y | ||
) |
Begin new sub-path (m)
x | The starting x-coordinate. |
y | The starting y-coordinate. |
void Opait.Pdf.PdfPainter.MoveTo | ( | PdfPoint | pt | ) |
Begin new sub-path (m)
pt | The starting point. |
void Opait.Pdf.PdfPainter.MoveToPolar | ( | double | radius, |
double | alpha | ||
) |
Begin a new sub-path starting from a point on a circle with the center at the origin.
radius | Radius of the circle. |
alpha | Angle between vertical axis and a line from the point to the origin. |
void Opait.Pdf.PdfPainter.MoveToPolar | ( | PdfPoint | center, |
double | radius, | ||
double | alpha | ||
) |
Begin a new sub-path starting from a point on a circle.
center | Center point of the circle. |
radius | Radius of the circle. |
alpha | Angle between vertical axis and a line from the point to the origin. |
void Opait.Pdf.PdfPainter.NextLine | ( | double | x, |
double | y | ||
) |
Move to the start of the next line, offset from the start of the current line by (x,y). (Td)
x | The x-offset. |
y | The y-offset. |
void Opait.Pdf.PdfPainter.NextLineSetLeading | ( | double | x, |
double | y | ||
) |
Same as NextLine except that it also sets the leading parameter in the text state. (TD)
x | The x-offset. |
y | The y-offset. |
void Opait.Pdf.PdfPainter.Polygon | ( | PdfPoint[] | points | ) |
Adds a polygon defined by an array of points to the current graphics path.
points | Set of the points on the polygon. |
void Opait.Pdf.PdfPainter.Rectangle | ( | double | x, |
double | y, | ||
double | width, | ||
double | height | ||
) |
Append a rectangle to the current path as a complete subpath (re).
x | The left coordinate. |
y | The bottom coordinate. |
width | The width of the rectangle. |
height | The height of the rectangle. |
void Opait.Pdf.PdfPainter.Rectangle | ( | PdfRectangle | rc | ) |
Append a rectangle to the current path as a complete sub-path (re).
rc | The PdfRect to append. |
void Opait.Pdf.PdfPainter.Rotate | ( | double | angle | ) |
Rotates the coordinates.
angle | The angle of rotation. |
void Opait.Pdf.PdfPainter.Rotate | ( | double | x, |
double | y, | ||
double | angle | ||
) |
Translate, then rotate the coordinates.
x | The horizontal displacement. |
y | The vertical displacement. |
angle | The rotation angle. |
void Opait.Pdf.PdfPainter.Rotate | ( | PdfPoint | pt, |
double | angle | ||
) |
Translate, then rotate the coordinates.
pt | The displacement vector. |
angle | The rotation angle. |
void Opait.Pdf.PdfPainter.Scale | ( | double | sx, |
double | sy | ||
) |
Scales the coordinates in x and y directions.
sx | The horizontal scale factor. |
sy | The vertical scale factor. |
long Opait.Pdf.PdfPainter.SeekEnd | ( | ) |
Goes to the end of the content stream for appends.
void Opait.Pdf.PdfPainter.SetAlpha | ( | double | alpha | ) |
Set opacity value for non-stroking operations
alpha | Opacity value [0-1] => [transparent, opaque] |
void Opait.Pdf.PdfPainter.SetBlendMode | ( | BlendMode | blend | ) |
Set color blending mode.
blend | Enumerated blending methods. |
void Opait.Pdf.PdfPainter.SetCharSpacing | ( | double | charSpace | ) |
Set the character spacing in unscaled text units (Tc). Initial value: 0.
charSpace | The character spacing to set. |
void Opait.Pdf.PdfPainter.SetCmyk | ( | double | c, |
double | m, | ||
double | y, | ||
double | k | ||
) |
Set CMYK color for non-stroking operations (rg).
c | The cyan component in the range [0, 1]. |
m | The magenta component in the range [0, 1]. |
y | The yellow component in the range [0, 1]. |
k | The black component in the range [0, 1]. |
void Opait.Pdf.PdfPainter.SetColor | ( | Color | c | ) |
Set RGB color for non-stroking operations (rg)
c | The color to set. |
void Opait.Pdf.PdfPainter.SetColor | ( | double | r, |
double | g, | ||
double | b | ||
) |
Set RGB color for non-stroking operations (rg).
r | The red component in the range [0,1] |
g | The Green component in the range [0,1] |
b | The Blue component in the range [0,1] |
void Opait.Pdf.PdfPainter.SetContent | ( | byte[] | content | ) |
Sets the content of the page from the specified byte array.
content | The new content of the page. |
void Opait.Pdf.PdfPainter.SetContentStream | ( | MemoryStream | content | ) |
Replaces the content stream with the specified stream.
content | The new content stream. |
void Opait.Pdf.PdfPainter.SetFillStrokeCmyk | ( | double | c, |
double | m, | ||
double | y, | ||
double | k | ||
) |
Set CMYK color for both fill and stroke operations.
c | The cyan component in the range [0, 1]. |
m | The magenta component in the range [0, 1]. |
y | The yellow component in the range [0, 1]. |
k | The black component in the range [0, 1]. |
void Opait.Pdf.PdfPainter.SetFillStrokeColor | ( | Color | c | ) |
Set RGB color for both filling and stroking operations.
c | The color to set. |
void Opait.Pdf.PdfPainter.SetFillStrokeColor | ( | double | r, |
double | g, | ||
double | b | ||
) |
Set RGB color for both fill and stroke operations.
r | The red component in the range [0,1] |
g | The Green component in the range [0,1] |
b | The Blue component in the range [0,1] |
void Opait.Pdf.PdfPainter.SetFillStrokeGray | ( | double | g | ) |
Set gray level both fill and stroke operations.
g | The gray component in the range [0,1]. |
void Opait.Pdf.PdfPainter.SetFont | ( | PdfFont | font, |
double | size | ||
) |
Sets the supplied font for subsequent text output.
font | The font to set. |
size | The size of the font in points. |
void Opait.Pdf.PdfPainter.SetGray | ( | double | g | ) |
Set gray level for non-stroking operations (g).
g | The gray level between 0 and 1. |
void Opait.Pdf.PdfPainter.SetHorzScale | ( | double | scale | ) |
Set the horizontal scaling. (Tz) Initial value: 100.
scale | The horizontal scaling factor. |
void Opait.Pdf.PdfPainter.SetLeading | ( | double | leading | ) |
Set the text leading: the vertical distance between the baselines of adjacent lines of text. (TL)
leading | The text leading to set. |
Setting a new font size will reset the text leading to a default value for single spaced lines. For custom line spacing, set the text leading after the font size.
void Opait.Pdf.PdfPainter.SetLineCap | ( | PdfLineCap | cap | ) |
Set the line cap style in the graphics state.
cap | The PdfLineCap style to set. |
void Opait.Pdf.PdfPainter.SetLineDash | ( | int | dash, |
int | gap = 0 , |
||
int | phase = 0 |
||
) |
Sets dash and gap pattern (d).
The line dash pattern controls the pattern of dashes and gaps used to stroke paths. It is specified by a dash array and a dash phase. The dash array’s elements are numbers that specify the lengths of alternating dashes and gaps; the numbers must be nonnegative and not all zero. The dash phase specifies the distance into the dash pattern at which to start the dash.The elements of both the dash array and the dash phase are expressed in user space units.
dash | The dash length. |
gap | The gap length, 0 means same as the dash length. |
phase | The dash phase. |
void Opait.Pdf.PdfPainter.SetLineDash | ( | string | pattern, |
int | phase = 0 |
||
) |
Sets user defined array of dashes and gaps. The pattern must be enclosed in square brackets (e.g. '[3 1 1 1]' for a dash-dot pattern).
pattern | The dash gap pattern. |
phase | The dash phase. |
void Opait.Pdf.PdfPainter.SetLineJoin | ( | PdfLineJoin | join | ) |
Set the line join style in the graphics state.
join | The PdfLineJoin style to set. |
void Opait.Pdf.PdfPainter.SetLineWidth | ( | double | width | ) |
Set the line width in the graphics state (w)
width | The line width. |
void Opait.Pdf.PdfPainter.SetMiterLimit | ( | double | miterLimit | ) |
Set the miter limit in the graphics state.
miterLimit | The miter limit to set. |
void Opait.Pdf.PdfPainter.SetRendering | ( | PdfRendering | value | ) |
Set the text rendering mode.
value | The PdfRendering mode to set. |
void Opait.Pdf.PdfPainter.SetStrokeAlpha | ( | double | alpha | ) |
Set opacity value for stroking operations
alpha | Opacity value [0-1] => [transparent, opaque] |
void Opait.Pdf.PdfPainter.SetStrokeCmyk | ( | double | c, |
double | m, | ||
double | y, | ||
double | k | ||
) |
Set CMYK color for stroking operations (RG).
c | The cyan component in the range [0, 1]. |
m | The magenta component in the range [0, 1]. |
y | The yellow component in the range [0, 1]. |
k | The black component in the range [0, 1]. |
void Opait.Pdf.PdfPainter.SetStrokeColor | ( | Color | c | ) |
Set RGB color for stroking operations (RG).
c | The color to set. |
void Opait.Pdf.PdfPainter.SetStrokeColor | ( | double | r, |
double | g, | ||
double | b | ||
) |
Set RGB color for stroking operations (RG)
r | The red component in the range [0,1] |
g | The Green component in the range [0,1] |
b | The Blue component in the range [0,1] |
void Opait.Pdf.PdfPainter.SetStrokeGray | ( | double | g | ) |
Set gray level for stroking operations (G).
g | The gray level between 0 and 1. |
void Opait.Pdf.PdfPainter.SetTextMatrix | ( | PdfMatrix | m | ) |
Sets the text matrix and the text line matrix. (Tm)
m | The text matrix to set. |
void Opait.Pdf.PdfPainter.SetTextPos | ( | double | x, |
double | y | ||
) |
Sets the absolute position for the next text output.
x | The x-coordinate. |
y | The y-coordinate. |
void Opait.Pdf.PdfPainter.SetTextRise | ( | double | rise | ) |
Sets the text rise: the distance to move the baseline up or down from its default location. (Ts)
rise | The text rise to set. |
void Opait.Pdf.PdfPainter.SetWordSpacing | ( | double | wordSpace | ) |
Set the word spacing in unscaled text units (Tw). Initial value: 0.
wordSpace | The word spacing to set. |
void Opait.Pdf.PdfPainter.Transform | ( | double | scaleX, |
double | scaleY, | ||
double | translateX, | ||
double | translateY, | ||
double | angle | ||
) |
Scale, translate and rotate the coordinates.
scaleX | The horizontal scale factor. |
scaleY | The vertical scale factor. |
translateX | The horizontal displacement. |
translateY | The vertical displacement. |
angle | The angle of rotation. |
void Opait.Pdf.PdfPainter.Translate | ( | double | x, |
double | y | ||
) |
Translates the coordinates.
x | The horizontal displacement. |
y | The vertical displacement. |
void Opait.Pdf.PdfPainter.Translate | ( | PdfPoint | point | ) |
Translates the coordinates.
point | The displacement point. |