本文整理汇总了C#中System.Drawing.Pen.RotateTransform方法的典型用法代码示例。如果您正苦于以下问题:C# Pen.RotateTransform方法的具体用法?C# Pen.RotateTransform怎么用?C# Pen.RotateTransform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Drawing.Pen
的用法示例。
在下文中一共展示了Pen.RotateTransform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RotateTransform_Example2
public void RotateTransform_Example2(PaintEventArgs e)
{
// Create a Pen object.
Pen rotatePen = new Pen(Color.Black, 5);
// Scale rotatePen by 2X in the x-direction.
rotatePen.ScaleTransform(2, 1);
// Draw a rectangle with rotatePen.
e.Graphics.DrawRectangle(rotatePen, 10, 10, 100, 100);
// Rotate rotatePen 90 degrees clockwise.
rotatePen.RotateTransform(90, MatrixOrder.Append);
// Draw a second rectangle with rotatePen.
e.Graphics.DrawRectangle(rotatePen, 120, 10, 100, 100);
}
示例2: RotateTransform_Example1
public void RotateTransform_Example1(PaintEventArgs e)
{
// Create a Pen object.
Pen rotatePen = new Pen(Color.Black, 5);
// Draw a rectangle with rotatePen.
e.Graphics.DrawRectangle(rotatePen, 10, 10, 100, 100);
// Scale rotatePen by 2X in the x-direction.
rotatePen.ScaleTransform(2, 1);
// Rotate rotatePen 90 degrees clockwise.
rotatePen.RotateTransform(90);
// Draw a second rectangle with rotatePen.
e.Graphics.DrawRectangle(rotatePen, 140, 10, 100, 100);
}