Ну, хотя вы можете использовать ImageMagic, библиотек .Net вполне достаточно.
Есть несколько способов нарисовать фигуру, например, повернутый прямоугольник.
1) Нарисуйте 4 точки (таким способом можно нарисовать любую фигуру, а не только прямоугольник), поверните ее
C #
Dim Img As Image = New Bitmap(Me.Picturebox1.Width, Me.Picturebox1.Height)
Dim g As Graphics = Graphics.FromImage(Img)
Dim bgBrush As SolidBrush = New SolidBrush(Color.LightSlateGray)
Dim shPen As Pen = New Pen(Color.Black)
Dim pts() As Point
pts = {New Point(150, 100), ' 1
New Point(200, 100), ' 2
New Point(150, 200), ' 3
New Point(200, 200)} ' 4
Dim pth As New GraphicsPath
pth = ShapeData(0)
g.FillPath(bgBrush, pth) ' fill
g.DrawPath(shPen, pth) ' border
Dim Angle As Int16 = 30
Dim RotMatrix As New Matrix ' rotate matrix to put the shape back to initial coordinates (with bottom left point as reference)
RotMatrix.Rotate(Angle, MatrixOrder.Append) ' Rotate the pattern to the desired angle
RotMatrix.TransformPoints(pts) ' carry out matrix transformation over the shape points
VB.NET
Image Img = new Bitmap(this.Picturebox1.Width, this.Picturebox1.Height);
Graphics g = Graphics.FromImage(Img);
SolidBrush bgBrush = new SolidBrush(Color.LightSlateGray);
Pen shPen = new Pen(Color.Black);
Point[] pts;
pts = new[] { new Point(150, 100), new Point(200, 100), new Point(150, 200), new Point(200, 200) }; // 4
GraphicsPath pth = new GraphicsPath();
pth = ShapeData(0);
g.FillPath(bgBrush, pth); // fill
g.DrawPath(shPen, pth); // border
Int16 Angle = 30;
Matrix RotMatrix = new Matrix(); // rotate matrix to put the shape back to initial coordinates (with bottom left point as reference)
RotMatrix.Rotate(Angle, MatrixOrder.Append); // Rotate the pattern to the desired angle
RotMatrix.TransformPoints(pts); // carry out matrix transformation over the shape points
2) Нарисуйте 4 точки, уже повернутые
C * # * тысяча двадцать-одна
Dim Img As Image = New Bitmap(Me.Picturebox1.Width, Me.Picturebox1.Height)
Dim g As Graphics = Graphics.FromImage(Img)
Dim bgBrush As SolidBrush = New SolidBrush(Color.LightSlateGray)
Dim shPen As Pen = New Pen(Color.Black)
Dim pts() As Point
pts = {New Point(150, 100), ' 1 - rotated coordinates
New Point(210, 110), ' 2 - rotated coordinates
New Point(140, 200), ' 3 - rotated coordinates
New Point(200, 210)} ' 4 - rotated coordinates
Dim pth As New GraphicsPath
pth = ShapeData(0)
g.FillPath(bgBrush, pth) ' fill
g.DrawPath(shPen, pth) ' border
VB.NET
Image Img = new Bitmap(this.Picturebox1.Width, this.Picturebox1.Height);
Graphics g = Graphics.FromImage(Img);
SolidBrush bgBrush = new SolidBrush(Color.LightSlateGray);
Pen shPen = new Pen(Color.Black);
Point[] pts;
pts = new[] { new Point(150, 100), new Point(210, 110), new Point(140, 200), new Point(200, 210) }; // 4
GraphicsPath pth = new GraphicsPath();
pth = ShapeData(0);
g.FillPath(bgBrush, pth); // fill
g.DrawPath(shPen, pth); // border
3) Нарисуйте прямоугольник и поверните графику . Это может быть немного сложно.
C #
Image Img = new Bitmap(this.Picturebox1.Width, this.Picturebox1.Height);
Graphics g = Graphics.FromImage(Img);
SolidBrush bgBrush = new SolidBrush(Color.LightSlateGray);
Pen shPen = new Pen(Color.Black);
Int16 dDimX = 75;
Int16 dDimY = 150;
Int16 dLocX = 200;
Int16 dLocY = 100;
Rectangle rect = new Rectangle(dLocX, dLocY, dDimX, dDimY);
g.RotateTransform(30);
VB.NET
Dim Img As Image = New Bitmap(Me.Picturebox1.Width, Me.Picturebox1.Height)
Dim g As Graphics = Graphics.FromImage(Img)
Dim bgBrush As SolidBrush = New SolidBrush(Color.LightSlateGray)
Dim shPen As Pen = New Pen(Color.Black)
Dim dDimX As Int16 = 75
Dim dDimY As Int16 = 150
Dim dLocX As Int16 = 200
Dim dLocY As Int16 = 100
Dim rect As Rectangle = New Rectangle(dLocX, dLocY, dDimX, dDimY)
g.RotateTransform(30)