Can you please help me to accomplish this using c#.
I have a GDI+ call as below:
graphics.FillPie(Brushes.White, _
new Rectangle(0, 0, 400, 150), 0 - 90, 77.783651160272726f);
graphics.DrawArc(new System.Drawing.Pen(Brushes.Black, 2), _
new RectangleF(0, 0, 400, 150), 0 - 90, 77.783651160272726f);
My requirement is to find all the points along the bezier curve/shape(pie, arc).
i.e, I need to redraw the shape in my method, which accepts only a point array. I have only the rectangle co-ordinates, start angle and sweep angle with me. Can anyone let me know if there is any inbuild method in .net for calculating this or is there any easy method to find this one.
Please let me know if you need any other informations. Kindly help me as this is very critical for me as I am not a genious in Math.
Thanks in advance.
Regards,
James
Do you really have to represent this as an array of points?
If you can be flexible on the signature of your method, and instead of
Point[]accept aGraphicsPath, then you can represent this curve in C# by compining the two parts.EDIT: Adding example
For example, you can create a
GraphicsPathlike this:You can later use it to draw graphics using the
Graphics.DrawPathmethod, or access the graphics path data through theGraphicsPath.PathPoints,GraphicsPath.PathTypesandGraphicsPath.PointCountproperties.