Page 1 of 1

[Solved] Calculate pixel coordinates within vector drawing

Posted: Sun Dec 20, 2020 3:06 pm
by Michael Vogel
I am using TranslateCoordinates and ScaleCoordinates to draw a map as large as possible within a windows frame. But I need to save the used pixel coordinates for doing a simple mouse hover function. Of course I can do the inverse calculations but is there a more simple way to get the pixel coordinates from the vector coordinate system?

Re: Calculate pixel coordinates within vector drawing

Posted: Sun Dec 20, 2020 4:15 pm
by STARGĂ…TE

Re: Calculate pixel coordinates within vector drawing

Posted: Sun Dec 20, 2020 4:23 pm
by PureLust
Hi Michael, ... I'm not sure if this is what you want, but maybe you can use custom drawing.

A.f.a.i.k, you will get an interrupt call for each drawn pixel.
Maybe you can store the Pixel coordination to a Buffer (Matrix, Dim Array,...) to compare to your mouse coordination later.

(I've never worked with custom drawing, so I'm not sure if this will be a working solution.)

Greetings from beautiful Eifel and happy Holidays to all of you,
Albert.

Gesendet von meinem LYA-L29 mit Tapatalk

Re: Calculate pixel coordinates within vector drawing

Posted: Sun Dec 20, 2020 10:10 pm
by Michael Vogel
Hey thanks, you're right - thanks for these hints...