DrawRectangle Method

Draws a rectangle on the current page.


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
0No fill
1Fill (color)
2Horizontal Line
3Vertical Line
4Upward Diagonal
5Downward Diagonal
6Cross
7Diagonal Cross

   Optional, default value is 0.

tnPenPattern
   The border line pattern:

ValueDescription
0no border
1dotted
2dashed
3dash-dot
4dash-dot-dot
8solid 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.

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)

tnRotationXOffset
 Rotation X Offset in foxels from the left top corner. (since XFRX 21.1)

tnRotationYOffset
 Rotation Y Offset in foxels from the left top corner.  (since XFRX 21.1)

Remarks

Applies To: XFRX#DRAW, XFRX#XML