Hi,
I am new to Paint.net Plugin development. I have viewed few tutorials to code in C# using CodeLab. I have write a simple program that draw an Arrow on the canvas using different parameters. The code for drawing arrow is as follow.
Rectangle selection = EnvironmentParameters.GetSelection(src.Bounds).GetBoundsInt();
dst.CopySurface(src,rect.Location,rect);
// create a Brush to draw a filled Polygon
SolidBrush myBrushColor1 = new SolidBrush(Amount9);
// create a GDI+ graphics surface
Graphics g = new RenderArgs(dst).Graphics;
g.Clip = new Region(rect);
// Code for Drawing Arrow
g.FillPolygon(myBrushColor1, new PointF[] {
new PointF(Amount1, Amount2),
new PointF(Amount1+Amount4, Amount2),
new PointF(Amount1+Amount4, Amount2-Amount5),
new PointF(Amount1+Amount4+Amount6, Amount2-Amount5),
new PointF(Amount1, Amount2-Amount5-Amount8)
});
By using the above code the Arrow is drawn on the canvas successfully. Now I want to rotate the Drawn arrow to any specified angle. I have used g.RotateTransform(Angle); but it rotate the arrow according to the starting point of the canvas, but i want to rotate the arrow around its center point. Any help will be appreciated.
Thanks,