Initial Window Graphics
7 messages in this thread
I need some guidance on opening an Intuition Window with the graphics
already defined. What I'm doing is including a GIF viewer as part of a
larger program I'm writing. What I would like to see is the viewer do all
the decoding invisibly while it's loading the bitmap for the window. When
the decoding is done I want to open the custom screen then open the window
so that the GIF picture comes up all at once.
Alternately, I could open the screen and window *behind* the WorkBench
screen and bring it forward when the picture is done, but I still want to
do it very quickly. All the data jammed into the planes of a bitmap or
view before being sent to the window.
From reading the various books I have, I've been getting the impression
that I should use a View and Viewports along with a bitmap and RastPort
structure. But none of the books show any sample code using Views and I'm
not sure how a View relates to a Window anyway. My mind is possibly
clouded by the "Views" used by VAX Screen Management, which is the other
machine and windows system I program in.
Sample code and clear explanations greatly appreciated,
Michael McCormick
One simple way to do it is to store the desired picture in an Image
structure, then use DrawImage to plop it on the required screen. It saves
mucking about with ViewPorts.
Loyd
True, but in this case I'm dealing with full screen size pictures,
decompressed from GIF format. Using an Image structure, I would have to
allocate that much more memory space to hold it, whereas the memory in the
BitMap planes is already there.
Mike McCormick
Mike,
The secret is to read the enough of the file to find out what size bitmap
you're dealing with, then setting it up.
Doug
Well, it looks like my previous response to this message might have been lost
so I will try again. One thing that you can do is to read it into a bitmap
structure that you have created yourself and then to do the open window using
that bitmap instead of a default bitmap. Note that in order to do this, the
windows must be a SUPER_BITMAP window. ALternatively since you are opening a
screen, you can specify the bitmap when you open the screen and then open up
a simple window whose only job is to get input from the user.
That is one thing I haven't tried that I think I should try. Especially
since I'm under the impression that oversized pictures need to be stored in
a Super-BitMap in order to scroll them.
Mike McCormick
They don't HAVE to be stored in a superbit map, it is just a lot easier to
let the system deal with the scrolling if you do it that way.