[comp.sys.amiga] multiple rastports for a single bitmap

pds@quintus.UUCP (Peter Schachte) (03/12/88)

I'm trying to create multiple rastports that write on the same bitmap.
I also want each rastport to think of the upper left corner of the part
of the bitmap that it can write into as 0,0 (i.e., I'd like the system
to do translation for me).  I looked around in the RKM (vol 1) and
couldn't see how to do it.  Could someone point me to the right
section, or give me a code fragment?

BTW, I'm using this to write into a window, if that makes it easier (or
harder).  I assume I can just grab the bitmap from the window and build
a few rastport and rasinfo structures to do this, but can't figure out
how.

Thanks in advance.

(PS:  I tried to send this to comp.sys.amiga.tech, but we don't get it,
so I can't post there.  I hope technical discussions continue to be
crossposted at least until the situation gets clarified.)
-- 
-Peter Schachte
pds@quintus.uucp
...!sun!quintus!pds

jimm@amiga.UUCP (Jim Mackraz) (03/15/88)

--

Well, "you're close, you're real close," to paraphrase the psycho
with the grenade launcher in Apocalypse Now.

You can set up a several "pure" rastports to draw with different
offsets into the self-same raster (bitplanes).  It is, however, done
at the bitmap level.  Keeping the BytesPerRows and Rows fields the
same (well, maybe not Rows), you can vary the Planes[] addresses and
get *something* useful.

Problem is, a Window's rastport has a Layer hanging off of it.  To do
the similar vudu, you need to set up different Layers (which is not
at all easy; perhaps never been done).  There are some parameters
Scroll_X and Scroll_Y which probably apply.

It's getting too hard for me, but feel free to pioneer.

I think it would be lots easier to put a layer between yourself
and graphics that adds a few offsets to each drawing command.
E.g.: MyBltBitMapRastPort( ) and so on.

Maybe if you figure out a layers trick you can talk at the 1989 
Developers' Conference.  ;^)

	jimm

-- 
	Jim Mackraz, I and I Computing	  
	amiga!jimm	BIX:jmackraz
Opinions are my own.  Comments regarding the Amiga operating system, and
all others, are NOT to be taken as Commodore official policy.