Obsolete / compatibility - PSSetRowCol()

Syntax

PSSetRowCol([<nRows>, <nCols>])

Returns

An array with two elements, allways {60, 80}

Arguments

<nRows> Number of virtual rows.
<nCols> Number of virtual columns.

Description

This function may be used in conjuction with two different units of measurement; APS_TEXT and APS_CLIP.

With APS_TEXT : This function is used for backward compatibility reason only. It's recommended to use PSSetCPI() and PSSetLPI(). PageScript 32 will try to set the correct CPI, LPI based on the passed values. PSSetRowCol() is located in TPSCRIPT.PRG and can be adjusted to fit your needs, if necessary.

With APS_CLIP : Calling this function AFTER setting the unit to APS_CLIP will set the coordinate system to the number of rows and columns passed in order to be 100% compatible with PageScript for Clipper (see description below).


The APS_CLIP unit

Use PSSetRowCol() to set the number of virtual rows and columns used to place text and other graphic components when using text coordinates (Unit is set to APS_CLIP). PageScript 32 divides the page in <nRows> and <nCols>. For example, if the horizontal printable area is 8 inches wide, and <nRows> is 80, then each position is at 1/10th of an inch.

What PageScript 32 actually does, it builds a virtual grid of nRows rows by nCols columns. When you print something at, let say R10, C20, PageScript 32 starts printing at the intersection of these coordinates of the virtual grid. The characters printed do not necessary fit in each of the following cells. It may be the case if you are using a fixed font such as Courier New.

The image below shows how PageScript 32 works with the virtual grid created with PSSetRowCol(). The code that produces the output is also shown.

PSSetUnit(APS_CLIP) // Must be called BEFORE calling PSSetRowCol()
PSSetRowCol(60, 80) // Creates a grid of 60 rows by 80 columns, no matter the physical paper size.
PSSetFont(APS_ARIAL, APS_PLAIN, 10)
@1,4 TEXTOUT "ABEELABS SYSTEMS - PageScript"

PSSetFont(APS_COURIER, APS_PLAIN, 12)
@3,4 TEXTOUT "ABEELABS SYSTEMS - PageScript"

PageScript 32 creates it's internal grid by dividing the physical printable area height and width by the number of rows and columns. It's up to the programmer to calculate the correct number of rows and columns to reproduce standard Console / DOS output.