Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3270
| From | "RichT" <richt@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Graphics2D question. |
| Message-ID | <h9ednRcf6MSkH0TanZ2dneKdnZydnZ2d@bt.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| Date | 2011-04-27 15:43 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Hello, 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. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Next in thread | Find similar | Unroll thread
Graphics2D question. "RichT" <richt@THRWHITE.remove-dii-this> - 2011-04-27 15:43 +0000 Re: Graphics2D question. "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:44 +0000
csiph-web