Rank: Member
Groups: Member
Joined: 5/27/2004(UTC) Posts: 7
|
It seems that regardless of the type of unit that I specify in the BitmapViewer.Bitmap.Unit parameter the mouse move event always returns pixels. What is the correct way to get the mouse move event to reurn the location in the units specified byt the bitmap.unit parameter?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hello, MouseMove event returns position on the cursor in the control coordinate (not the bitmap coordinates). That's why it would not be reasonable to make it working in the bitmap units. However if you need to convert between pixels and units, you can: - Create Graphics object.
- Set Unit and HorizontalResolution/VerticalResolution to the same values as your bitmap have.
- Use HorizontalPixelToUnit and VerticalPixelToUnit methods to convert values.
Hope this helps.
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.