-
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.
-
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 .
-
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();
}