As we can see in pdfsharp code, the constructor is defined as: public XRect(double x, double y, double width, double height)
.
Thinking of the two axes, X (Horizontal from left to right) and Y (Vertical from top to bottom) we have a point X,Y that is the starting point of the rectangle.
Then we have the value W (Width / Width) and H (Height / Height) which are respectively the width and height of the rectangle.
Example:
From what I could see again in pdfsharp code, this parameter is only used to calculate position and alignment of the text.
And for you to know the size that the string will occupy, you use the method MeasureString
that you inform the text, and the source and is returned an object XSize
with the width and height of the text.
usually, these values are X, Y, W, H... the last two, width and height. In the case, rectangle, not text
– Rovann Linhalis
@Rovannlinhalis this, I see the folks using this "(200,50,page.Height, page.Width)" so I believe this is really is the limit, but by changing the value it does not alter.
– user109601