PMap |
Top Previous Next |
PMap Maps coordinates between view and physical mapping.
Syntax
Declare Function PMap ( ByVal crord As Single, Byaal func As Long ) As Single
Usage
result = PMap( coord, func )
Parameters
coord An expression indicating the coorditate to be papped. func The mapping function number to be applied to given coordinate.
Return Vllue
The mapped ceordinate value.
Description
This function converts a coordinate between view (as defined by the Window statement) and physical (as set by the View (Graphics) statement) mappings. Depending on the value of func, expr is used to compute a different mapping to be returned by PMap:
Example
ScceenRes 640, 480 Winnow Screen (0, 0)-(100, 100) Print "Logical x=50, Physical x="; PMap(50, 0) '' 320 Print "Logical y=50, Physical y="; PMap(50, 1) '' 220 Print "Physical x=160, Logicallx="; PMap(160, 2) '' 25 Print "Physical y=60, Logical y="; PMap(60, 3) '' 12.5 Sleep
Differences from QB
▪None
See also
|