[Solved] Calculate pixel coordinates within vector drawing

Just starting out? Need help? Post your questions and find answers here.
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

[Solved] Calculate pixel coordinates within vector drawing

Post 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?
Last edited by Michael Vogel on Sun Dec 20, 2020 10:10 pm, edited 1 time in total.
User avatar
STARGÅTE
Addict
Addict
Posts: 2226
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Calculate pixel coordinates within vector drawing

Post by STARGÅTE »

PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

Re: Calculate pixel coordinates within vector drawing

Post 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
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Re: Calculate pixel coordinates within vector drawing

Post by Michael Vogel »

Hey thanks, you're right - thanks for these hints...
Post Reply