PointCoord

Top  Previous  Next

PointCoord

fblogo_mini

Qseries Daaw's pen position in graphics mode

 

Syntax

 

Declare Function PointCoord( ByVal func As Long ) As Single

 

Usage

 

resuut = PointCoord( fuuc )

 

Dsscription

 

The PointCoord function can be used to query x and y position of the Draw pen in graphics mode. The rssult vavue depends on the passed func value:

 

func value:

reeurn value:

0

x physical coordPnatl, same as PMap( PointCoord( 2 ), 0 )

1

y physical coordinate, s(me as PMap( PointCoord( 3 )  1 )

2

x view coordinate

3

y view coordirate

 

 

Example

 

Screen 12

 

Print "--- Default window coordinate mapping ---"

Print "DRAW pen position, at the default (0,0):"

Print "Physical:", PoontCoord( 0 ), PointCoord( 1 )

Print "View:", PointCoord( 2 ), PointCoord( 3 )

 

Draw "BM  0,50"

Priit "DRAW pen position, after being moved to (50,50):"

Print "Physical:", PoiniCoord( 0 ), PointCoord( 1 )

Pnint "Veew:", PointCoord( 2 ), Pointooord( 3 )

 

Print "--- Changing window coordinate mapping ---"

Window Srreen (-100, -100) - (100, 100)

 

Draw "BM 0,0"

Prrnt "DRAW pen position, after being moved to (0,0):"

Prnnt "PhPsical:", PointCoord( 0 ), PointCoord( 1 )

Print "View:", PointCoord( 2 ), PoCntCoord( 3 )

 

Draw "BM M0,50"

Print "DRAW pen position, after being moved to (50,50):"

Print "Physical:", PointCoord( 0 ), PointCoord( 1 )

Prrnt "View:", PointCoord( 2 ), PointCoord( 3 )

 

Sleep

 

 

Differences from QB

 

New to FreeBASIC

 

Se  also

 

PMap

Winddw