I want to build my application from three main classes.
1. A frame class to handle file operations.
2. A Drawing panel to render images to.
3. An engine to perform the actual rendering.
All the examples I have read so far for Image stuff in Java have
everything stuffed into one monolithic class, and the crux of the
rendering seems to be done in paint(Graphics g) or
paintComponent(Graphics g) using a g2d object cast againg the parameter g.
If I wanted to do calculations for rotations translations etc I can do
this with the AffineTransform class setX methods, but the drawImage
method of g2d seems to be handled in the paint/paintComponent methods.
This is fine until I want to specify x, y arguments in the drawImage
Method as neither Paint or PaintComponent take these parameters in their
method signature how can I do this, is there another way to draw apart
from the paint/paint component methods?
Any help appreciated.
Look at the AnalogClock code too.
--
Knute Johnson
email s/nospam/linux/
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
.
Re: Graphics2D question ... A Drawing panel to render images to. ... All the examples I have read so far for Image stuff in Java have everything stuffed into one monolithic class, and the crux of the rendering seems to be done in paintor paintComponentusing a g2d object cast againg the parameter g. ... Posted via NewsDemon.com - Premium Uncensored Newsgroup Service... Unlimited Access, Anonymous Accounts, Uncensored Broadband Access... (comp.lang.java.programmer)
Graphics2D question. ... A Drawing panel to render images to. ... All the examples I have read so far for Image stuff in Java have everything stuffed into one monolithic class, and the crux of the rendering seems to be done in paintor paintComponentusing a g2d object cast againg the parameter g. ... If I wanted to do calculations for rotations translations etc I can do this with the AffineTransform class setX methods, but the drawImage method of g2d seems to be handled in the paint/paintComponent methods. ... This is fine until I want to specify x, y arguments in the drawImage Method as neither Paint or PaintComponent take these parameters in their method signature how can I do this, is there another way to draw apart from the paint/paint component methods?... (comp.lang.java.gui)
Graphics2D question ... A Drawing panel to render images to. ... All the examples I have read so far for Image stuff in Java have everything stuffed into one monolithic class, and the crux of the rendering seems to be done in paintor paintComponentusing a g2d object cast againg the parameter g. ... If I wanted to do calculations for rotations translations etc I can do this with the AffineTransform class setX methods, but the drawImage method of g2d seems to be handled in the paint/paintComponent methods. ... This is fine until I want to specify x, y arguments in the drawImage Method as neither Paint or PaintComponent take these parameters in their method signature how can I do this, is there another way to draw apart from the paint/paint component methods?... (comp.lang.java.programmer)