Top
PowerCOBOL V11.0 Reference
FUJITSU Software

5.26 ConvertScale Method

Description:

Converts coordinates between specified scale modes.

The details of scale mode are described in the ScaleMode property.

Used in controls:

None.

Used in objects:

Form

Parameters:

VT_I2 - ScaleModeInS9(4) COMP-5

VT_I2 - ScaleModeOutS9(4) COMP-5

VT_I4 - PosXS9(9) COMP-5

VT_I4 - PosYS9(9) COMP-5

Description of Parameters:

ScaleModeIn: The scale mode of the input coordinates. Valid values (with constants) are:
0 - Pixels(POW-SCALEPIXELS)
1 - 1/100mm (POW-SCALEHIMETRIC)
2 - 1/1000inch(POW-SCALEHIENGLISH)
3 - 1/20Points (POW-SCALETWIPS)

ScaleModeOut: The scale mode to be used for the output coordinates. Valid values (with constants) are:
0 - Pixels(POW-SCALEPIXELS)
1 - 1/100mm (POW-SCALEHIMETRIC)
2 - 1/1000inch(POW-SCALEHIENGLISH)
3 - 1/20Points (POW-SCALETWIPS)

PosX: The horizontal coordinates to be converted. The converted value is returned in this parameter.

PosY: The vertical coordinates to be converted. The converted value is returned in this parameter

Return value:

None.

Example:

WORKING-STORAGE SECTION.
01 ScaleModeInPIC S9(4) COMP-5.
01 ScaleModeOutPIC S9(4) COMP-5.
01 XPIC S9(9) COMP-5.
01 YPIC S9(9) COMP-5.
01 ReturnValuePIC S9(9) COMP-5.
PROCEDURE DIVISION.
* This example obtains the current
* scale mode (Default is "3" = 1/20
* points), and converts 100 and 200
* in that scale mode, to their
* values in scale mode "0" pixels).
MOVE "ScaleMode" OF POW-SELF
TO ScaleModeIn
MOVE 0 TO ScaleModeOut
MOVE 100 TO X
MOVE 200 TO Y
INVOKE POW-SELF "ConvertScale"
USING ScaleModeIn ScaleModeOut
X Y

Backward compatibility
method name:

None.