Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3270

Graphics2D question.

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "RichT" <richt@THRWHITE.remove-dii-this>
Subject Graphics2D question.
Message-ID <h9ednRcf6MSkH0TanZ2dneKdnZydnZ2d@bt.com> (permalink)
X-Comment-To comp.lang.java.gui
Newsgroups comp.lang.java.gui
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 28
Date Wed, 27 Apr 2011 15:43:54 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303919034 96.60.20.240 (Wed, 27 Apr 2011 10:43:54 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:43:54 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3270

Show key headers only | View raw


  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 | NextNext in thread | Find similar | Unroll thread


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