oroussea
asked on
Code of the drawing of a Shape object (Arc2D)?
Hello
Since Java is open source, could someone get me the code that is used to fill and draw an Java Arc2D object?
Im coding on J2ME phones that have a sh*tty implementation of arc drawing and filling... so i want to replace them with efficient functions.
Thanks
Since Java is open source, could someone get me the code that is used to fill and draw an Java Arc2D object?
Im coding on J2ME phones that have a sh*tty implementation of arc drawing and filling... so i want to replace them with efficient functions.
Thanks
You can't be *given* the source, but you can access it yourself in src.zip in your JDK
ASKER
Thanks for the lightning fast reply CEHJ!
I tried what you said... and the only thing i could is this:
public abstract void draw(Shape s);
I couldn't find the *real* implementation for the Arc2D... might look something like this:
void draw(Shape s)
{
if s.type == ARC2D
// do actual drawing of arc here -> Code im interested in
else if (s.type == )
}
I tried what you said... and the only thing i could is this:
public abstract void draw(Shape s);
I couldn't find the *real* implementation for the Arc2D... might look something like this:
void draw(Shape s)
{
if s.type == ARC2D
// do actual drawing of arc here -> Code im interested in
else if (s.type == )
}
Well actually Shape doesn't draw itself. Graphics draws it. Look at that class and also maybe Graphics2D
ASKER
Cant find it... i found drawArc and fillArc functions... but they are abstract... no implementation...
draw(Shape s) is also abstract...
do you have src.zip? could have a look? maybe you would find something...
Thanks again
draw(Shape s) is also abstract...
do you have src.zip? could have a look? maybe you would find something...
Thanks again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok thanks for the info!
Btw, i found the source code here:
http://www.cs.duke.edu/csed/java/src1.3/sun/java2d/
Since its an educational website, it must be legal...
Thanks
Btw, i found the source code here:
http://www.cs.duke.edu/csed/java/src1.3/sun/java2d/
Since its an educational website, it must be legal...
Thanks
:-)