Board index » delphi » virtual coordinates

virtual coordinates

hi,

In Visual Basic I can map world coordinates to virtual coordinates.
How to do this in Delphi 4

Any help would be welcome

Kees-Jan den Adel

 

Re:virtual coordinates


Kees-Jan den Adel <C.J.J.M.denA...@phys.uu.nl> wrote in message
news:380729F4.F8B735FA@phys.uu.nl...

Quote
> In Visual Basic I can map world coordinates to virtual coordinates.
> How to do this in Delphi 4

What is a virtual coordinate?

You can always use Windows API calls to change coordinates:
SetMapMode, SetViewPortEx, SetWindowOrgEx, etc.
There are a few links about these API calls at
http://www.efg2.com/Lab/Library/Delphi/Graphics/Win32API.htm

IMHO, Windows has some "goofy" rules about coordinates (such
as limiting precision to something like 24 bits) so I often work
with floating point doubles that I map directly to pixel coordinates.
Look for a few links about "World-to-Screen Mapping" near the bottom
of Section B of this page:
http://www.efg2.com/Lab/Library/Delphi/Graphics/Algorithms.htm

___
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Other Threads