|
-
July 31st, 2007, 06:27 AM
#1
Resizing polygon
Hi, can anybody give me some suggestion on how to resize a polygon proportionately? for example, if a triangle needs to be enlarged by 20%, is there any method rather than doing mathematical calculation. I'm drawing the polygon using GraphicPath method with the points of the polygon kept in an Point[].
Thanks for any help.
-
July 31st, 2007, 07:17 AM
#2
Re: Resizing polygon
AFAIK there is no way; even drawing on a panel that will enlarge with form enlarging will not resize it . You have to compute it .
Bogdan
If someone helped you then please Rate his post and mark the thread as Resolved
Please improve your messages appearance by using tags [ code] Place your code here [ /code]
-
August 1st, 2007, 11:06 PM
#3
Re: Resizing polygon
You need to recalculate but it is a simple task to do using the matrix class
Code:
using System.Drawing.Drawing2D;
private void ScaleTwiceAsBig()
{
Point[] myPoints;
Matrix m = new Matrix();
m.Scale(2, 2);
m.TransformPoints(myPoints);
m.Dispose();
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|