## coordinate transform function needed...

##### Quote

bujinw...@my-dejanews.com wrote in message

<6jdmhc$dc...@nnrp1.dejanews.com>...

##### Quote

>Hi gays,

>Does somebody know the procedure can transform the coordinates?

>coordinates of screen( oringin at topleft) transform to coordinates of

paper(

>origin at bottomleft )?

Take a look at the API calls SetWindowOrg and SetViewPortOrg.

The Book "Delphi Developer's Guide" by Xavier Pacheco & Steve Teixeira gives

some examples of these functions and the related mapping modes. Look on pp.

224-239.

I perform a lot of technical calculations using floating point and wanted to

map "World Coordinates" in floating point to a canvas. I created a

non-visual object I call a TPantograph for mapping these (x,y) double

coordinates to (i,j) integer, pixel coordinates. I got the "fix" for

change of coordinates for "free" as part of this conversion of (x,y)

coordinates to (i,j) coordinates. If you're interested in this approach,

take a look a the 2D/3D vector graphics examples on the Graphics page of my

Computer Lab.

efg

_________________________________________

efg's Computer Lab: http://infomaster.net/external/efg

Earl F. Glynn E-Mail: EarlGl...@att.net

MedTech Research Corporation, Lenexa, KS USA