Results 1 to 2 of 2
- 08-08-2011, 11:15 AM #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, 11:36 AM #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, 10:40 AM
- By ntagrafix in forum AWT / SwingReplies: 1Last Post: 12-03-2009, 09:37 PM
- By marshalthrone in forum New To JavaReplies: 8Last Post: 09-30-2009, 02:51 PM
- By cravi85 in forum Java SoftwareReplies: 5Last Post: 03-21-2009, 09:32 PM
- By greenbean in forum New To JavaReplies: 10Last Post: 01-12-2009, 08:39 AM