Results 1 to 2 of 2
- 08-08-2011, 12:15 PM #1
Can't it be drawOval( int, double, int, int) ?
Hi there. I was trying to insert a decimal number as an Y coordinate, when while compiling it said me that drawOval() only accepts int parameters. So, does it mean that necessarily an applet can't draw something on a decimal number pixel, and only it can draw on integer number pixels? I mean, isn't there any way to draw something at pixel 12.5 or 20.3, using double parameters instead of integer ones? Thanks.
- 08-08-2011, 12:36 PM #2isn't there any way to draw something at pixel 12.5 or 20.3
Approximations using anti-aliasing are possible with the Graphics2D API. See the class Ellipse2D.Double / Ellipse2D.Float and the Graphics2D methods setRenderingHints(...) and draw / fill (Shape).
also go through Trail: 2D Graphics (The Java™ Tutorials)
- By GPB in forum New To JavaReplies: 3Last Post: 03-26-2010, 11:40 AM
- By ntagrafix in forum AWT / SwingReplies: 1Last Post: 12-03-2009, 10:37 PM
- By marshalthrone in forum New To JavaReplies: 8Last Post: 09-30-2009, 03:51 PM
- By cravi85 in forum Java SoftwareReplies: 5Last Post: 03-21-2009, 10:32 PM
- By greenbean in forum New To JavaReplies: 10Last Post: 01-12-2009, 09:39 AM