🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: aus.computers.java
1 messages
1 total messages Started by Sean Seefried Wed, 26 May 1999 00:00
images
#1144
Author: Sean Seefried
Date: Wed, 26 May 1999 00:00
42 lines
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>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads