qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
PMAP Statement Programming Example
  QuickSCREEN      Details     Example      Contents      Index
──────────────────────────────────────────────────────────────────────────────
PMAP Statement Programming Example
 
This example uses PMAP to convert coordinate values from view to screen
coordinates and from screen coordinates to view coordinates.
                                ----- Note -----
This is not a complete program. Do not run this example in its current form.
                                ----------------
SCREEN 2
'Coordinates of upper-left corner of window defined in following
'statement are (80,100); coordinates of lower-right corner
'are 200,200.
WINDOW SCREEN (80,100) - (200,200)
 
'If physical screen coordinates are (0,0) in the upper-left
'corner and (639,199) in the lower-right corner, then the
'following statements will return the screen coordinates
'equivalent to the view coordinates 80,100.
X = PMAP(80,0)          'X = 0
Y = PMAP(100,1)         'Y = 0
 
'The following statements will return the screen coordinates
'equivalent to the view coordinates 200,200.
X = PMAP(200,0)         'X = 639
Y = PMAP(200,1)         'Y = 199
 
'The following statements will return the view coordinates
'equivalent to the screen coordinates 639,199.
X = PMAP(639,2)         'X = 200
Y = PMAP(199,3)         'Y = 200