Hi All,
I would like draw a line from a given POINT to any other given shape like LINE or ARC at 90 degrees( Rigth angle ) . Is there any C# graphics command which would help acheive this. I have experimented with GraphicsPath , Region.etc.. but could not come up with a solution.
In the below mentioned sample code , I would like to draw a perpendicular line from an given point to anyside of the rectangle.
Sample Code
private void button1_Click(object sender, EventArgs e)
{
Graphics g = this.CreateGraphics();
Matrix m = new Matrix();
m.Rotate(25); // axis of rotation..
GraphicsPath Path = new GraphicsPath();
Path.AddRectangle(new Rectangle(200, 100, 200, 200));
PointF[] regionPts = Path.PathPoints;
m.TransformPoints( regionPts );
Brush b = new SolidBrush(Color.Beige);
g.FillPolygon(b, regionPts);
}
If experts could guide me regarding the problem it would be great.
Thanks for your earliest attention.
. (Given Point) . (Given point)
| \
| \ ( Line I want to draw)
| ( Line I want to draw ) \ /
| 90 Degree \ 90 / ( Given Arc )
--------------------------
---( Given Line ) \ /
/
/
Start Free Trial