Rank: Member
Groups: Guest
Joined: 8/8/2006(UTC) Posts: 3
|
Dear Alex, How to Resizing,Rotate,Zooming & moving the Rectangle inside the bitmap viewer, PLZ provide me the code sample, Thanx
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello, Could you describe the task more detailed? How the resize/zoom/move transfoms should be performed? According to which user input or application data? What do you mean by "rotate" rectangle? In general - the answer is "RectangleRubberband.Rectangle" property. By changing it you can move/resize currently selected area arbitrary, depending on your specific task. E.g code Code:System.Drawing.Rectangle rect = rectRubberband.Rectangle;
rect.Inflate(50, 50);
rectRubberband.Rectangle = rect;
will increase the size of the selected area. Edited by user Wednesday, December 19, 2007 3:04:47 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Guest
Joined: 1/17/2005(UTC) Posts: 32
|
I have come into trouble dectecting if the inflate command will inflate the rubberband outside of the the image. How do I run a check for that make the rubberband stay inside the image alwasy maintaining its ratio?
|
|
|
|
Rank: Advanced Member
Groups: Guest
Joined: 1/31/2005(UTC) Posts: 458
Was thanked: 5 time(s) in 5 post(s)
|
Hello, Value of the Rectangle property of the rubberband is measured in pixels of bitmap. After every change it is automatically fitted into bitmap area. To save aspect ratio of the selection you should calculate new size and check its intersection with image bounds manually and perform all corresponding rectangle size corrections and preserve aspect ratio by yourself. And after that assign the corrected value to the Rectangle property of the rubberband. |
|
|
|
|
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.