PDA

View Full Version : zoom Mouse cursor



couet
04-11-2005, 03:22 AM
Hi !
I would like zoom on the Mouse cursor ??????????

thanks you for your answer !!!!!

MMMovania
04-11-2005, 04:41 AM
Hello Couet.
This is the most terse question I have seen on the forum. LIke can you give any details ...
Thanx

couet
04-11-2005, 05:10 AM
Sorry !!
i use glOrtho. I produce already the traditional zoom


glOrtho(-Fscaler, Fscaler, -Fscaler/ClientWidth*ClientHeight, Fscaler/ClientWidth*ClientHeight, -Fscaler, 10);
but I would like zoom on the mouse cursor.
where I zoom with my cursor, I does not want that its becomes the center of the screen.
I wants that where I zoom that remain its place

I hope to have been clearly.

Thanks

jide
04-11-2005, 08:30 AM
I don't know if that works, but starting from what you're doing, here is how I would have done it:

glOrtho (mouse_x-Fscaler, mouse_x+Fscaler, mouse_y -Fscaler/ClientWidth*ClientHeight, mouse_x+Fscaler/ClientWidth*ClientHeight, -Fscaler, 10);

However, I'm not really sure about the result...

couet
04-11-2005, 10:09 PM
It is very funny but its fact not what I wants
I you council to try to see !!

thanks for your help !!


glOrtho (-(FMousePos.x-512)-Fscaler, (FMousePos.x-512)+Fscaler, -(FMousePos.y-350) -Fscaler/ClientWidth*ClientHeight,(FMousePos.y-350)+Fscaler/ClientWidth*ClientHeight, -Fscaler, 10);

or

glOrtho (-(FMousePos.y-350)-Fscaler, (FMousePos.y-350)+Fscaler, -(FMousePos.y-350) -Fscaler/ClientWidth*ClientHeight,(FMousePos.y-350)+Fscaler/ClientWidth*ClientHeight, -Fscaler, 10);