Article View: aus.computers.java
Article #1144images
From: Sean Seefried
Date: Wed, 26 May 1999 00:00
Date: Wed, 26 May 1999 00:00
42 lines
2098 bytes
2098 bytes
Now then. I am in a serious spot of bother and all I really need is someone to explain to me a java applets paint behaviour. First I'll give you a run down on what I have been coding the last day. I was attempting to creat a composite picture by first writing the first picture to a off screen graphics context, setting XOR mode for that graphics context and adding in other little bits by loading them into appropriate Image objects and _drawing_ them to the off screen graphics context. Here's the annoying part. I load up all these images in the "init" method and drew them all to the off screen graphics context in that method. Then in my paint method I simply drew the off screen image to the current graphics context of the applet. IT WOULD NOT WORK. However it would work when within the paint method I loaded all the images wrote them to the off screen graphics context then drew the offscreen image to the current graphics context, albeit WAY TO SLOWLY! Since I don't fully understand threads I immediately blamed them. Reading up on the methods getImage (which i was using to get the images) and drawImage they say that they "return immediately" and that once drawImage is called "the pictures are then loaded and drawn _incrementally to the screen". What the hell is that supposed to mean? So basically what I am asking all you kind people out there is, how do I do what I want to do, FAST and MEMORY EFFICIENTLY (my images were 400x400 pixels, quite large and sure to take up heaps of mem). Thanks in advance. Sean I'll add the code as an attachment as well. begin 666 imagetest.java <encoded_portion_removed>
Technical Details
Message-ID:
<7ienu9$2so$1@bunyip.cc.uq.edu.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,1011b10cee26956b,start X-Google-Attributes: gid10d6db,public From: "Sean Seefried" <s350366@student.uq.edu.au> Subject: images Date: 1999/05/26 Message-ID: <7ienu9$2so$1@bunyip.cc.uq.edu.au> X-Deja-AN: 481980178 Organization: University of Queensland X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: aus.computers.java