views:

40

answers:

1

I need to draw a Pie Arc in Java with start angle 350 and end angle 20.The cordinate system I follow is as follows:-

        |0  
        |
270-----------90 
        |
        |180

The problem here is that the start angle is greater than the end angle.For the other way round I have managed to draw the arc.Any help would be great.

+3  A: 
Bragboy
Actually this is for a custom swing component.I'm making a double thumb circular slider.A pie-arc with transparency is needed to indicate the selected region.I'm facing a problem when the start angle is greater than the end angle.
Emil
@Emil: You should forget about the end angle here. Arc always has a start angle and an extent. Even though you have a end angle, you should translate it to the Java's arc explicitly.
Bragboy
@Emil: Can you post some code, i can help ..
Bragboy
@Bragboy: I'll post the code tomorrow.It's in my office system.
Emil
@BragBoy :I have posted the [code](http://pastebin.com/1ZP3Yf0v).I'm sorry the code is little bit dirty.The potion I need help is for fill arc.I mean the logic i'm using is to convert from my coordinate to the arcs coordinate system is wrong.
Emil
@BragBoy: Thanks for your help i solved it.You need not look into the code.
Emil