Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
shansya  
#1 Posted : Wednesday, August 23, 2006 11:48:33 AM(UTC)
shansya

Rank: Member

Groups: Member
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
Alex Kon  
#2 Posted : Wednesday, August 23, 2006 1:16:30 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
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

quacka  
#3 Posted : Monday, September 04, 2006 4:04:12 PM(UTC)
quacka

Rank: Member

Groups: Member
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?
Alex Kon  
#4 Posted : Tuesday, September 05, 2006 6:36:15 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Member
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.
Users browsing this topic
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.