AddPage() |
---|
| Adds a new page at the end of the document. Syntax: Code Block |
---|
XFRXDraw::AddPage([tcPageSize]) |
Or Code Block |
---|
XFRXDraw::AddPage(tnPageWidth, tnPageHeight) |
Parameters: tcPageSize The page size of the new page. Available values: “A4”, “letter” tnPageWidth, tnPageHeight The width and height of the new page. The unit can be defined by SetUnit() method. The default unit it point (1/72 in). If no page size is specified, the current page size is used. |
CreateDocument() |
---|
| Creates a new XFF file. Syntax: Code Block |
---|
XFRXDraw::CreateDocument([tcFileName]) |
Return values .T. … the file was successfully created .F. … file couldn’t have been created () An existing file is overwritten. Parameters: tcFileName The file name if the document to be created. If this parameter is empty, the XFF file is created in memory. |
DrawLine() |
---|
| Draws a line on the current page. Syntax: Code Block |
---|
XFRXDraw::DrawLine(tnXPos, tnYPos, tnXToPos,
tnYToPos [, tnLineWidth[, tnPenPattern]]) |
Parameters: tnXPos, tnYPos The X,Y coordinates of the start point of the line. tnXToPos, tnYToPos The X,Y coordinates of the end point of the line. tnLineWidth The line width in points. 0 represents hairline. Optional, default value = 1. tnPenPattern 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. |
DrawPicture() |
---|
| Draws a picture on the current page into a given bounding rectangle. Syntax: Code Block |
---|
XFRXDraw::DrawPicture(tnXPos, tnYPos, tnWidth, tnHeight,
tcFilename[, tnAdjType
[, llCentralHorizontaly[, tnRotate[,
tnRotationPoint[, tcLinkName[, tcLinkRef]]]]]]) |
Parameters: tnXPos, tnYPos The X,Y coordinates of the upper left hand corner of the bounding rectangle. tnWidth The width of the rectangle tnHeight The height of the rectangle tcFileName The picture file name tnAdjType 0 … clip picture 1 … stretch picture, retain shape 2 … stretch picture, fill frame llCentralHorizontaly Center horizontaly in frame (since XFRX 15.7). tnRotate The text rotation angle in degrees. The label will be rotated counterclockwise. Optional, default value = 0 (since XFRX 15.7). tnRotationPoint
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 (since XFRX 15.7). tcLinkName If this parameter is filled, the text will be a named target of a hyperlink. (see tcLinkRef parameter) (since XFRX 15.7). tcLinkRef If this parameter is filled, the text will be a hyperlink. It will navigate to a target with tcLinkRef name (since XFRX 15.7). |
DrawGeneralField() |
---|
| Draws a picture on the current page into a given bounding rectangle. (since XFRX 16.1) Syntax: Code Block |
---|
XFRXDraw::DrawGeneralField(tnXPos, tnYPos, tnWidth,
tnHeight, tcFieldName[, tnAdjType
[, llCentralHorizontaly[, tnRotate
[, tnRotationPoint[, tcLinkName
[, tcLinkRef]]]]]]) |
Parameters: tnXPos, tnYPos The X,Y coordinates of the upper left hand corner of the bounding rectangle. tnWidth The width of the rectangle tnHeight The height of the rectangle tcFieldName The general field name tnAdjType 0 … clip Picture 1 … stretch picture, retain shape 2 … stretch picture, fill frame llCentralHorizontaly Center horizontaly in frame. tnRotate The text rotation angle in degrees. The label will be rotated counterclockwise. Optional, default value = 0. tnRotationPoint
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. |
DrawRectangle() |
---|
| Draws a rectangle on the current page. Syntax: Code Block |
---|
XFRXDraw::DrawRectangle(tnXPos, tnYPos, tnWidth,
tnHeight [, tnLineWidth
[, tnFillPattern
[, tnPenPattern[, tnRoundFactor
[, tnMode]]]]]) |
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 = 1. tnFillPattern 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. tnPenPattern 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. 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. |
|
DrawText() |
---|
| Draws a text, using a font defined by SetFont method. Syntax: Code Block |
---|
XFRXDraw::DrawText(tnLeft, tnTop, tcText
[, tnRotate[, tcLinkName[,
tcLinkRef[, tcBookmark
[, tcTooltip[, tnmode[, liCP]]]]]]]) |
Or Code Block |
---|
XFRXDraw::DrawText(tcText[, tnRotate[,
tcLinkName[, tcLinkRef[,
tcBookmark[, tcTooltip[,
tnmode[, liCP]]]]]]]) |
Parameters: tnLeft, tnTop The coordinates where the text will be drawn. If the second syntax is used (without the coordinates), the text will be drawn at the current position: which is either a position defined by SetPos() method or a the end of an output if the previous DrawText() method call. tcText The text to be drawn tnRotate The text rotation angle in degrees. The label will be rotated counterclockwise. Optional, default value = 0. 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 in the local document with tcLinkRef name. To navigate to a http URL, include “http://” at the beginning of the parameter. tcBookmark I not empty, the parameter contains a name of a bookmark that will be created and will navigate to this text. tcTooltip The tooltip displayed when hovering mouse over this text. tnMode Opaque/transparent mode (since XFRX 15.7). 0 … “opaque 1 …“transparent” liCP Code page of text (since XFRX 15.7) |
DrawTextBox() |
---|
| Word wraps the give text and print it into a given bounding rectangle. If the height of the rectangle is zero, then the rectangle stretches to accommodate to full text and the height of the rectangle is returned. Syntax: Code Block |
---|
XFRXDraw::DrawTextBox(tnLeft, tnTop, tnWidth, tnHeight,
tcText[, tnAlign[, tnVAlign
[, tnRotate[,tnRotationPoint[,
tcLinkName[, tcLinkRef[, tcBookmark
[, tcTooltip[, tnmode[, liCP]]]]]]]]]]) |
Return value: The height of the bounding rectangle is returned. Parameters: tnLeft, tnTop The X and Y coordinates of the upper left hand corner of the bounding rectangle. tnWidth, tnHeight The width and the height of the bounding rectangle. If tnHeight is 0, the rectangle stretches to accommodate to full text and the height of the rectangle is returned. tnAlign The horizontal alignment of the text inside of the rectangle. The allowed values are: 0 … “left” 1 …“center” 2 … “right” 3 … “block” (full justify) Optional, the default value is 0 (left). tnVAlign The vertical alignment of the text inside of the rectangle. The allowed values are: 0 … “top” 1 …“center” 2 … “bottom”. Optional, the default value is 0 (top). tnRotate The text rotation angle in degrees. The label will be rotated counterclockwise. Optional, default value = 0. tnRotationPoint 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. tcBookmark I not empty, the parameter contains a name of a bookmark that will be created and will navigate to this text. tcTooltip The tooltip displayed when hovering mouse over this text. tnMode Opaque/transparent mode (since XFRX 15.4). 0 … “opaque 1 …“transparent” liCP Code page of text (since XFRX 15.7)
|
GetBoundingRectangle() |
---|
| Returns the bounding rectangle coordinates in the rectangle-bound script. Syntax: Code Block |
---|
XFRXDraw::GetBoundingRectangle() |
Return value: NULL - the bounding rectangle is not available Object – an object with the following properties: nLeft, nTop – the coordinates of the upper left hand corner of the rectangle nWidth, nHeight – the width and height of the rectangle
The unit of the coordinates can be set by SetUnit() method. The default unit is Point (1/72 in). |
GetPageWidth() |
---|
| |
GetPageHeight() |
---|
| |
GetXPos() |
---|
| Returns the horizontal coordinate of the current position. Syntax: Code Block |
---|
XFRXDraw::GetXPos() |
|
GetYPos() |
---|
| Returns the vertical coordinate of the current position. Syntax: Code Block |
---|
XFRXDraw::GetYPos() |
|
OpenDocument() |
---|
| Opens an existing XFF file. Syntax: Code Block |
---|
XFRXDraw::OpenDocument(tcFileName) |
Return values .T. … the file was successfully opened .F. … file couldn’t have been opened (file doesn’t exist or is locked) |
PrintDocument() |
---|
| Prints the XFF file to the specified printer. Syntax: Code Block |
---|
XFRXDraw::PrintDocument(tcPrinterName, tcJobname,
tnFrom [, tnTo [, tcDEVMODE
[, tnPagesPerSheet, [ tnAllEvenOdd,
[ tnCopies, [tnUnderlineHyperlinksOnPrint,
[laFindString, [lcOutput]]]]]]]]) |
Return values -100 … cannot initialize printer device -101 … cannot initialize printer driver -102 … cannot initialize DEVMODE structure 0 … no errors Parameters: tcPrinterName Then name of the printer to which the document will be sent tcJobName The printer job name tnFrom If numeric, the first page to be printed. tnTo The last page to be printed. tcDEVMODE DEVMODE structure. tnPagesPerSheet The number of pages per sheet . tnAllEvenOdd Include all pages, odd or even only. The allowed values are: 1 ... all pages (default value) 2 ... odd pages 3 ... even pages tnCopies The number of copies. tnUnderlineHyperlinksOnPrint Print hyperlink... 0 - No print hyperlink 1 - Print hyperlink in blue color 2 - Print hyperlink in green color laFindString (XFRX 15.4) A array contains strings for highlight (background color yelow).
lcOutput (XFRX 15.5) A output file name for virtual printers such as Microsoft XPS Document Writer, PDFCreator. Alternatively, tnFrom can contain a string value, containing the pages numbers separated by commas and ranges separated by dashes, e.g.: “1,2,5-6,8,20-30” |
SavePicture() |
---|
| SavePicture method saves the report page(s) as a picture. Syntax: Code Block |
---|
XFRXDraw::SavePicture(tcFilename, tcType, tnFrom [,
tnTo [, tnBpp [, tnJPEGQuality [,
tnThumbnailWidth [, tnThumbnailHeight [,
tnPagesPerSheet, [ tnAllEvenOdd [, m.tnCopies, [
laFindString, [liBackgroundMode] ]]]]]]]]]), |
Return values 0 ... no errors was encountered -1 ... unknown image format -2 ... page out of range Parameters: tcFilename The name of the file to be generated. tcType The format of the picture to be saved. Currently supported options are: BMP, GIF, JPEG (JPG), PNG, TIFF (TIF), EMF. tnFrom The page number to be saved. If TIFF format is being saved, the parameter specifies the first page to be saved. tnTo If TIFF format is being saved, the parameter specifies the last page to be saved. Ignored otherwise. tnBpp Bits per pixel. Currently supported values are 2, 16 or 24. tnJPEGQuality Specifies the JPEG compression quality. The range is from 1 - the lowest quality to 100 - the best quality. The default value is 0 - default quality. Ignored for other output types. tnThumbnailWidth The width of the output picture in pixels. tnThumbnailHeight The height of the output picture in pixels. tnPagesPerSheet The number of pages per sheet . tnAllEvenOdd Include all pages, odd or even only. The allowed values are: 1 ... all pages (default value) 2 ... odd pages 3 ... even pages tnCopies Number of copies. This parameter is ignore. laFindString (XFRX 15.4) A array contains strings for highlight (background color yelow). liBackGroundMode (XFRX 15.5) Background mode of output picture for TIFF,EMF and PNG format 0 ... Opaque (default color is white) 1 ... Transparent (use 32bppARGB always) If both tnThumbnailWidth and tnThumbnailHeight are omitted, the original page size is used. If only one of the values is sent, the other one is calculated accordingly. |
SetColor() |
---|
| Sets the foreground and background drawing colors. Syntax: Code Block |
---|
XFRXDraw::SetColor(tfr, tfg, tfb[, tbr, tbg, tbb]) |
Parameters: tfr, tfg, tfb Red, green and blue components of the foreground color tbr, tbg, tbb Red, green and blue components of the background color (optional) |
SetFont() |
---|
| Sets font name and attributes for subsequent DrawText() or DrawTextBox() calls. Syntax: Code Block |
---|
XFRXDraw::SetFont(tcFontName, tnSize[, tlBold[,
tlItalic[, tlUnderline[,
tlStrikeThrough]]]]) |
Parameters: tcFontName The font name tnSize The font size in points tlBold, tlItalics, tlUnderline, tlStrikeThrough The font attributes. These parameters are optional, the default value is .F. Parameter tlStrikeThrough is since XFRX 15.7 |
SetPos() |
---|
| Sets the position where the text will be drawn by the subsequent DrawText() method call. Syntax: Code Block |
---|
XFRXDraw::SetPos(tnXPos, tnYPos) |
Parameters: tnXPos, tnYPos The X and Y (horizontal and vertical) coordinates of the position. The unit of the coordinates is defined by SetUnit() method, the default unit is Point (pt). |
SetUnit() |
---|
| Sets the drawing units. Syntax: Code Block |
---|
XFRXDraw::SetUnit(tcUnit) |
Parameters: tcUnit The unit code. The allowed values are: “in” – inches, “cm” – centimeters, “pt” – points and “px” – pixels.
Info |
---|
The default unit is point. |
|