1

I am drawing some figures with the java graphics 2d library, i stuck while drawing an arc. My objective is to draw the following two arcs: ) ( I am using the following code:

g2.draw(new Arc2D.Double(x, y,
                         rectwidth,
                         rectheight,
                         90, 135,
                         Arc2D.OPEN));

but this code draws some strange type of arc, i am sure with the x,y,width and height params. But i am doubtful about the next two params i am sure that i am doing some thing wrong but i dont know whats that :(

2
  • 2
    do you need explanation of parameters of constructor ? ellipseBounds - The bounding rectangle that defines the outer boundary of the full ellipse of which this arc is a partial section. start - The starting angle of the arc in degrees. (Specified in double precision.) extent - The angular extent of the arc in degrees. (Specified in double precision.) type - The closure type for the arc: OPEN, CHORD, or PIE. Nov 9, 2011 at 5:33
  • 1
    Can you give an image what you want and what you got?
    – SKi
    Nov 9, 2011 at 8:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.