PdfSharp-WPF  1.31.7289
PdfSharp.Drawing.Layout.XTextFormatter Class Reference

Represents a very simple text formatter. If this class does not satisfy your needs on formatting paragraphs I recommend to take a look at MigraDoc Foundation. Alternatively you should copy this class in your own source code and modify it. More...

Public Member Functions

 XTextFormatter (XGraphics gfx)
 Initializes a new instance of the XTextFormatter class. More...
 
void DrawString (string text, XFont font, XBrush brush, XRect layoutRectangle)
 Draws the text. More...
 
void DrawString (string text, XFont font, XBrush brush, XRect layoutRectangle, XStringFormat format)
 Draws the text. More...
 

Properties

string Text [get, set]
 Gets or sets the text. More...
 
XFont Font [get, set]
 Gets or sets the font. More...
 
XRect LayoutRectangle [get, set]
 Gets or sets the bounding box of the layout. More...
 
XParagraphAlignment Alignment [get, set]
 Gets or sets the alignment of the text. More...
 

Detailed Description

Represents a very simple text formatter. If this class does not satisfy your needs on formatting paragraphs I recommend to take a look at MigraDoc Foundation. Alternatively you should copy this class in your own source code and modify it.

Constructor & Destructor Documentation

◆ XTextFormatter()

PdfSharp.Drawing.Layout.XTextFormatter.XTextFormatter ( XGraphics  gfx)

Initializes a new instance of the XTextFormatter class.

Member Function Documentation

◆ DrawString() [1/2]

void PdfSharp.Drawing.Layout.XTextFormatter.DrawString ( string  text,
XFont  font,
XBrush  brush,
XRect  layoutRectangle 
)

Draws the text.

Parameters
textThe text to be drawn.
fontThe font.
brushThe text brush.
layoutRectangleThe layout rectangle.

◆ DrawString() [2/2]

void PdfSharp.Drawing.Layout.XTextFormatter.DrawString ( string  text,
XFont  font,
XBrush  brush,
XRect  layoutRectangle,
XStringFormat  format 
)

Draws the text.

Parameters
textThe text to be drawn.
fontThe font.
brushThe text brush.
layoutRectangleThe layout rectangle.
formatThe format. Must be XStringFormat.TopLeft

Property Documentation

◆ Alignment

XParagraphAlignment PdfSharp.Drawing.Layout.XTextFormatter.Alignment
getset

Gets or sets the alignment of the text.

◆ Font

XFont PdfSharp.Drawing.Layout.XTextFormatter.Font
getset

Gets or sets the font.

◆ LayoutRectangle

XRect PdfSharp.Drawing.Layout.XTextFormatter.LayoutRectangle
getset

Gets or sets the bounding box of the layout.

◆ Text

string PdfSharp.Drawing.Layout.XTextFormatter.Text
getset

Gets or sets the text.

The text.


The documentation for this class was generated from the following file: