XRect Pin Property. The corner of the rectangle to pin. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Value Read Only Description
[C#] Corner

[Visual Basic]
Corner
Corner.BottomLeft No The corner of the rectangle to pin.

 

   

Notes
 

Allows you change the pinned corner of the rectangle.

The Corner enumeration may take the following values:

  • BottomLeft
  • TopLeft
  • BottomRight
  • TopRight

Some operations require that the rectangle is pinned to a location. For example if you want to change the width of a rectangle you can do this either by shifting the left side or the right side. If the pin property is set to the bottom or top left then the left side of the rectangle will be kept fixed and the right side shifted. Conversely if the pin property is set to the bottom or top right then the right side of the rectangle will be kept fixed and the left side shifted.

Why is my Pin a number?

In older versions of ABCpdf the Pin property was a number. To assign a Corner to the Pin property you needed to cast the value. So you might find code of this form.

theRect.Pin = (int)XRect.Corner.TopRight

In Version 8 the Pin property has been changed to a true enumeration. This means you can assign the Corner directly.

theRect.Pin = XRect.Corner.TopRight

If your code is bound to integers rather than enumerations then it is safe to cast the number to a Corner.

theRect.Pin = (XRect.Corner)myIntegerValue

 

 

   

Example
 

None.