Click here to Skip to main content
15,885,080 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to draw a semi circle within the range of x-Axis in a graph with scale values C#. Can anyone help me how to proceed the same.
For eg if my x axis ranges from -1 to 1 then a semi circle is to be drawn from -1 to +1 with 0 as centre.
Posted

1 solution

Since Graphics.DrawCircle (AFAIK) doesn't support drawing just a segment of a circle, you will have to resort to GraphicsPath[^]. After instantiating one, you can make it your semi-circle using one of the AddArc()[^] overloads. Then, draw it using the Graphics.DrawPath()[^] method.
 
Share this answer
 
v2
Comments
Member 8445821 17-Mar-14 7:19am    
Dear Lukeer,
I can able to draw a semi circle using AddArc() but the thing is i want to draw the same with Axis Scale. Can you please help on that.
lukeer 19-Mar-14 4:08am    
Do I get you right that you want to draw little dashes with numbers attached to them?
Do you want them along the semi-circle or on the axis?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900