[net.micro.amiga] Scrolling a SUPERBITMAP raster in Intuition Window

san@bubba.UUCP (02/05/86)

The scenario and main question is that I have a 1K by 1K bitmap with
my pre-drawn image on it, and I want to be able to look at ANY portion
of the bitmap from a window on the workbench.

On page 4-7 of the Intuition Manual (version 29.4), under the heading
"SuperBitMap Window", the second paragraph mentions "This window is
very handy where you want to give the user the flexibility of scrolling
around and revealing any portion of the bit-map."  In the first
paragraph it says "You can make the bit-map any size as long as the
window sizing limits are set accordingly".  From this, and other
readings in the Intuition & ROM Kernal manual, it appears as if it
would be possible to scroll the contents of a raster within an
Intuition window.

After reading the ROM kernal manual (many a time!) it appears that at a
lower level I would change the RxOffset and RyOffset for the ViewPort
to change what portion is being displayed, how does one do that for an
Intuition window?  Do I need to obtain the ViewPort structure for my
window and twiddle with the values there?  How do I inform Intuition
that I've changed the values?  Or, do I then do a MakeVPort(), MgrCop()
and LoadView() ?  If so, where do I get the RasInfo structure for my
window?  Would I have to do a RethinkDisplay() or RemakeDisplay() each
time I wanted to change what I'm looking at?  Whats the best way to
accomplish my first question?

Lastly, what are some of the uses of the Inutuition ViewAddress() and
ViewPortAddress() routines ?

	Much thanks in advance...

		Steve Sanderson
----------
-- 
Steve Sanderson, COSI Texas
		 4412 Spicewood Springs, Suite 801 Austin, Texas 78759
UUCP:	{ihnp4, seismo, ctvax}!ut-sally!cositex!san, san@cositex.UUCP
AT&T:	(512) 345-2780

dale@amiga.UUCP (Dale Luck) (02/08/86)

In article <168@bubba.UUCP> san@bubba.UUCP writes:
>The scenario and main question is that I have a 1K by 1K bitmap with
>my pre-drawn image on it, and I want to be able to look at ANY portion
>of the bitmap from a window on the workbench.
>.....
>would be possible to scroll the contents of a raster within an
>Intuition window.

    Use ScrollLayer(0,layer,dx,dy)
    You must first open the layer library ("layer.library",31)
    get the layer from your window->WLayer   V1.1
    dx,dy are values that causes scrolling towards upper-left.
    Note: You should be using a GIMMEZEROZERO window.

>
>lower level I would change the RxOffset and RyOffset for the ViewPort
>to change what portion is being displayed, how does one do that for an
>Intuition window?  Do I need to obtain the ViewPort structure for my
>that I've changed the values?  Or, do I then do a MakeVPort(), MgrCop()
>and LoadView() ?  If so, where do I get the RasInfo structure for my
>window?  Would I have to do a RethinkDisplay() or RemakeDisplay() each
>time I wanted to change what I'm looking at?

     The RasInfo,ViewPort stuff is for scrolling the common bitmap of
     a screen. This is supported by the display hardware so smooth
     scrolling of ViewPorts is "easy". ScrollLayer, above, must shuffle
     bits in and out of your displayed window.
>
>Lastly, what are some of the uses of the Inutuition ViewAddress() and
>ViewPortAddress() routines ?

      You just described them above. To make use of the Screen/ViewPort
      features of the system while using Intuition.