Versions Compared

Key

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

Draws a rectangle on the current page.


Code Block
Object.AddBox(x0, y0, nwidth, nheight, nsize,
              nfill, tnpenpat [, noffset [, tnMode
              [, tnRotate [, tnRotationPoint
              [, tcLinkName [, tcLinkRef [, tcTooltip [, tcEndOper,
              [, tnRotationXOffset [, tnRotationYOffset]]]]]]]]]])

Parameters

X0, Y0
  The X,Y coordinates of the upper left hand corner.

nWidth
  The width of the rectangle

nHeight
  The height of the rectangle

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

nFill
    The fill pattern:
      0 ... No fill
      1 ... Fill (color)
      2 ... Horizontal Line
      3 ... Vertical Line
      4 ... Upward Diagonal
      5 … Downward Diagonal
      6 ... Cross
      7 ... Diagonal Cross

   Optional, default value = 0.

nPenPattnPenPat
   The border line pattern:
      0 ... no border
      1 ... dotted
      2 ... dashed
      3 ... dash-dot
      4 ... dash-dot-dot
      8 … solid line

   Optional, default value = 8.

noffset
  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)

tcEndOper
   Specifies end operator of rectangle. If not specify, then end operator will be created by parameters tnPenPat and nFill......    (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 PDFL#INIT