Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Draws a rectangle on the current page.


Code Block
Object.DrawRectangle(tnXPos, tnYPos, tnWidth, 
                     tnHeight [, tnLineWidth
                     [, tnFillPattern
                     [, tnPenPattern [, tnRoundFactor
                     [, tnMode [, tnRotate [, tnRotationPoint
                     [, tcLinkName [, tcLinkRef [, tcTooltip 
                     [, tnRotationXOffset [, tnRotationYOffset]]]]]]]]]]]]])

Parameters

tnXPos, tnYPos
  The X,Y coordinates of the upper left hand corner.

tnWidth
  The width of the rectangle

tnHeight
  The height of the rectangle

tnLineWidth
  The line width in points. 0 represents hairline. Optional, default value = is 1.

tnFillPattern
    The fill pattern:

ValueDescription
     
0
...
No fill
      1 ... Fill
1Fill (color)
      2 ... Horizontal
2Horizontal Line
      3 ... Vertical
3Vertical Line
      4 ... Upward
4Upward Diagonal
     
5
Downward Diagonal
     
6
...
Cross
     
7
...
Diagonal Cross

   Optional, default value = is 0.

tnPenPattern
   The border line pattern:

Value
      0 ...
Description
0no border
     
1
...
dotted
     
2
...
dashed
     
3
...
dash-dot
     
4
...
dash-dot-dot
     
8
solid line

   Optional, default value = 8.

tnRoundFactor
  The radius of the rectangle edges curvature. 0 makes the rectangle right-angled (no rounding), 99 creates an ellipse. Optional, default value = 0.

tnMode
   The mode opaque/transparent (since XFRX 16.0):
      0 ... Opaque
      1 ... Transparent

   Optional, default value = 0.

Info

The border and fill color needs to be defined via SetColor() method before calling DrawRectangle() method.

tnRotate   (since XFRX 17.3) The rectangle rotation angle in degrees. The rectangle will be rotated counterclockwise. Optional, default value = 0. 

tnRotationPoint (since XFRX 17.3)

   The point within the rectangle around which the text is rotated. The allowed values are 0..8, optional, default value = 0 (left, top). Please see the picture on the right for the point positions .

tcLinkName  
  If this parameter is filled, the text will be a named target of a hyperlink. (see tcLinkRef parameter).

tcLinkRef  
  If this parameter is filled, the text will be a hyperlink. It will navigate to a target with tcLinkRef name.

tcTooltip
   The tooltip displayed when hovering mouse over this image. (since XFRX 21.0)

...