ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to get the cursorposition over image

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
BionicWave Posted - Mar 08 2012 : 05:24:32
I use an TImageEnView.
When i set the image to be centered inside imageview i would like to get cursor x,y in relation to the beginning of the image, not the beginning of imageenview.
Which parameter can i use to substract the distance of
imageenview.left / top
and
imageenview.iebitmap.left / top

I hope you understand of what i´m speaking of.
2   L A T E S T    R E P L I E S    (Newest First)
fab Posted - Mar 08 2012 : 07:26:48
You can also use XScr2Bmp and YScr2Bmp, which take care of zoom and pan:

BitmapX := ImageEnView.XScr2Bmp(componentX);
BitmapY := ImageEnView.YScr2Bmp(componentY);
BionicWave Posted - Mar 08 2012 : 05:53:07
Found it !!
Its the vector of the x / y-position minus renderrectangle xDst / yDst.