@database "graphics"
@master "ADCD_v1.2:IncludesD/Inc&AD1.3/doc/graphics.doc"

@Node Main "graphics.doc"
@TOC 1.3Includes_Autodocs/Autodocs

@{" AddAnimOb() " Link "AddAnimOb()"}               @{" DisposeRegion() " Link "DisposeRegion()"}       @{" OrRegionRegion() " Link "OrRegionRegion()"}
@{" AddBob() " Link "AddBob()"}                  @{" DoCollision() " Link "DoCollision()"}         @{" OwnBlitter() " Link "OwnBlitter()"}
@{" AddFont() " Link "AddFont()"}                 @{" Draw() " Link "Draw()"}                @{" PolyDraw() " Link "PolyDraw()"}
@{" AddVSprite() " Link "AddVSprite()"}              @{" DrawEllipse() " Link "DrawEllipse()"}         @{" QBlit() " Link "QBlit()"}
@{" AllocRaster() " Link "AllocRaster()"}             @{" DrawGList() " Link "DrawGList()"}           @{" QBSBlit() " Link "QBSBlit()"}
@{" AndRectRegion() " Link "AndRectRegion()"}           @{" Flood() " Link "Flood()"}               @{" ReadPixel() " Link "ReadPixel()"}
@{" AndRegionRegion() " Link "AndRegionRegion()"}         @{" FreeColorMap() " Link "FreeColorMap()"}        @{" RectFill() " Link "RectFill()"}
@{" Animate() " Link "Animate()"}                 @{" FreeCopList() " Link "FreeCopList()"}         @{" RemBob() " Link "RemBob()"}
@{" AreaCircle() " Link "AreaCircle()"}              @{" FreeCprList() " Link "FreeCprList()"}         @{" RemFont() " Link "RemFont()"}
@{" AreaDraw() " Link "AreaDraw()"}                @{" FreeGBuffers() " Link "FreeGBuffers()"}        @{" RemIBob() " Link "RemIBob()"}
@{" AreaEllipse() " Link "AreaEllipse()"}             @{" FreeRaster() " Link "FreeRaster()"}          @{" RemVSprite() " Link "RemVSprite()"}
@{" AreaEnd() " Link "AreaEnd()"}                 @{" FreeSprite() " Link "FreeSprite()"}          @{" ScrollRaster() " Link "ScrollRaster()"}
@{" AreaMove() " Link "AreaMove()"}                @{" FreeVPortCopLists() " Link "FreeVPortCopLists()"}   @{" ScrollVPort() " Link "ScrollVPort()"}
@{" AskFont() " Link "AskFont()"}                 @{" GetColorMap() " Link "GetColorMap()"}         @{" SetAPen() " Link "SetAPen()"}
@{" AskSoftStyle() " Link "AskSoftStyle()"}            @{" GetGBuffers() " Link "GetGBuffers()"}         @{" SetBPen() " Link "SetBPen()"}
@{" AttemptLockLayerRom() " Link "AttemptLockLayerRom()"}     @{" GetRGB4() " Link "GetRGB4()"}             @{" SetCollision() " Link "SetCollision()"}
@{" BltBitMap() " Link "BltBitMap()"}               @{" GetSprite() " Link "GetSprite()"}           @{" SetDrMd() " Link "SetDrMd()"}
@{" BltBitMapRastPort() " Link "BltBitMapRastPort()"}       @{" InitArea() " Link "InitArea()"}            @{" SetFont() " Link "SetFont()"}
@{" BltClear() " Link "BltClear()"}                @{" InitBitMap() " Link "InitBitMap()"}          @{" SetOPen() " Link "SetOPen()"}
@{" BltMaskBitMapRastPort() " Link "BltMaskBitMapRastPort()"}   @{" InitGels() " Link "InitGels()"}            @{" SetRast() " Link "SetRast()"}
@{" BltPattern() " Link "BltPattern()"}              @{" InitGMasks() " Link "InitGMasks()"}          @{" SetRGB4() " Link "SetRGB4()"}
@{" BltTemplate() " Link "BltTemplate()"}             @{" InitMasks() " Link "InitMasks()"}           @{" SetRGB4CM() " Link "SetRGB4CM()"}
@{" CBump() " Link "CBump()"}                   @{" InitRastPort() " Link "InitRastPort()"}        @{" SetSoftStyle() " Link "SetSoftStyle()"}
@{" CEND " Link "CEND"}                      @{" InitTmpRas() " Link "InitTmpRas()"}          @{" SortGList() " Link "SortGList()"}
@{" ChangeSprite() " Link "ChangeSprite()"}            @{" InitView() " Link "InitView()"}            @{" SyncSBitMap() " Link "SyncSBitMap()"}
@{" CINIT " Link "CINIT"}                     @{" InitVPort() " Link "InitVPort()"}           @{" Text() " Link "Text()"}
@{" ClearEOL() " Link "ClearEOL()"}                @{" LoadRGB4() " Link "LoadRGB4()"}            @{" TextLength() " Link "TextLength()"}
@{" ClearRectRegion() " Link "ClearRectRegion()"}         @{" LoadView() " Link "LoadView()"}            @{" UnlockLayerRom() " Link "UnlockLayerRom()"}
@{" ClearRegion() " Link "ClearRegion()"}             @{" LockLayerRom() " Link "LockLayerRom()"}        @{" VBeamPos() " Link "VBeamPos()"}
@{" ClearScreen() " Link "ClearScreen()"}             @{" MakeVPort() " Link "MakeVPort()"}           @{" WaitBlit() " Link "WaitBlit()"}
@{" ClipBlit() " Link "ClipBlit()"}                @{" Move() " Link "Move()"}                @{" WaitBOVP() " Link "WaitBOVP()"}
@{" CloseFont() " Link "CloseFont()"}               @{" MoveSprite() " Link "MoveSprite()"}          @{" WaitTOF() " Link "WaitTOF()"}
@{" CMOVE " Link "CMOVE"}                     @{" MrgCop() " Link "MrgCop()"}              @{" WritePixel() " Link "WritePixel()"}
@{" CopySBitMap() " Link "CopySBitMap()"}             @{" NewRegion() " Link "NewRegion()"}           @{" XorRectRegion() " Link "XorRectRegion()"}
@{" CWAIT " Link "CWAIT"}                     @{" OpenFont() " Link "OpenFont()"}            @{" XorRegionRegion() " Link "XorRegionRegion()"}
@{" DisownBlitter() " Link "DisownBlitter()"}           @{" OrRectRegion() " Link "OrRectRegion()"}

@EndNode

@Node "AddAnimOb()" "graphics.library/AddAnimOb"

NAME
    AddAnimOb  --  Add an @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} to the linked list of AnimObs.

SYNOPSIS
    AddAnimOb(anOb, anKey, rp)
             a0    a1     a2

    struct @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} *anOb,**anKey;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Links this @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} into the current list pointed to by animKey.
    Initializes all the Timers of the AnimOb's components.
    Calls @{"AddBob" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddBob()"} with each component's @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134}.
    rp->GelsInfo must point to an initialized @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34} structure.

INPUTS
    anOb = pointer to the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} structure to be added to the list
    anKey = address of a pointer to the first @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} in the list
        (anKey = NULL if there are no AnimObs in the list so far)
    rp = pointer to a valid @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

BUGS

SEE ALSO
    Animate @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0} @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "AddBob()" "graphics.library/AddBob"

NAME
    AddBob  --  Adds a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} to current gel list.

SYNOPSIS
    AddBob(Bob, rp)
          a0   a1

    struct @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} *Bob;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Sets up the system @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} flags, then links this gel into the list
       via @{"AddVSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddVSprite()"}.

INPUTS
    @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} = pointer to the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} structure to be added to the gel list
    rp = pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"AddVSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddVSprite()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AddFont()" "graphics.library/AddFont"

NAME
    AddFont -- add a font to the system list

SYNOPSIS
    AddFont(textFont)
            a1

    struct @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} *textFont;

FUNCTION
    This function adds the text font to the system, making it
    available for use by any application.  The font added must be
    in public memory, and remain until successfully removed.

INPUTS
    textFont - a @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} structure in public ram.

BUGS

SEE ALSO
    @{"SetFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetFont()"} @{"RemFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/RemFont()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "AddVSprite()" "graphics.library/AddVSprite"

NAME
    AddVSprite -- Add a @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} to the current gel list.

SYNOPSIS
    AddVSprite(vs, rp)
              a0  a1

    struct @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} *vs;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Sets up the system @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} flags
    Links this @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} into the current gel list using its Y,X

INPUTS
    vs = pointer to the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} structure to be added to the gel list
    rp = pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "AllocRaster()" "graphics.library/AllocRaster"

NAME
    AllocRaster -- Allocate space for a bitplane.

SYNOPSIS
    planeptr = AllocRaster( width, height )
      d0                    d0:16  d1:16

    PLANEPTR planeptr;
    USHORT  width,height;

FUNCTION
    This function calls the memory allocation routines
    to allocate memory space for a bitplane width bits
    wide and height bits high.

INPUTS
    width - number of bits wide for bitplane
    height - number of rows in bitplane

RESULT
    planeptr - pointer to first word in bitplane
        If unable to allocate space then planeptr will be NULL.

BUGS

SEE ALSO
    @{"FreeRaster" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeRaster()"} @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0}

@EndNode

@Node "AndRectRegion()" "graphics.library/AndRectRegion"

NAME
    AndRectRegion -- Perform 2d AND operation of rectangle
                    with region, leaving result in region.

SYNOPSIS
    AndRectRegion(region,rectangle)
                    a0      a1

    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;
    struct @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} *rectangle;

FUNCTION
    Clip away any portion of the region that exists outside
    of the rectangle. Leave the result in region.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    rectangle - pointer to @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} structure

BUGS

SEE ALSO
    @{"AndRegionRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AndRegionRegion()"} @{"OrRectRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OrRectRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "AndRegionRegion()" "graphics.library/AndRegionRegion"

NAME
    AndRegionRegion -- Perform 2d AND operation of one region
                   with second region, leaving result in second region.

SYNOPSIS
    status = AndRegionRegion(region1,region2)
      d0                       a0      a1

    BOOL status;
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region1, *region2;

FUNCTION
    Remove any portion of region2 that is not in region1.

INPUTS
    region1 - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    region2 - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure to use and for result

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

SEE ALSO
    @{"OrRegionRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OrRegionRegion()"} @{"AndRectRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AndRectRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "Animate()" "graphics.library/Animate"

NAME
    Animate  --  Processes every @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} in the current animation list.

SYNOPSIS
    Animate(anKey, rp)
           a0     a1

    struct @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} **anKey;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    For every @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} in the list
       - update its location and velocities
       - call the AnimOb's special routine if one is supplied
       - for each component of the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}
           - if this sequence times out, switch to the new one
           - call this component's special routine if one is supplied
           - set the sequence's VSprite's y,x coordinates based
              on whatever these routines cause

INPUTS
    key = address of the variable that points to the head @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}
    rp  = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
    @{"AddAnimOb" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddAnimOb()"} @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AreaCircle()" "graphics.library/AreaCircle"

NAME
    AreaCircle -- add a circle to areainfo list for areafill.

SYNOPSIS
    error = (int) AreaCircle( rp,  cx,  cy, radius)
    D0                        A1   D0   D1  D2

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT cx, cy;
    SHORT radius;

FUNCTION
    Add circle to the vector buffer.

INPUTS
    rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

    (cx, cy) - are coordinates of a "centerpoint" in the raster
    radius is the radius of the circle to draw around the centerpoint

    This function is a macro which calls
        AreaEllipse(rp,cx,cy,radius,radius).

RESULTS
    0 if no error
    -1 if no space left in vector list

SEE ALSO
    @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"}, @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"}, AreaCircle, @{"InitArea" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitArea()"}, @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"}, @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}
    @{"graphics/gfxmacros.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfxmacros.h/Main" 0}

@EndNode

@Node "AreaDraw()" "graphics.library/AreaDraw"

NAME
    AreaDraw -- Add a point to a list of end points for areafill.

SYNOPSIS
    error = AreaDraw( rp,  x,     y)
      d0              A1 D0:16 D1:16

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT   x,y;

FUNCTION
    Add point to the vector buffer.

INPUTS
    rp - points to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    x,y -  are coordinates of a point in the raster

RETURNS
    0 if no error
    -1 if no space left in vector list

BUGS

SEE ALSO
    @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"} @{"InitArea" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitArea()"} @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AreaEllipse()" "graphics.library/AreaEllipse"

NAME
    AreaEllipse -- add a ellipse to areainfo list for areafill.

SYNOPSIS
    error = AreaEllipse( rp, cx,   cy,   a,    b    )
    d0                   a1  d0:16 d1:16 d2:16 d3:16

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT cx, cy;
    SHORT a, b;

FUNCTION
    Add ellipse to the vector buffer.

INPUTS
    rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    cx - x coordinate of the centerpoint relative to the rastport.
    cy - y coordinate of the centerpoint relative to the rastport.
    a - the horizontal radius of the ellipse (note: a must be > 0)
    b - the vertical radius of the ellipse (note: b must be > 0)

RESULTS
    0 if no error
    -1 if no space left in vector list

SEE ALSO
    @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"}, @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"}, @{"AreaCircle" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaCircle()"}, @{"InitArea" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitArea()"}, @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"}, @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AreaEnd()" "graphics.library/AreaEnd"

NAME
            AreaEnd -- @{"Process" Link "ADCD_v1.2:Inc&AD1.3/Includes/libraries/dosextens.h/Main" 33} table of vectors and produce areafill.

SYNOPSIS
            error = AreaEnd(rp)
     d0             A1

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
            Trigger the filling operation.
            @{"Process" Link "ADCD_v1.2:Inc&AD1.3/Includes/libraries/dosextens.h/Main" 33}  the vector buffer and  generate  required
            fill  into  the raster planes.  After the fill  is
            complete reinitialize for the next @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"}.   Use
            the raster set up by @{"InitTmpRas" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitTmpRas()"} when generating an
            areafill mask.

RESULT
            Fill the area enclosed by the definitions in the vector table.
            Returns -1 if an error occured anywhere.
            Returns 0 if no error.

INPUTS
            rp points to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
            @{"InitArea" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitArea()"} @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"} @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"} @{"AreaEllipse" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEllipse()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AreaMove()" "graphics.library/AreaMove"

NAME
    AreaMove -- Define a new starting point for a new
               shape in the vector list.

SYNOPSIS
    error =  AreaMove( rp,   x,     y)
     d0                a1  d0:16  d1:16

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT   x,y;

FUNCTION
    Close  the last polygon and start another  polygon
    at  (x,y).    Enter  necessary  points  in  vector
    buffer. Cosing a polygon may result in the generation
    of another @{"AreaDraw()" Link "AreaDraw()"} to close previous polygon.
    @{"Remember" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuition.h/Main" 927} to have an initialized @{"AreaInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 16} structure attached
    to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    rp - points to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    x,y - positions in the raster

RETURNS
    0 if no error
    -1 if no space left in vector list

BUGS

SEE ALSO
    @{"InitArea" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitArea()"} @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"} @{"AreaEllipse" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEllipse()"} @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "AskFont()" "graphics.library/AskFont"

NAME
    AskFont -- get the text attributes of the current font

SYNOPSIS
    AskFont(rp, textAttr)
            a1        a0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    struct @{"TextAttr" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 46} *textAttr;

FUNCTION
    This function fills the text attributes structure with the
    attributes of the current font in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    rp - the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} from which the text attributes are extracted
    textAttr - the @{"TextAttr" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 46} structure to be filled

BUGS

SEE ALSO
    @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "AskSoftStyle()" "graphics.library/AskSoftStyle"

NAME
    AskSoftStyle -- Get the soft style bits of the current font.

SYNOPSIS
    enable = AskSoftStyle(rp)
      d0                  a1

    ULONG enable;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    This function returns those style bits of the current font
    that are not intrinsic in the font itself, but
    algorithmically generated.  These are the bits that are
    valid to set in the enable mask for @{"SetSoftStyle" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetSoftStyle()"}

INPUTS
    rp - the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} from which the font and style      are extracted.

RESULTS
    enable - those bits in the style algorithmically generated
        Style bits that are not defined are also set.

BUGS

SEE ALSO
    @{"SetSoftStyle" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetSoftStyle()"}     @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "AttemptLockLayerRom()" "graphics.library/AttemptLockLayerRom"

                       *

NAME
    AttemptLockLayerRom -- Attempt to Lock @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure
                                     by rom(gfx lib) code

SYNOPSIS
    gotit = AttemptLockLayerRom( layer )
     d0                           a5

    BOOLEAN gotit;
    struct @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} *layer;

FUNCTION
    Query the current state of the lock on this @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24}. If it is
    already locked then return FALSE, could not lock. If the
    @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} was not locked then lock it and return TRUE.
    This call does not destroy any registers.
    This call nests so that callers in this chain will not lock
    themselves out.

INPUTS
    layer - pointer to @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure

RESULT
    returns TRUE or FALSE depending on whether the @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} is now
    locked by the caller.

SEE ALSO
    @{"LockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LockLayerRom()"} @{"UnlockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/UnlockLayerRom()"}

@EndNode

@Node "BltBitMap()" "graphics.library/BltBitMap"

NAME
    BltBitMap -- Move a rectangular region of bits in a @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}.

SYNOPSIS
    planecnt = BltBitMap(SrcBitMap, SrcX, SrcY, DstBitMap,
    D0                    A0      D0:16 D1:16   A1
              DstX, DstY, SizeX, SizeY, Minterm, Mask [, TempA])
              D2:16 D3:16 D4:16  D5:16   D6:8    D7:8    [A2]

    ULONG planecnt;
    struct @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} *SrcBitMap,*DstBitMap;
    SHORT SrcX,SrcY;
    SHORT DstX,DstY;
    SHORT SizeX,SizeY;
    UBYTE MinTerm,Mask;
    CPTR  TempA;    /*optional */

FUNCTION
    Perform non-destructive blits to move a rectangle from one
    area in a @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} to another area, which can be on a different
    @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}.
    This blit is assumed to be friendly: no error conditions (e.g.
    a rectangle outside the @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} bounds) are tested or reported.

INPUTS
    SrcBitMap, DstBitMap - the BitMap(s) containing the
            rectangles
        - the planes copied from the source to the destination are
          only those whose plane numbers are identical and less
          than the minimum Depth of either @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} and whose Mask
          bit for that plane is non-zero.
        - SrcBitMap and DstBitMap can be identical
    SrcX, SrcY - the x and y coordinates of the upper left corner
        of the source rectangle.  Valid range is positive
        signed integer such that the raster word's offset
        0..(32767-Size)
    DstX, DstY - the x and y coordinates of the upper left
        corner of the destination for the rectangle.  Valid
        range is as for Src.
    SizeX, SizeY - the size of the rectangle to be moved.  Valid
        range is (X: 1..976; Y: 1..1023 such that final raster
        word's offset is 0..32767)
    Minterm - the logic function to apply to the rectangle when
        A is non-zero (i.e. within the rectangle).  B is the
        source rectangle and C, D is the destination for the
        rectangle.
        - $0C0 is a vanilla copy
        - $030 inverts the source before the copy
        - $050 ignores the source and inverts the destination
        - see the hardware reference manual for other combinations
    Mask - the write mask to apply to this operation.  Bits set
        indicate the corresponding planes (if not greater than
        the minimum plane count) are to participate in the
        operation.  Typically this is set to 0xff.
    TempA - If the copy overlaps exactly to the left or right
        (i.e. the scan line addresses overlap), and TempA is
        non-zero, it points to enough chip accessable memory
        (MAXBYTESPERROW) to hold a line of A source for the blit.
        BitBitMap will allocate the needed TempA if none is
        provided and one is needed. If the blit does not overlap;
        SrcBitMap != DstBitMap then TempA need not be supplied.

RESULTS
    planecnt - the number of planes actually involved in the blit.

BUGS
    This routine uses over 300 bytes of stack when it really does
    not need to. It calculates all blits ahead of time and then
    sits in a loop doing the blits when it should overlap blits
    with calculations.

SEE ALSO
    @{"ClipBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ClipBlit()"} @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0} @{"hardware/blit.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 0}

@EndNode

@Node "BltBitMapRastPort()" "graphics.library/BltBitMapRastPort"

NAME
    BltBitMapRastPort -- Blit from source bitmap to destination rastport.

SYNOPSIS
    BltBitMapRastPort
        (srcbm,srcx,srcy,destrp,destX,destY,sizeX,sizeY,minterm)
         a0    d0   d1   a1     d2    d3    d4    d5    d6

    struct @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} *srcbm;
    SHORT srcx,srcy;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *destrp;
    SHORT destX,destY;
    SHORT sizeX,sizeY;
    UBYTE minterm;

FUNCTION
    Blits from source bitmap to position specified in destination rastport
     using minterm.

INPUTS
    srcbm - a pointer to the source bitmap
    srcx  - x offset into source bitmap
    srcy  - y offset into source bitmap
    destrp - a pointer to the destination rastport
    destX - x offset into dest rastport
    destY - y offset into dest rastport
    sizeX - width of blit in pixels
    sizeY - height of blit in rows
    minterm - minterm to use for this blit

RETURNS
    TRUE

BUGS

SEE ALSO
    @{"BltMaskBitMapRastPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/BltMaskBitMapRastPort()"} @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "BltClear()" "graphics.library/BltClear"

NAME
    BltClear - Clear a block of memory words to zero.

SYNOPSIS
    BltClear( memBlock, bytecount, flags )
                a1         d0       d1

    APTR memBlock;
    ULONG   bytecount;
    ULONG   flags;

FUNCTION
    For memory that is local and blitter accessable
    the most efficient way to clear a range of memory locations is
    to use the system's most efficient data mover, the blitter.
    This command accepts the starting location and count and clears
    that block to zeros.

INPUTS
    memBloc - pointer to local memory to be cleared
            memBlock is assumed to be even.
    flags   set bit 0 to force function to wait until blit
            is done.
            set bit1 to use row/bytesperrow
    bytecount       if (flags & 2) == 0 then
                            even number of bytes to clear.
                    else
                            low 16 bits is taken as number of bytes
                            per row and upper 16 bits taken as
                            number of rows.

    This function is somewhat hardware dependant. In the
    rows/bytesperrow mode, rows must be <=1024.
    In bytecount mode multiple runs of the blitter
    may be used to clear all the memory.
may be used to clear all the memory.

RESULT
    The block of memory is set to zeros.

BUGS

SEE ALSO

@EndNode

@Node "BltMaskBitMapRastPort()" "graphics.library/BltMaskBitMapRastPort"

NAME
    BltMaskBitMapRastPort -- blit from source bitmap to destination
                             rastport with masking of source image.

SYNOPSIS
    BltMaskBitMapRastPort
        (srcbm,srcx,srcy,destrp,destX,destY,sizeX,sizeY,minterm,bltmask)
         a0    d0   d1   a1     d2    d3    d4    d5    d6      a2

    struct @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} *srcbm;
    SHORT srcx,srcy;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *destrp;
    SHORT destX,destY;
    SHORT sizeX,sizeY;
    UBYTE   minterm;
    APTR    bltmask;        * chip memory *

FUNCTION
    Blits from source bitmap to position specified in destination rastport
    using bltmask to determine where source overlays destination, and
    minterm to determine whether to copy the source image "as is" or
    to "invert" the sense of the source image when copying. In either
    case, blit only occurs where the mask is non-zero.

INPUTS
    srcbm - a pointer to the source bitmap
    srcx  - x offset into source bitmap
    srcy  - y offset into source bitmap
    destrp - a pointer to the destination rastport
    destX - x offset into dest rastport
    destY - y offset into dest rastport
    sizeX - width of blit in pixels
    sizeY - height of blit in rows
    minterm - either (ABC|ABNC|ANBC) if copy source and blit thru mask
              or     (ANBC)        if invert source and blit thru mask
    bltmask - pointer to the single bit-plane mask, which must be the
              same size and dimensions as the planes of the
              source bitmap.

RETURNS

BUGS

SEE ALSO

@{"BltBitMapRastPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/BltBitMapRastPort()"}        @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "BltPattern()" "graphics.library/BltPattern"

NAME
    BltPattern --  Using standard drawing rules for areafill,
                                     blit through a mask.

SYNOPSIS
    BltPattern(rp, mask, xl, yl, maxx, maxy, bytecnt)
              a1,  a0   d0  d1   d2   d3     d4

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    APTR    mask;
    SHORT   xl,yl,maxx,maxy;
    SHORT bytecnt;

FUNCTION
    Blit using drawmode,areafill pattern, and mask
    at position rectangle (xl,yl) (maxx,maxy).

INPUTS
    rp -  points to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    mask -  points to 2 dimensional mask if needed
           if mask == NULL then use a rectangle.
    xl,yl - upper left of rectangular region in @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    maxx,maxy - points to lower right of rectangular region in @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    bytecnt - BytesPerRow for mask

RETURNS

SEE ALSO
    @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"}

@EndNode

@Node "BltTemplate()" "graphics.library/BltTemplate"

NAME
    BltTemplate -- Cookie cut a shape in a rectangle to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SYNOPSIS
    BltTemplate(SrcTemplate, SrcX, SrcMod, rp,
                a0           d0:16  d1:16  a1
                DstX,  DstY, SizeX, SizeY)
                d2:16  d3:16 d4:16  d5:16

    CPTR    SrcTemplate;
    SHORT   SrcX;
    SHORT   SrcMod;
    struct  @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT   DstX,DstY;
    SHORT   SizeX,SizeY;

FUNCTION
    This function draws the image in the template into the
    @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} in the current color and drawing mode at the
    specified position.  The template is assumed not to overlap
    the destination.
    If the template falls outside the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} boundary, it is
    truncated to that boundary.

    Note: the SrcTemplate pointer should point to the "nearest" word
       (rounded down) of the template mask. Fine alignment of the mask
       is acheived by setting the SrcX bit offseet within the range
       of 0 to 15 decimal.

INPUTS
    SrcTemplate - pointer to the first (nearest) word of the template mask.
    SrcX - x bit offset into the template mask (range 0..15).
    SrcMod - number of bytes per row in template mask.
    rp - pointer to destination @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.
    DstX, DstY - x and y coordinates of the upper left
        corner of the destination for the blit.
    SizeX, SizeY - size of the rectangle to be used as the
        template.

BUGS
    The destination rastport (rp) must have an associated
    @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure or srcX will be ignored.

SEE ALSO
    @{"BltPattern" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/BltPattern()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "CBump()" "graphics.library/CBump"

NAME
    CBump -  increment user copper list pointer (bump to next position in
             list).

SYNOPSIS
    CBump( c )
          a1

    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *c;

FUNCTION
    Increment pointer to space for next instruction in user copper list.

INPUTS
    c - pointer to @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} structure

RESULTS
    User copper list pointer is incremented to next position.
    Pointer is repositioned to next user copperlist instruction block
    if the current block is full.

        Note: CBump is usually invoked for the programmer as part of the
              macro definitions @{"CWAIT" Link "CWAIT"} or @{"CMOVE" Link "CMOVE"}.

BUGS

SEE ALSO
    @{"CINIT" Link "CINIT"} @{"CWAIT" Link "CWAIT"} @{"CMOVE" Link "CMOVE"} @{"CEND" Link "CEND"} @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "CEND" "graphics.library/CEND"

NAME
    CEND -- Terminate user copper list.

SYNOPSIS
    CEND( c )

    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *c;

FUNCTION
    Add instruction to terminate user copper list.

INPUTS
    c - pointer to @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} structure

RESULTS
    This is actually a macro that calls the macro CWAIT(c,10000,255).
    10000 is a magical number that the graphics library uses.
    I hope display technology doesn't catch up too fast!

BUGS

SEE ALSO
    @{"CINIT" Link "CINIT"} @{"CWAIT" Link "CWAIT"} @{"CMOVE" Link "CMOVE"} @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "ChangeSprite()" "graphics.library/ChangeSprite"

NAME
    ChangeSprite -- Change the sprite image pointer.

SYNOPSIS
    ChangeSprite( vp, s, newdata)
                 a0  a1   a2

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;
    struct @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} *s;
    APTR    newdata;        /* chip memory */

FUNCTION
    The sprite image is changed to use the data starting at newdata

INPUTS
    vp - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure that this sprite is
              relative to.
              or 0 if relative only top of @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46}
    s - pointer to @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure
    newdata - pointer to data structure of the following form.
            struct spriteimage
            {
                UWORD    posctl[2]; /* used by simple sprite machine*/
                UWORD    data[height][2];   /* actual sprite image */
                UWORD    reserved[2];       /* initialized to */
                                                 /*  0x0,0x0 */
            };
    Programmer must initialize reserved[2].  Spriteimage must be
    in CHIP memory. The height subfield of the @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure
    must be set to reflect the height of the new spriteimage BEFORE
    calling ChangeSprite. The programmer may allocate two sprites to
    handle a single attached sprite.  After @{"GetSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetSprite()"}, ChangeSprite,
    the programmer can set the SPRITE_ATTACHED bit in posctl[1] of the
    odd numbered sprite.
    If you need more than 8 sprites look up VSprites in the
    graphics documentation.

RESULTS

BUGS

SEE ALSO
    @{"FreeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeSprite()"} ChangeSprite @{"MoveSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MoveSprite()"} @{"AddVSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddVSprite()"} @{"graphics/sprite.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 0}

@EndNode

@Node "CINIT" "graphics.library/CINIT"

NAME
    CINIT -- Initialize user copperlist to accept intermediate
            user copper instructions.

SYNOPSIS
    ucl = CINIT( c , n )

    UCopperListInit( c , n )
                     a0  d0

    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *ucl;
    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *c;
    short n;

FUNCTION
    Allocates and/or initialize copperlist structures/buffers.
    This is a macro that calls UCopListLinit. CINIT will
    allocate a new @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} if c==0. If (c != 0) it will
    initialize the data structures to begin new copperlist
    without allocating more memory and it ignores n.

INPUTS
    c - pointer to @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} structure
    n - number of instructions buffer must hold

RESULTS
    An initialize list to accept intermediate copper instructions.

BUGS
    CINIT will not actually allocate a new copperlist if c==0.
    Instead you must allocate a 12 byte MEMF_PUBLIC|MEMF_CLEAR block,
    and pass it to this function.  The system's @{"FreeVPortCopLists" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeVPortCopLists()"}
    function will take care of deallocating it.

SEE ALSO

@EndNode

@Node "ClearEOL()" "graphics.library/ClearEOL"

NAME
    ClearEOL - Clear from current position to end of line.

SYNOPSIS
    ClearEOL( rp )
              a1

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Clear a rectangular swath from the current position to the
    right edge of the rastPort.  The height of the swath is taken
    from that of the current text font, and the vertical
    positioning of the swath is adjusted by the text baseline,
    such that text output at this position would lie wholly on
    this newly cleared area.
    Clearing consists of setting the color of the swath to zero,
    or, if the DrawMode is 2, to the BgPen.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
    Text @{"ClearScreen" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ClearScreen()"} @{"SetRast" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRast()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "ClearRectRegion()" "graphics.library/ClearRectRegion"

NAME
    ClearRectRegion -- Perform 2d CLEAR operation of rectangle
                    with region, leaving result in region.

SYNOPSIS
    status = ClearRectRegion(region,rectangle)
     d0                       a0      a1

    BOOL error;
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;
    struct @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} *rectangle;

FUNCTION
    Clip away any portion of the region that exists inside
    of the rectangle. Leave the result in region.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    rectangle - pointer to @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} structure

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

SEE ALSO
    @{"AndRectRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AndRectRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "ClearRegion()" "graphics.library/ClearRegion"

NAME
    ClearRegion -- Remove all rectangles from region.

SYNOPSIS
    ClearRegion(region)
                 a0

    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;

FUNCTION
    Clip away all rectangles in the region leaving nothing.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure

BUGS

SEE ALSO
    @{"NewRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/NewRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "ClearScreen()" "graphics.library/ClearScreen"

NAME
    ClearScreen - Clear from current position to end of @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SYNOPSIS
    ClearScreen( rp )
                 a1

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Clear a rectangular swath from the current position to the
    right edge of the rastPort with @{"ClearEOL" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ClearEOL()"}, then clear the rest
    of the screen from just beneath the swath to the bottom of
    the rastPort.
    Clearing consists of setting the color of the swath to zero,
    or, if the DrawMode is 2, to the BgPen.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure

BUGS

SEE ALSO
    @{"ClearEOL" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ClearEOL()"} Text @{"SetRast" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRast()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "ClipBlit()" "graphics.library/ClipBlit"

NAME
    ClipBlit  --  Calls @{"BltBitMap()" Link "BltBitMap()"} after accounting for windows

SYNOPSIS
    ClipBlit(Src, SrcX, SrcY, Dest, DestX, DestY, XSize, YSize, Minterm );
        a0   d0    d1    a1    d2     d3     d4     d5     d6

FUNCTION
    Performs the same function as @{"BltBitMap()" Link "BltBitMap()"}, except that it
    takes into account the Layers and ClipRects of the layer library,
    all of which are (and should be) transparent to you.  So, whereas
    @{"BltBitMap()" Link "BltBitMap()"} requires pointers to BitMaps, ClipBlit requires pointers to
    the RastPorts that contain the Bitmaps, Layers, et cetera.
    If you are going to blit blocks of data around via the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} of your
    Intuition @{"Window" Link "ADCD_v1.2:Inc&AD1.3/Includes/intuition/intuition.h/Main" 692}, you must call this routine (rather than @{"BltBitMap()" Link "BltBitMap()"}).
    Either the Src @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}, the Dest @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}, both, or neither, can have
    Layers.  This routine takes care of all cases.
    See @{"BltBitMap()" Link "BltBitMap()"} for a thorough explanation.

INPUTS
    Src = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} of the source for your blit
    SrcX, SrcY = the topleft offset into Src for your data
    Dest = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to receive the blitted data
    DestX, DestY = the topleft offset into the destination @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    XSize = the width of the blit
    YSize = the height of the blit

Minterm = the boolean blitter function, where SRCB is associated with the
         Src @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} and SRCC goes to the Dest @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

RESULT
    None

BUGS
    None

SEE ALSO
    @{"BltBitMap()" Link "BltBitMap()"}

@EndNode

@Node "CloseFont()" "graphics.library/CloseFont"

NAME
    CloseFont -- Release a pointer to a system font.

SYNOPSIS
    CloseFont(font)
               a1

    struct @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} *font;

FUNCTION
    This function indicates that the font specified is no longer
    in use.  It is used to close a font opened by @{"OpenFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OpenFont()"}, so
    that fonts that are no longer in use do not consume system
    resources.

INPUTS
    font -  a font pointer as returned by @{"OpenFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OpenFont()"} or @{"OpenDiskFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/diskfont/OpenDiskFont()"}

BUGS

SEE ALSO
    @{"OpenFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OpenFont()"} @{"diskfont.library/OpenDiskFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/diskfont/OpenDiskFont()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "CMOVE" "graphics.library/CMOVE"

NAME
    CMOVE -- append copper move instruction to user copper list.

SYNOPSIS
    CMOVE( c , a , v )

    CMove( c , a , v )
          a1  d0  d1
    CBump( c )
          a1

    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *c;
    APTR    a;
    SHORT   v;

FUNCTION
    Add instruction to move value v to hardware register a.

INPUTS
    c - pointer to @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} structure
    a - hardware register
    v - 16 bit value to be written

RESULTS
    This is actually a macro that calls CMove(c,&a,v)
    and then calls CBump(c) to bump the local pointer
    to the next instruction. Watch out for macro side affects.

BUGS

SEE ALSO
    @{"CINIT" Link "CINIT"} CMOVE @{"CWAIT" Link "CWAIT"} @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "CopySBitMap()" "graphics.library/CopySBitMap"

NAME
    CopySBitMap --   Syncronize @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} window with contents of
                                            Super @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}

SYNOPSIS
    CopySBitMap( layer )
                 a0

    struct @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} *layer;

FUNCTION
    This is the inverse of @{"SyncSBitMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SyncSBitMap()"}.
    Copy all bits from SuperBitMap to @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} bounds.
    This is used for those functions that do not
    want to deal with the @{"ClipRect" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 53} structures but do want
    to be able to work with a SuperBitMap @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24}.

INPUTS
    layer - pointer to a SuperBitMap @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24}
        The @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} must already be locked by the caller.

BUGS

SEE ALSO
    @{"LockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LockLayerRom()"} @{"SyncSBitMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SyncSBitMap()"}

@EndNode

@Node "CWAIT" "graphics.library/CWAIT"

NAME
    CWAIT -- Append copper wait instruction to user copper list.

SYNOPSIS
    CWAIT( c , v , h )

    CWait( c , v , h )
           a1  d0  d1
    CBump( c )
          a1

    struct @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} *c;
    short v,h;

FUNCTION
    Add instruction to wait for vertical beam position v and
    horizontal position h to this intermediate copper list.

INPUTS
    c - pointer to @{"UCopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 68} structure
    v - vertical beam position (relative to top of viewport)
    h - horizontal beam position

RESULTS
    this is actually a macro that calls CWait(c,v,h)
    and then calls CBump(c) to bump the local pointer
    to the next instruction.

BUGS
    User waiting for horizontal values of greater than 222 decimal is
    illegal.

SEE ALSO
    @{"CINIT" Link "CINIT"} @{"CMOVE" Link "CMOVE"} @{"CEND" Link "CEND"} @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "DisownBlitter()" "graphics.library/DisownBlitter"

NAME
    DisownBlitter - return blitter to free state.

SYNOPSIS
    DisownBlitter()

FUNCTION
            Free blitter up for use by other blitter users.

INPUTS

RETURNS

SEE ALSO
    @{"OwnBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OwnBlitter()"}

@EndNode

@Node "DisposeRegion()" "graphics.library/DisposeRegion"

NAME
    DisposeRegion -- Return all space for this region to free
                     memory pool.

SYNOPSIS
    DisposeRegion(region)
                  a0

    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;

FUNCTION
    Free all RegionRectangles for this @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} then
    free the @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} itself.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure

BUGS

SEE ALSO
    @{"NewRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/NewRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "DoCollision()" "graphics.library/DoCollision"

NAME
    DoCollision -- Test every gel in gel list for collisions.

SYNOPSIS
    DoCollision(rp)
               a1

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Tests each gel in gel list for boundary and gel-to-gel collisions.
    On detecting one of these collisions, the appropriate collision-
    handling routine is called.  See the documentation for a thorough
    description of which collision routine is called. This routine
    expects to find the gel list correctly sorted in Y,X order.
    The system routine @{"SortGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SortGList()"} performs this function for the user

INPUTS
    rp = pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"SortGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SortGList()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "Draw()" "graphics.library/Draw"

NAME
    Draw -- Draw a line between the current pen position
                   and the new x,y position.

SYNOPSIS
    Draw( rp,   x,     y)
         a1  d0:16  d1:16

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT x,y;

FUNCTION
    Draw a line from the current pen position to (x,y).

INPUTS
    rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    x,y - point in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to end the line.

BUGS

SEE ALSO
    Move @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "DrawEllipse()" "graphics.library/DrawEllipse"

NAME
    DrawEllipse -- Draw an ellipse centered at cx,cy with vertical
       and horizontal radii of a,b respectively.

SYNOPSIS
    DrawEllipse( rp, cx, cy, a, b )
                 a1  d0  d1  d2 d3

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT cx, cy;
    SHORT a, b;

FUNCTION
    Create an elliptical outine within the rectangular region
    specified by the parameters, using the current foreground pen color.

INPUTS
    rp - pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} into which the ellipse will be drawn.
    cx - x coordinate of the centerpoint relative to the rastport.
    cy - y coordinate of the centerpoint relative to the rastport.
    a - the horizontal radius of the ellipse (note: a must be > 0)
    b - the vertical radius of the ellipse (note: b must be > 0)

    Note: this routine does not clip the ellipse to a non-layered rastport.

BUGS

SEE ALSO
    DrawCircle, @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "DrawGList()" "graphics.library/DrawGList"

NAME
    DrawGList -- @{"Process" Link "ADCD_v1.2:Inc&AD1.3/Includes/libraries/dosextens.h/Main" 33} the gel list, queueing VSprites, drawing Bobs.

SYNOPSIS
    DrawGList(rp, vp)
             a1  a0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;

FUNCTION
    Performs one pass of the current gel list.
      - If nextLine and lastColor are defined, these are
            initialized for each gel.
       - If it's a @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} build it into the copper list.
       - If it's a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134}, draw it into the current raster.
      - Copy the save values into the "old" variables,
            double-buffering if required.

INPUTS
    rp = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} where Bobs will be drawn
    vp = pointer to the @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} for which VSprites will be created

BUGS
    MUSTDRAW isn't implemented yet.

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}  @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "Flood()" "graphics.library/Flood"

NAME
    Flood -- Flood rastport like areafill.

SYNOPSIS
    error = Flood( rp, mode, x, y)
    d0            a1   d2  d0  d1

    BOOLEAN error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} rp;
    ULONG mode;
    SHORT x,y;

FUNCTION
    Search the @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} starting at (x,y). Fill all adjacent pixels
    if they are:
    a: arenot the same as AOLPen     Mode 0
    b: same as the one at (x,y)          Mode 1
    When actually doing the fill use the modes that apply to
    standard areafill routine such as drawmodes and patterns.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    (x,y) - coordinate in @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}
    mode -  0 fill all adjacent pixels searching for border
            1 fill all adjacent pixels that have same pen number
                            as (x,y)

    Note: in order to use Flood, the destination @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} must
            have a valid @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27} raster whose size is as large as
            that of the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SEE ALSO
    @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "FreeColorMap()" "graphics.library/FreeColorMap"

NAME
    FreeColorMap -- Free the @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} structure and return memory
                                            to free memory pool.

SYNOPSIS
    FreeColorMap( colormap )
                   a0

    struct @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} *colormap;

FUNCTION
    Return the memory to the free memory pool that was allocated
        with @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"}.

INPUTS
    colormap - pointer to @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} allocated with @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"}

RESULT
    The space is made available for others to use.

BUGS

SEE ALSO
    @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"} @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "FreeCopList()" "graphics.library/FreeCopList"

NAME
    FreeCopList -- deallocate intermediate copper list

SYNOPSIS
    FreeCopList(coplist)
                  a0

    struct @{"CopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 54} *coplist;

FUNCTION
    Deallocate all memory associated with this copper list.

INPUTS
    coplist  - pointer to structure @{"CopList" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 54}

RESULTS
    memory returned to memory manager

BUGS

SEE ALSO
    @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "FreeCprList()" "graphics.library/FreeCprList"

NAME
    FreeCprList -- deallocate hardware copper list

SYNOPSIS
    FreeCprList(cprlist)
                  a0

    struct @{"cprlist" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 47} *cprlist;

FUNCTION
    return @{"cprlist" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 47} to free memory pool

INPUTS
    @{"cprlist" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 47} - pointer to @{"cprlist" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 47} structure

RESULTS
    memory returned and made available to other tasks

BUGS

SEE ALSO
    @{"graphics/copper.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/copper.h/Main" 0}

@EndNode

@Node "FreeGBuffers()" "graphics.library/FreeGBuffers"

NAME
    FreeGBuffers -- Deallocate memory obtained by GetGBufers.

SYNOPSIS
    FreeGBuffers(anOb, rp, db)
                a0    a1  d0

    struct @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} *anOb;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    BOOL db;

FUNCTION
    For each sequence of each component of the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198},
    deallocate memory for:
       SaveBuffer
       BorderLine
       CollMask and ImageShadow (point to same buffer)
       if db is set (user had used double-buffering) deallocate:
           @{"DBufPacket" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 228}
           BufBuffer

INPUTS
    anOb = pointer to the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} structure
    rp = pointer to the current @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    db = double-buffer indicator (set TRUE for double-buffering)

BUGS

SEE ALSO
    @{"GetGBuffers" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetGBuffers()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "FreeRaster()" "graphics.library/FreeRaster"

NAME
    FreeRaster -- Release an allocated area to the system free memory pool.

SYNOPSIS
    FreeRaster( p, width, height)
               a0   d0:16  d1:16

    PLANEPTR p;
    USHORT width,height;

FUNCTION
    Return the memory associated with this PLANEPTR of size
    width and height to the MEMF_CHIP memory pool.

INPUTS
    p  =  a pointer to a memory space  returned  as  a
                   result of a call to @{"AllocRaster" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AllocRaster()"}.

    width - the width in bits of the bitplane.
    height - number of rows in bitplane.

    the same values of width and height with which  you
    called @{"AllocRaster" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AllocRaster()"} in the first  place,  when  the
    pointer p returned.   This defines the size of the
    memory  space which is to be returned to the  free
    memory pool.

BUGS

SEE ALSO
    @{"AllocRaster" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AllocRaster()"} @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0}

@EndNode

@Node "FreeSprite()" "graphics.library/FreeSprite"

NAME
    FreeSprite -- Return sprite for use by others and virtual
                                      sprite machine.

SYNOPSIS
    FreeSprite( pick )
                d0

    SHORT pick;

FUNCTION
    Mark sprite as available for others to use.
    These sprite routines are provided to ease sharing of sprite
    hardware and to handle simple cases of sprite usage and
    movement.  It is assumed the programs that use these routines
    do want to be good citizens in their hearts. ie: they will
    not FreeSprite unless they actually own the sprite.
    Virtual Sprite machine may ignore simple sprite machine.

INPUTS
    pick - number in range of 0-7

RESULTS
    sprite made available for subsequent callers of @{"GetSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetSprite()"}
    as well as use by Virtual Sprite Machine

BUGS

SEE ALSO
    @{"GetSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetSprite()"} @{"ChangeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ChangeSprite()"} @{"MoveSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MoveSprite()"} @{"graphics/sprite.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 0}

@EndNode

@Node "FreeVPortCopLists()" "graphics.library/FreeVPortCopLists"

NAME
    FreeVPortCopLists -- deallocate all intermediate copper lists and
    their headers from a viewport

SYNOPSIS
    FreeVPortCopLists(vp)
                     a0

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;

FUNCTION
    Search display, color, sprite, and user copper
    lists and call @{"FreeMem()" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/exec/FreeMem()"} to deallocate them from memory

INPUTS
    vp - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure

RESULTS
    vp->DspIns = NULL; vp->SprIns = NULL; vp->ClrIns = NULL;
    vp->UCopIns = NULL;

BUGS
    none known

SEE ALSO
    @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "GetColorMap()" "graphics.library/GetColorMap"

NAME
    GetColorMap -- allocate and initialize Colormap

SYNOPSIS
    cm = GetColorMap( entries )
    d0                   d0

    struct @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} *cm;
    LONG entries;

FUNCTION
    Allocates, initializes and returns a pointer to a @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20}
    data structure, later enabling calls to @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"}
    and @{"LoadRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LoadRGB4()"} to load colors for a view port. The ColorTable
    pointer in the @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} structure points to a hardware
    specific colormap data structure. You should not count on
    it being anything you can understand. Use @{"GetRGB4()" Link "GetRGB4()"} to
    query it or @{"SetRGB4CM" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4CM()"} to set it directly.

INPUTS
    entries - number of entries for this colormap

RESULT
    The pointer value returned by this routine, if nonzero,
    may be stored into the ViewPort.ColorMap pointer.
    If a value of 0 is returned, the system was unable
    to allocate enough memory space for the required
    data structures.

BUGS

SEE ALSO
    @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"} @{"FreeColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeColorMap()"}

@EndNode

@Node "GetGBuffers()" "graphics.library/GetGBuffers"

NAME
    GetGBuffers -- Attempt to allocate ALL buffers of an entire @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}.

SYNOPSIS
    status = GetGBuffers(anOb, rp, db)
     d0                 a0    a1  d0

    BOOL status;
    struct @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} *anOb;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    BOOL db;

FUNCTION
    For each sequence of each component of the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}, allocate memory for:

       SaveBuffer
       BorderLine
       CollMask and ImageShadow (point to same buffer)
       if db is set TRUE (user wants double-buffering) allocate:
           @{"DBufPacket" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 228}
           BufBuffer

INPUTS
    anOb = pointer to the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} structure
    rp = pointer to the current @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    db = double-buffer indicator (set TRUE for double-buffering)

RESULT
    status = TRUE if the memory allocations were all successful, else FALSE

BUGS
    If any of the memory allocations fail it does not free the partial
    allocations that did succeed.

SEE ALSO
    @{"FreeGBuffers" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeGBuffers()"} @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "GetRGB4()" "graphics.library/GetRGB4"

NAME
    GetRGB4 -- Inquire value of entry in @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20}.

SYNOPSIS
    value = GetRGB4( colormap, entry )
      d0              a0       d0

    ULONG value;
    struct @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} *colormap;
    LONG entry;

FUNCTION
    Read and format a value from the @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20}.

INPUTS
    colormap - pointer to @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} structure
    entry - index into colormap

RESULT
    returns -1 if no valid entry
    return UWORD RGB value 4 bits per gun right justified

BUGS

SEE ALSO
    @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"} @{"LoadRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LoadRGB4()"} @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"} @{"FreeColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeColorMap()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "GetSprite()" "graphics.library/GetSprite"

NAME
    GetSprite -- Attempt to get a sprite for the simple sprite
                                     manager.

SYNOPSIS
    Sprite_Number = GetSprite( sprite, pick )
        d0                      a0      d0

    SHORT Sprite_Number;
    struct @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} *sprite;
    SHORT pick;

FUNCTION
    Attempt to allocate one of the eight sprites for private use
    with the simple sprite manager. This must be done before using
    further calls to simple sprite machine. If the programmer
    wants to use 15 color sprites you must allocate both sprites
    and set the 'SPRITE_ATTACHED' bit in the odd sprite's posctldata
    array.

INPUTS
    sprite - ptr to programmers @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure.
    pick - number in the range of 0-7 or
      -1 if programmer just wants the next one.

RESULTS
    If pick is 0-7 attempt to allocate the sprite. If the sprite
    is already allocated then return -1.
    If pick -1 allocate the next sprite starting search at 0.
    If no sprites are available return -1 and fill -1 in num entry
    of @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure.
    If the sprite is available for allocation, mark it allocated
    and fill in the 'num' entry of the @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure.
    If successful return the sprite number.

BUGS

SEE ALSO
    @{"FreeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeSprite()"} @{"ChangeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ChangeSprite()"} @{"MoveSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MoveSprite()"} GetSprite @{"graphics/sprite.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 0}

@EndNode

@Node "InitArea()" "graphics.library/InitArea"

NAME
    InitArea -- Initialize vector collection matrix

SYNOPSIS
    InitArea( areainfo, buffer, maxvectors )
                a0          a1      d0

    struct @{"AreaInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 16} *areainfo;
    APTR buffer;
    SHORT maxvectors;

FUNCTION
    This function provides initialization for the vector collection matrix
    such that it has a size of (max vectors ).  The size of the region
    pointed to by buffer (short pointer) should be five (5) times as large
    as maxvectors. This size is in bytes.  Areafills done by using
    @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"}, @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"}, and @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} must have enough space allocated in
    this table to store all the points of the largest fill. @{"AreaEllipse" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEllipse()"}
    takes up two vectors for every call. If AreaMove/Draw/Ellipse detect
    too many vectors going into the buffer they will return -1.

INPUTS
    areainfo - pointer to @{"AreaInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 16} structure
    buffer - pointer to chunk of memory to collect vertices
    maxvectors - max number of vectors this buffer can hold

RESULT
    Pointers are set up to begin storage of vectors done by
    @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"}, @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"}, and @{"AreaEllipse" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEllipse()"}.

BUGS

SEE ALSO
    @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"AreaMove" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaMove()"} @{"AreaDraw" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaDraw()"} @{"AreaEllipse" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEllipse()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "InitBitMap()" "graphics.library/InitBitMap"

NAME
    InitBitMap -- Initialize bit map structure with input values.

SYNOPSIS
    InitBitMap( bm, depth, width, height )
                a0   d0     d1      d2

    struct @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} *bm;
    BYTE depth;
    SHORT width, height;

FUNCTION
    Initialize various elements in the @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} structure to
    correctly reflect depth, width, and height.
    Must be used before use of @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} in other graphics calls.
    The Planes[8] are not initialized and need to be set up
    by the caller.  The Planes table was put at the end of the
    structure so that it may be truncated to conserve space,
    as well as extended. All routines that use @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} should
    only depend on existence of depth number of bitplanes.

INPUTS
    bm - pointer to a @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} structure (gfx.h)
    depth - number of bitplanes that this bitmap will have
    width - number of bits (columns) wide for this @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}
    height- number of bits (rows) tall for this @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}

BUGS

SEE ALSO
    @{"graphics/gfx.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 0}

@EndNode

@Node "InitGels()" "graphics.library/InitGels"

NAME
    InitGels -- initialize a gel list; must be called before using gels.

SYNOPSIS
    InitGels(head, tail, GInfo)
            a0    a1    a2

    struct @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} *head, *tail;
    struct @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34} *GInfo;

FUNCTION
    Assigns the VSprites as the head and tail of the gel list in @{"GfxBase" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfxbase.h/Main" 22}.
    Links these two gels together as the keystones of the list.
    If the collHandler vector points to some memory array, sets
    the BORDERHIT vector to NULL.

INPUTS
    head = pointer to the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} structure to be used as the gel list head

    tail = pointer to the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} structure to be used as the gel list tail

    GInfo = pointer to the @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34} structure to be initialized

BUGS

SEE ALSO
    @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}   @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "InitGMasks()" "graphics.library/InitGMasks"

NAME
    InitGMasks -- Initialize all of the masks of an @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}.

SYNOPSIS
    InitGMasks(anOb)
               a0

    struct @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198} *anOb;

FUNCTION
    For every sequence of every component call @{"InitMasks" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitMasks()"}.

INPUTS
    anOb = pointer to the @{"AnimOb" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 198}

BUGS

SEE ALSO
    @{"InitMasks" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitMasks()"} @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "InitMasks()" "graphics.library/InitMasks"

NAME
    InitMasks -- Initialize the BorderLine and CollMask masks of a @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67}.

SYNOPSIS
    InitMasks(vs)
             a0

    struct @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} *vs;

FUNCTION
    Creates the appropriate BorderLine and CollMask masks of the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67}.
    Correctly detects if the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} is actually a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} definition, handles
    the image data accordingly.

INPUTS
    vs = pointer to the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} structure

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "InitRastPort()" "graphics.library/InitRastPort"

NAME
    InitRastPort -- Initialize raster port structure

SYNOPSIS
    InitRastPort( rp )
                  a1

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;

FUNCTION
    Initialize  a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure to standard values.
    The struct Rastport describes a control  structure
    for a write-able raster.   The @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}  structure
    describes  how a complete single playfield display
    will be written into. A  @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}   structure   is
    referenced   whenever   any  drawing  or   filling
    operations  are  to be performed on a  section  of
    memory.

    The section of memory which is being used in  this
    way  may  or  may not be presently a part  of  the
    current actual onscreen display memory.   The name
    of  the actual memory section which is  linked  to
    the  @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} is referred to here as a "raster" or
    as a bitmap.

    NOTE:    Calling   the   routine InitRastPort only
    establishes   various  defaults.    It  does   NOT
    establish  where,   in  memory,  the  rasters  are
    located. To do graphics with this @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} the user
    must set up the @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} pointer in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    rp      = pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure.

RESULT
    all entries in @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} get zeroed out.
    exceptions:
            The following get -1:
                    Mask,FgPen,AOLPen,LinePtrn
            DrawMode = JAM2
            The font is set to the standard system font

BUGS

SEE ALSO
    @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "InitTmpRas()" "graphics.library/InitTmpRas"

NAME
    InitTmpRas -- Initialize area of local memory for usage by
                    areafill, floodfill, text.

SYNOPSIS
    InitTmpRas(tmpras, buffer, size)
                a0       a1     d0

    struct @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27} *tmpras;
    APTR buffer;
    LONG size;

FUNCTION
    The area of memory pointed to by buffer is set up to be used
    by @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} routines that may need to get some memory for
    intermediate operations in preparation to putting the graphics
    into the final @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}.
    Tmpras is used to control the usage of buffer.

INPUTS
    tmpras - pointer to a @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27} structure to be linked into
            a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    buffer - pointer to a contguous piece of chip memory.
    size - size in bytes of buffer

RESULT
    makes buffer available for users of @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

BUGS
    Would be nice if RastPorts could share one @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27}.

SEE ALSO
    @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"Flood" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/Flood()"} Text @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "InitView()" "graphics.library/InitView"

NAME

InitView - Initialize @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure.

SYNOPSIS
    InitView( view )
               a1

    struct @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} *view;

FUNCTION
    Initialize @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure to default values.

INPUTS
    view - pointer to a @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure

RESULT
    @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure set to all 0's. (1.0,1.1.1.2)
    Then values are put in DxOffset,DyOffset to properly position
    default display about .5 inches from top and left on monitor.
    InitView pays no attention to previous contents of view.

BUGS

SEE ALSO
    @{"MakeVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MakeVPort()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "InitVPort()" "graphics.library/InitVPort"

NAME
    InitVPort - Initialize @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure.

SYNOPSIS
    InitVPort( vp )
               a0

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;

FUNCTION
    Initialize @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure to default values.

INPUTS
    vp - pointer to a @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure

RESULT

BUGS

SEE ALSO
    @{"MakeVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MakeVPort()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "LoadRGB4()" "graphics.library/LoadRGB4"

NAME
    LoadRGB4 -- Load RGB color values from table.

SYNOPSIS
    LoadRGB4( vp, colors , count )
             a0     a1     d0:16

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;
    UWORD colors[];
    SHORT count;

FUNCTION
    load the count words of the colormapper from table starting at
    entry 0.

INPUTS
    vp - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29}, whos colors you want to change
    colors - pointer to table of RGB values set up as an array
                      of USHORTS
                            background--  0x0RGB
                            color1    --  0x0RGB
                            color2    --  0x0RGB
                             etc.         UWORD per value.
                    The colors are interpreted as 15 = maximum intensity.
                               0 = minimum intensity.
    count   = number of UWORDs in the table to load into the
      colormap starting at color 0(background) and proceeding
      to the next higher color number

RESULTS
    The @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} should have a pointer to a valid @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} to store
    the colors in.
    Update the hardware copperlist to reflect the new colors.
    Update the intermediate copperlist with the new colors.

BUGS

SEE ALSO
    @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"} @{"GetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetRGB4()"} @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "LoadView()" "graphics.library/LoadView"

NAME
    LoadView -- Use a (possibly freshly created) coprocessor instruction
               list to create the current display.

SYNOPSIS
    LoadView( @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} )
              A1

    struct @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} *View;

FUNCTION
    Install a new view to be displayed during the next display
    refresh pass.
    Coprocessor instruction list has been created by
    @{"InitVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitVPort()"}, MakeView, and @{"MrgCop" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MrgCop()"}.

INPUTS
    @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} - a pointer to the @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure which contains the
    pointer to the constructed coprocessor instructions list.

RESULT
    The new @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} is displayed, according to your instructions.
    The vertical blank routine will pick this pointer up and
    direct the copper to start displaying this @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46}.

BUGS

SEE ALSO
    @{"InitVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitVPort()"} @{"MakeVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MakeVPort()"} @{"MrgCop" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MrgCop()"} @{"intuition/RethinkDisplay" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/intuition/RethinkDisplay()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "LockLayerRom()" "graphics.library/LockLayerRom"

                       *

NAME
    LockLayerRom -- Lock @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure by rom(gfx lib) code.

SYNOPSIS
    LockLayerRom( layer )
                   a5

    struct @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} *layer;

FUNCTION
    Return when the layer is locked and no other task may
    alter the @{"ClipRect" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 53} structure in the @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure.
    This call does not destroy any registers.
    This call nests so that callers in this chain will not lock
    themselves out.
    Do not have the @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} locked during a call to intuition.
    There is a potential deadlock problem here, if intuition
    needs to get other locks as well.
    Having the layer locked prevents other tasks from using the
    layer library functions, most notably intuition itself. So
    be brief.
    layer.library's @{"LockLayer" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/layers/LockLayer()"} is identical to LockLayerRom.

INPUTS
    layer - pointer to @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure

RESULTS
    The layer is locked and the task can render assuming the
    ClipRects will not change out from underneath it until
    an @{"UnlockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/UnlockLayerRom()"} is called.

SEE ALSO
    @{"UnlockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/UnlockLayerRom()"} @{"graphics/clip.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 0}

@EndNode

@Node "MakeVPort()" "graphics.library/MakeVPort"

NAME
    MakeVPort -- generate display copper list.

SYNOPSIS
    MakeVPort( view, viewport )
                a0      a1

    struct @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} *view;
    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *viewport;

FUNCTION
    Use information in the @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46}, @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29}, ViewPort->RasInfo;
    construct intermediate copper list for this @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29}.

INPUTS
    view - pointer to @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} structure
    viewport - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure
        The viewport must have valid pointer to a RasInfo.

RESULTS
    constructs intermediate copper list and puts pointers in
    viewport.DspIns
    If the @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} ptr in @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} is NULL then it uses colors
    from the default color table.
    If DUALPF in Modes then there must be a second RasInfo pointed
    to by the first RasInfo

BUGS

SEE ALSO
    @{"InitVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitVPort()"} @{"MrgCop" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MrgCop()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}
    Intuition's @{"MakeScreen" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/intuition/MakeScreen()"} @{"RemakeDisplay" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/intuition/RemakeDisplay()"} and @{"RethinkDisplay" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/intuition/RethinkDisplay()"}

@EndNode

@Node "Move()" "graphics.library/Move"

NAME
    Move -- Move graphics pen position.

SYNOPSIS
    Move( rp,   x,    y)
          a1  d0:16 d1:16

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT x,y;

FUNCTION
    Move graphics pen position to (x,y) relative to upper left (0,0)
    of @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.
    Note: Text uses the same position.

INPUTS
    rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    x,y - point in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

RESULTS

BUGS

SEE ALSO
    Draw @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "MoveSprite()" "graphics.library/MoveSprite"

NAME
    MoveSprite -- Move sprite to a point relative to top of viewport.

SYNOPSIS
    MoveSprite( vp, sprite, x, y )
                a0   a1    d0 d1

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;
    struct @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} *sprite;
    SHORT   x,y;

FUNCTION
    Move sprite image to new place on display.

INPUTS
    vp - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure
         if vp = 0, sprite is positioned relative to @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46}.
    sprite - pointer to @{"SimpleSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 14} structure
    (x,y) - new position relative to top of viewport or view.

RESULTS
    Calculate the hardware information for the sprite and
    place it in the posctldata array. During next video display
    the sprite will appear in new position.

BUGS
    Sprites really appear one pixel to the left of the position you
    specify. This bug affects the apparent display position of the sprite
    on the screen, but does not affect the numeric position relative to
    the viewport or view.

SEE ALSO
    @{"FreeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/FreeSprite()"} @{"ChangeSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ChangeSprite()"} @{"GetSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetSprite()"} @{"graphics/sprite.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/sprite.h/Main" 0}

@EndNode

@Node "MrgCop()" "graphics.library/MrgCop"

NAME
    MrgCop -- Merge together coprocessor instructions.

SYNOPSIS
    MrgCop( @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} )
            A1

    struct @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} *View;

FUNCTION
    Merge together the display, color, sprite and user coprocessor
    instructions into a single coprocessor instruction stream.  This
    essentially creates a per-display-frame program for the coprocessor.
    This function MrgCop is used, for example, by the graphics animation
    routines which effectively add information into an essentially
    static background display.  This changes some of the user
    or sprite instructions, but not those which have formed the
    basic display in the first place.  When all forms of coprocessor
    instructions are merged together, you will have a complete per-
    frame instruction list for the coprocessor.

    Restrictions:  Each of the coprocessor instruction lists MUST be
    internally sorted in min to max Y-X order.  The merge routines
    depend on this!
            Each list must be terminated using CEND(copperlist)

INPUTS
    @{"View" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 46} - a pointer to the view structure whose coprocessor
          instructions are to be merged.

RESULT
    The view structure will now contain a complete, sorted/merged
    list of instructions for the coprocessor, ready to be used by
    the display processor.  The display processor is told to use
    this new instruction stream through the instruction @{"LoadView()" Link "LoadView()"}.

BUGS

SEE ALSO
    @{"InitVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitVPort()"} @{"MakeVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MakeVPort()"} @{"LoadView" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LoadView()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}
            Intuition's @{"RethinkDisplay" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/intuition/RethinkDisplay()"}

@EndNode

@Node "NewRegion()" "graphics.library/NewRegion"

NAME
    NewRegion -- Get a clear region.

SYNOPSIS
    region = NewRegion()
    d0

    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;

FUNCTION
    Create a @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure, initialize it to empty and return
    a pointer it.

RESULTS
    region - pointer to initialized region. If it could not allocate
            required memory region = NULL.

INPUTS
    none

BUGS

SEE ALSO
    @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "OpenFont()" "graphics.library/OpenFont"

NAME
    OpenFont -- Get a pointer to a system font.

SYNOPSIS
    font = OpenFont(textAttr)
    d0                a0

    struct @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} *font;
    struct @{"TextAttr" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 46} *textAttr;

FUNCTION
    This function searches the system font space for the graphics
    text font that best matches the attributes specified.  The
    pointer to the font returned can be used in subsequent
    @{"SetFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetFont()"} and @{"CloseFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/CloseFont()"} calls.  It is important to match this
    call with a corresponding @{"CloseFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/CloseFont()"} call for effective
    management of ram fonts.

INPUTS
    textAttr - a @{"TextAttr" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 46} structure that describes the text font
        attributes desired

RESULTS
    font is zero if the desired font cannot be found.  If the named
    font is found, but the size and style specified are not
    available, a font with the nearest attributes is returned.

BUGS

SEE ALSO
    @{"CloseFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/CloseFont()"} @{"SetFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetFont()"} @{"diskfont.library/OpenDiskFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/diskfont/OpenDiskFont()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "OrRectRegion()" "graphics.library/OrRectRegion"

NAME
    OrRectRegion -- Perform 2d OR operation of rectangle
                   with region, leaving result in region.

SYNOPSIS
    status = OrRectRegion(region,rectangle)
     d0                    a0      a1

    BOOL status
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;
    struct @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} *rectangle;

FUNCTION
    If any portion of rectangle is not in the region then add
    that portion to the region.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    rectangle - pointer to @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} structure

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

SEE ALSO
    @{"AndRectRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AndRectRegion()"} @{"OrRegionRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OrRegionRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "OrRegionRegion()" "graphics.library/OrRegionRegion"

NAME
    OrRegionRegion -- Perform 2d OR operation of one region
                   with second region, leaving result in second region

SYNOPSIS
    status = OrRegionRegion(region1,region2)
     d0                       a0      a1

    BOOL status;
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region1, *region2;

FUNCTION
    If any portion of region1  is not in the region then add
    that portion to the region2

INPUTS
    region1 - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    region2 - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

SEE ALSO
    @{"OrRectRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OrRectRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "OwnBlitter()" "graphics.library/OwnBlitter"

NAME
    OwnBlitter -- get the blitter for private usage

SYNOPSIS
    OwnBlitter()

FUNCTION
    If blitter is available return immediately with the blitter
    locked for your exclusive use. If the blitter is not available
    put task to sleep. It will be awakened as soon as the blitter
    is available. When the task first owns the blitter the blitter
    may still be finishing up a blit for the previous owner. You
    must do a @{"WaitBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/WaitBlit()"} before actually using the blitter registers.

    Calls to OwnBlitter() not nest. If a task that owns the
    blitter calls OwnBlitter() again, a lockup will result.
    (Same situation if the task calls a system function
    that tries to own the blitter).

INPUTS
    NONE

RETURNS

SEE ALSO
    @{"DisownBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DisownBlitter()"}

@EndNode

@Node "PolyDraw()" "graphics.library/PolyDraw"

                                                               *

NAME
    PolyDraw -- Draw lines from table of (x,y) values.

SYNOPSIS
    PolyDraw( rp, count , array )
              a1   d0      a0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT count;
    SHORT   array[];

FUNCTION
    starting with the first pair draw connected lines to
    it and every succeeding pair.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    count -  number of points in array (x,y) pairs
    array - pointer to first (x,y) pair

BUGS

SEE ALSO
    Draw Move @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}
                                                               *

@EndNode

@Node "QBlit()" "graphics.library/QBlit"

NAME
    QBlit -- Queue up a request for blitter usage

SYNOPSIS
    QBlit( bp )
           a1

    struct @{"bltnode" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 79} *bp;

FUNCTION
    Link a request for the use of the blitter to the end of the
    current blitter queue.  The pointer bp points to a blit structure
    containing, among other things, the link information, and the
    address of your routine which is to be called when the blitter
    queue finally gets around to this specific request.  When your
    routine is called, you are in control of the blitter ... it is
    not busy with anyone else's requests.  This means that you can
    directly specify the register contents and start the blitter.
    See the description of the blit structure and the uses of QBlit
    in the section titled Graphics Support in the OS Kernel Manual.
    Your code must be written to run either in supervisor or user
    mode on the 68000.

INPUTS
    bp - pointer to a blit structure

RESULT
    Your routine is called when the blitter is ready for you.
    In general requests for blitter usage through this channel are
    put in front of those who use the blitter via @{"OwnBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OwnBlitter()"} and
    @{"DisownBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DisownBlitter()"}. However for small blits there is more overhead
    using the queuer than Own/Disown Blitter.

BUGS

SEE ALSO
    @{"QBSBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/QBSBlit()"} @{"hardware/blit.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 0}

@EndNode

@Node "QBSBlit()" "graphics.library/QBSBlit"

NAME
    QBSBlit -- Synchronize the blitter request with the video beam.

SYNOPSIS
    QBSBlit( bsp )
             a1

    struct @{"bltnode" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 79} *bsp;

FUNCTION
    Call a user routine for use of the blitter, enqueued separately from
    the @{"QBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/QBlit()"} queue.  Calls the user routine contained in the blit
    structure when the video beam is located at a specified position
    onscreen.   Useful when you are trying to blit into a visible part
    of the screen and wish to perform the data move while the beam is
    not trying to display that same area.  (prevents showning part of
    an old display and part of a new display simultaneously).  Blitter
    requests on the QBSBlit queue take precedence over those on the
    regular blitter queue. The beamposition is specified the blitnode.

INPUTS
    bsp - pointer to a blit structure.  See description in the
         Graphics Support section of the manual for more info.

RESULT
    User routine is called when the QBSBlit queue reaches this
    request AND the video beam is in the specified position.
    If there are lots of blits going on and the video beam
    has wrapped around back to the top it will call all the
    remaining bltnodes as fast as it can to try and catch up.

BUGS
    Not very smart when getting blits from different tasks.
    They all get put in same queue so there are unfortunately
    some interdependencies with the beam syncing.

SEE ALSO
    @{"QBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/QBlit()"} @{"hardware/blit.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 0}

@EndNode

@Node "ReadPixel()" "graphics.library/ReadPixel"

NAME
    ReadPixel -- read the pen number value of the pixel at a
                specified x,y location within a certain @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SYNOPSIS
    penno = ReadPixel( rp,    x,    y )
     d0               a1  d0:16 d1:16

    LONG    penno;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT   x,y;

FUNCTION
    Combine the bits from each of the bit-planes used to describe
    a particular @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} into the pen number selector which that
    bit combination normally forms for the system hardware selection
    of pixel color.

INPUTS
    rp -  pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
   (x,y) a point in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

RESULT
    Pen - (0..255) number at that position is returned.
            -1 is returned if cannot read that pixel

BUGS

SEE ALSO
    @{"WritePixel" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/WritePixel()"}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "RectFill()" "graphics.library/RectFill"

NAME
    RectFill -- Fill a defined rectangular area with
           the current drawing pen color, outline color,
           secondary color, and pattern.

SYNOPSIS
            RectFill( rp, xmin, ymin, xmax, ymax)
             a1  d0:16 d1:16 d2:16 d3:16

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT xmin,ymin;
    SHORT xmax,ymax;

FUNCTION
            Fill  the  rectangular  region  specified  by  the
            parameters  with the chosen pen  colors,  areafill
            pattern, and drawing mode. If no areafill pattern is
            specified, fill the rectangular region with the FgPen
            color, taking into account the drawing mode.

INPUTS
            rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
            (xmin,ymin) (xmax,ymax) are the coordinates of the upper
            left corner and the lower right corner, respectively, of the
    rectangle.
            The following relation MUST be true:
            (xmax >= xmin) and (ymax >= ymin)

BUGS
            Complement mode with FgPen complements all bitplanes.

SEE ALSO
    @{"AreaEnd" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AreaEnd()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "RemBob()" "graphics.library/RemBob"

NAME
    RemBob -- Remove a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} from the gel list.

SYNOPSIS
    RemBob(bob)

    struct @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} *bob;

FUNCTION
    Marks a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} as no-longer-required.  The gels internal code then
    removes the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} from the list of active gels the next time
    @{"DrawGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DrawGList()"} is executed.   This is implemented as a macro.
    If the user is double-buffering the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134}, it could take two
    calls to @{"DrawGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DrawGList()"} before the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} actually disappears from
    the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} = pointer to the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} to be removed

BUGS

SEE ALSO
    @{"RemIBob" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/RemIBob()"}  @{"DrawGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DrawGList()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}  @{"graphics/gfxmacros.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfxmacros.h/Main" 0}

@EndNode

@Node "RemFont()" "graphics.library/RemFont"

NAME
    RemFont -- Remove a font from the system list.

SYNOPSIS
    RemFont(textFont)
              a1

    struct @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} *textFont;

FUNCTION
    This function removes a font from the system, ensuring that
    access to it is restricted to those applications that
    currently have an active pointer to it: i.e. no new @{"SetFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetFont()"}
    requests to this font are satisfied.

INPUTS
    textFont - the @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} structure to remove.

BUGS

SEE ALSO
    @{"SetFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetFont()"} @{"AddFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AddFont()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "RemIBob()" "graphics.library/RemIBob"

NAME
    RemIBob -- Immediately remove a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} from the gel list and the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SYNOPSIS
    RemIBob(bob, rp, vp)
           a0   a1  a2

    struct @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} *bob;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;

FUNCTION
    Removes a @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} immediately by uncoupling it from the gel list and
    erases it from the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    bob = pointer to the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} to be removed
    rp = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} if the @{"Bob" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 134} is to be erased
    vp = pointer to the @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} for beam-synchronizing

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"RemVSprite" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/RemVSprite()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "RemVSprite()" "graphics.library/RemVSprite"

NAME
    RemVSprite -- Remove a @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} from the current gel list.

SYNOPSIS
    RemVSprite(vs)
              a0

    struct @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} *vs;

FUNCTION
    Unlinks the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} from the current gel list.

INPUTS
    vs = pointer to the @{"VSprite" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 67} structure to be removed from the gel list

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"RemIBob" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/RemIBob()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}

@EndNode

@Node "ScrollRaster()" "graphics.library/ScrollRaster"

NAME
    ScrollRaster -- Push bits in rectangle in raster around by
                    dx,dy towards 0,0 inside rectangle.

SYNOPSIS
    ScrollRaster( rp, dx, dy, xmin, ymin, xmax, ymax)
                  a1  d0  d1   d2    d3    d4    d5

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT dx,dy;
    SHORT xmin,ymin;
    SHORT xmax,ymax;

FUNCTION
    Move the bits in the raster by (dx,dy) towards (0,0)
    The space vacated is RectFilled with BGPen.
    Limit the scroll operation to the rectangle defined
    by (xmin,ymin)(xmax,ymax). Bits outside will not be
    affected. If xmax,ymax is outside the rastport then use
    the lower right corner of the rastport.
    If you are dealing with a SimpleRefresh layered @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} you
    should check rp->Layer->Flags & LAYER_REFRESH to see if
    there is any damage in the damage list.  If there is you should
    call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
    routine sequence.

INPUTS
    rp - pointer to a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    dx,dy are integers that may be postive, zero, or negative
    xmin,ymin - upper left of bounding rectangle
    xmax,ymax - lower right of bounding rectangle

EXAMPLE
    ScrollRaster(rp,0,1)   /* shift raster up by one row */
    ScrollRaster(rp,-1,-1) /* shift raster down and to the right by 1 pixel

BUGS
    In 1.2/V1.3 if you ScrollRaster a SUPERBITMAP exactly left or right,
    and there is no @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27} attached to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}, the system will
    allocate one for you, but will never free it or record its location.
    The only workaround is to attach a valid @{"TmpRas" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 27} of size at least
    MAXBYTESPERROW to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} before the call.

    ScrollRaster does not add the shifted areas into the damage list.
    This can cause difficulties for SIMPLE_REFRESH windows.

SEE ALSO
    @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "ScrollVPort()" "graphics.library/ScrollVPort"

NAME
    ScrollVPort -- Reinterpret RasInfo information in @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29}.

SYNOPSIS
    ScrollVPort( vp )
                 a0

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;

FUNCTION
    After the programmer has adjusted the Offset values in
    the RasInfo structures of @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29}, change the
    the copper lists to reflect the the Scroll positions.
    Changing the @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} ptr in RasInfo and not changing the
    the Offsets will effect a double buffering affect.

INPUTS
    vp - pointer to a @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure
            that is currently be displayed.

RESULTS
    modifies hardware and intermediate copperlists to reflect
    new RasInfo

BUGS
    pokes not fast enough to avoid some visible hashing of display

SEE ALSO
    @{"MakeVPort" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MakeVPort()"} @{"MrgCop" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/MrgCop()"} @{"LoadView" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LoadView()"}  @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "SetAPen()" "graphics.library/SetAPen"

NAME
    SetAPen -- Set primary pen

SYNOPSIS
    SetAPen( rp, pen )
             a1  d0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    UBYTE pen;

FUNCTION
    Set the primary drawing pen for lines, fills, and text.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure.
    pen - (0-255)

RESULT
    Changes the minterms in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to reflect new primary pen.
    Set line drawer to restart pattern.

BUGS

SEE ALSO
    @{"SetBPen" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetBPen()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetBPen()" "graphics.library/SetBPen"

NAME
    SetBPen -- Set secondary pen

SYNOPSIS
    SetBPen( rp, pen )
             a1  d0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    UBYTE pen;

FUNCTION
    Set the secondary drawing pen for lines, fills, and text.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure.
    pen - (0-255)

RESULT
    Changes the minterms in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to reflect new secondary pen.
    Set line drawer to restart pattern.

BUGS

SEE ALSO
    @{"SetAPen" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetAPen()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetCollision()" "graphics.library/SetCollision"

NAME
    SetCollision -- Set a pointer to a user collision routine.

SYNOPSIS
    SetCollision(num, routine, GInfo)
                d0   a0       a1

    ULONG num;
    VOID (*routine)();
    struct @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34} *GInfo;

FUNCTION
    Sets a specified entry (num) in the user's collision vectors table
    equal to the address of the specified collision routine.

INPUTS
    num = collision vector number
    routine = pointer to the user's collision routine
    GInfo = pointer to a @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34} structure

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"graphics/gels.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gels.h/Main" 0}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetDrMd()" "graphics.library/SetDrMd"

NAME
    SetDrMd -- Set drawing mode

SYNOPSIS
    SetDrMd( rp, mode )
             a1  d0:8

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    UBYTE mode;

FUNCTION
    Set the drawing mode for lines, fills and text.
    Get the bit definitions from rastport.h

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure.
    mode - 0-255, some combinations may not make much sense.

RESULT
    The mode set is dependant on the bits selected.
    Change minterms to reflect new drawing mode.
    Set line drawer to restart pattern.

BUGS

SEE ALSO
    @{"SetAPen" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetAPen()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetFont()" "graphics.library/SetFont"

NAME
    SetFont -- Set the text font and attributes in a @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

SYNOPSIS
    SetFont(rp, font)
            a1   a0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    struct @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} *font;

FUNCTION
    This function sets the font in the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to that described
    by font, and updates the text attributes to reflect that
    change.  If font is zero, this call leaves the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}
    with no font.  This function clears the effect of any previous
    soft styles.

INPUTS
    rp - the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} in which the text attributes are to be changed
    font - pointer to a @{"TextFont" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 55} structure returned from @{"OpenFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OpenFont()"}
        or @{"OpenDiskFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/diskfont/OpenDiskFont()"}

BUGS

SEE ALSO
    @{"OpenFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OpenFont()"} @{"diskfont.library/OpenDiskFont" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/diskfont/OpenDiskFont()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "SetOPen()" "graphics.library/SetOPen"

NAME
    SetOPen -- Change the Area OutLine pen and turn on Outline
                    mode for areafills.

SYNOPSIS
    SetOPen(rp, pen)

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    UBYTE pen;

FUNCTION
    This is implemented as a c-macro.
    Pen is the pen number that will be used to draw a border
    around an areafill during @{"AreaEnd()" Link "AreaEnd()"}.

INPUTS
    rp = pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    pen = number  between 0-255

BUGS

SEE ALSO
    @{"AreaEnd()" Link "AreaEnd()"} @{"graphics/gfxmacros.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfxmacros.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetRast()" "graphics.library/SetRast"

NAME
    SetRast - Set an entire drawing area to a specified color.

SYNOPSIS
    SetRast( rp, pen )
            a1  d0

    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    UBYTE pen;

FUNCTION
    Set the entire contents of the specified @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to the
    specified pen.

INPUTS
    rp - pointer to @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
    pen - the pen number (0-255) to jam into bitmap

RESULT
    The drawing area becomes the selected pen number.

BUGS

SEE ALSO
    @{"RectFill" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/RectFill()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SetRGB4()" "graphics.library/SetRGB4"

NAME
    SetRGB4 -- Set one color register for this viewport.

SYNOPSIS
    SetRGB4(  vp, n,   r,    g,    b)
             a0  d0  d1:4  d2:4  d3:4

    struct @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} *vp;
    SHORT n;
    UBYTE r,g,b;

FUNCTION
    Change the color look up table so that this viewport displays
    the color (r,g,b) for pen number n.

INPUTS
    vp - pointer to  viewport structure
    n - the color number (range from 0 to 31)
    r - red level
    g - green level
    b - blue level

RESULT
    If there is a @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} for this viewport store the value in
    in the structure @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20}.
    The selected color register is changed to match your specs.
    If the color value is unused then nothing will happen.

BUGS

SEE ALSO
    @{"LoadRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LoadRGB4()"} @{"GetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetRGB4()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "SetRGB4CM()" "graphics.library/SetRGB4CM"

NAME
    SetRGB4CM -- Set one color register for this @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20}.

SYNOPSIS
    SetRGB4CM(  cm,  n,   r,    g,    b)
               a0  d0  d1:4  d2:4  d3:4

    struct @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} *cm;
    SHORT n;
    UBYTE r,g,b;

INPUTS
    cm = colormap
    n = the color number (range from 0 to 31)
    r = red level
    g = green level
    b = blue level

RESULT
    Store the (r,g,b) triplet at index n of the @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} structure.
    This function can be used to set up a @{"ColorMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 20} before before
    linking it into a viewport.

BUGS

SEE ALSO
    @{"GetColorMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetColorMap()"} @{"GetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/GetRGB4()"} @{"SetRGB4" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/SetRGB4()"} @{"graphics/view.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 0}

@EndNode

@Node "SetSoftStyle()" "graphics.library/SetSoftStyle"

NAME
    SetSoftStyle -- Set the soft style of the current font.

SYNOPSIS
    newStyle = SetSoftStyle(rp, style, enable)
      d0                    a1  d0      d1

    ULONG   newStyle;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    ULONG   style;
    ULONG   enable;

FUNCTION
    This function alters the soft style of the current font.  Only
    those bits that are also set in enable are affected.  The
    resulting style is returned, since some style request changes
    will not be honored when the implicit style of the font
    precludes changing them.

INPUTS
    rp - the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} from which the font and style      are extracted.
    style - the new font style to set, subject to enable.
    enable - those bits in style to be changed.  Any set bits here
        that would not be set as a result of @{"AskSoftStyle" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AskSoftStyle()"} will
        be ignored, and the newStyle result will not be as
        expected.

RESULTS
    newStyle - the resulting style, both as a result of previous
        soft style selection, the effect of this function, and
        the style inherent in the set font.

BUGS

SEE ALSO
    @{"AskSoftStyle" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AskSoftStyle()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0}

@EndNode

@Node "SortGList()" "graphics.library/SortGList"

NAME
    SortGList -- Sort the current gel list, ordering its y,x coordinates.

SYNOPSIS
    SortGList(rp)
             a1

FUNCTION
    Sorts the current gel list according to the gels' y,x coordinates.
    This sorting is essential before calls to @{"DrawGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DrawGList()"} or @{"DoCollision" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DoCollision()"}.

INPUTS
    rp = pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure containing the @{"GelsInfo" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 34}

BUGS

SEE ALSO
    @{"InitGels" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/InitGels()"}  @{"DoCollision" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DoCollision()"}  @{"DrawGList" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DrawGList()"}  @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "SyncSBitMap()" "graphics.library/SyncSBitMap"

NAME
    SyncSBitMap --   Syncronize Super @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35} with whatever is
                    in the standard @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} bounds.

SYNOPSIS
    SyncSBitMap( layer )
                  a0

    struct @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} *layer;

FUNCTION
    Copy all bits from ClipRects in @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} into Super @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}
    @{"BitMap" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 35}.  This is used for those functions that do not
    want to deal with the @{"ClipRect" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 53} structures but do want
    to be able to work with a SuperBitMap @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24}.

INPUTS
    layer - pointer to a @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} that has a SuperBitMap
            The @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} should already be locked by the caller.

RESULT
    A bitmap that the programmer can now diddle with the bits.
    After diddling the programmer should call @{"CopySBitMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/CopySBitMap()"} to
    copy the bits back into the onscreen layer.

BUGS

SEE ALSO
    @{"CopySBitMap" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/CopySBitMap()"} @{"graphics/clip.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 0}

@EndNode

@Node "Text()" "graphics.library/Text"

NAME
    Text -- Write text characters (no formatting).

SYNOPSIS
    Text(rp, string, count)
         a1   a0    d0-0:16

    struct  @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    STRPTR  string;
    SHORT   count;

FUNCTION
    This graphics function writes printable text characters to the
    specified @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} at the current position.  No control meaning
    is applied to any of the characters, and only text on the
    current line is output.
    If the characters displayed run past the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} boundary,
    the current position is truncated to the boundary, and
    thus does not represent the true position.

INPUTS
    rp - a pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} which describes where the
        text is to be output
    count - the string length.  If zero, there are no characters
        to be output.
    string - the address of string to output

BUGS
    The maximum string length (in pixels) is limited to (1024 - 16 = 1008)
        pixels wide.

    Text is clipped to the width of the rastport even if the Text() write
        was made starting to the left of the rastport.

SEE ALSO
    Move @{"TextLength" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/TextLength()"} @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "TextLength()" "graphics.library/TextLength"

NAME
    TextLength -- Determine raster length of text data.

SYNOPSIS
    length = TextLength(rp, string, count)
    d0:16               a1    a0    d0:16

    SHORT length;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    STRPTR string;
    SHORT count;

FUNCTION
    This graphics function determines the length that text data
    would occupy if output to the specified @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} with the
    current attributes.  The length is specified as the number of
    raster dots: to determine what the current position would be
    after a Write using this string, add the length to cp_x
    (cp_y is unchanged by Write).

INPUTS
    rp - a pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} which describes where the
        text attributes reside.
    string - the address of string to determine the length of
    count - the string length.  If zero, there are no characters
        in the string.

RESULTS
    length - the number of pixels in x this text would occupy, not
        including any negative kerning that may take place at
        the beginning of the text string, nor taking into
        account the effects of any clipping that may take
        place.

BUGS
    A length that would overflow single word arithmatic is not
    calculated correctly.

SEE ALSO
    Text @{"graphics/text.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/text.h/Main" 0} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "UnlockLayerRom()" "graphics.library/UnlockLayerRom"

                       *

NAME
    UnlockLayerRom -- Unlock @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure by rom(gfx lib) code.

SYNOPSIS
    UnlockLayerRom( layer )
                     a5

FUNCTION
    Release the lock on this layer. If the same task has called
    @{"LockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LockLayerRom()"} more than once than the same number of calls to
    UnlockLayerRom must happen before the layer is actually freed
    so that other tasks may use it.
    This call does destroy scratch registers.
    This call is identical to @{"UnlockLayer" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/layers/UnlockLayer()"} (layers.library).

INPUTS
    layer - pointer to @{"Layer" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 24} structure

BUGS

SEE ALSO
    @{"LockLayerRom" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/LockLayerRom()"} @{"graphics/clip.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/clip.h/Main" 0}
                           *

@EndNode

@Node "VBeamPos()" "graphics.library/VBeamPos"

NAME
    VBeamPos -- Get vertical beam position at this instant.

SYNOPSIS
    pos = VBeamPos()
     d0

    LONG pos;

FUNCTION
    Get the vertical beam position from the hardware.

INPUTS
    none

RESULT
    interrogates hardware for beam position and returns value.
    valid results in the range of 0-511
    Because of multitasking, the actual value returned may have
    no use. If you are the highest priority task then the value
    returned should be close, within 1 line.

BUGS

SEE ALSO

@EndNode

@Node "WaitBlit()" "graphics.library/WaitBlit"

NAME
    WaitBlit -- Wait for the blitter to be finished before proceeding
               with anything else.

SYNOPSIS
    WaitBlit()

FUNCTION
    WaitBlit returns when the blitter is idle. This function should
    normally only be used when dealing with the blitter in a
    synchronous manner, such as when using @{"OwnBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OwnBlitter()"} and @{"DisownBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DisownBlitter()"}.
    WaitBlit does not wait for all blits queued up using @{"QBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/QBlit()"} or
    @{"QBSBlit" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/QBSBlit()"}. You should call WaitBlit if you are just about to free
    some memory that you have used with the blitter.

    Note that many graphics calls fire up the blitter, and let it run.
    The CPU does not need to wait for the blitter to finish before
    returning.  When examining bits with the CPU right after a blit, or
    when freeeing temorary memory used by the blitter, a WaitBlit() may
    be required.

INPUTS
    none

RESULT
    Your program waits until the blitter is finished.  Unlike most Amiga
    rom routines, the CPU registers D0/D1/A0 and A1 are preserved by this
    call.

BUGS
    There is a bug in the older revisions of the Agnus chip that can
    cause the BUSY bit to indicate the blit has finished when the blitter
    has, in fact, not started the blit yet (even though BltSize has been
    written). This most often occurs in a heavily loaded systen with
    extended memory, HIRES, and 4 bitplanes.  WaitBlit currently tries to
    avoid the Agnus problem by testing the BUSY bit multiple times to make
    sure the blitter has started, there is no need for further action on
    the part of the WaitBlit user.  Also this pig busy waits. (sigh)

    The hardware bug was fixed as of the first "Fat Agnus" chip, as used
    in all A500 and A2000 computers.

SEE ALSO
    @{"OwnBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OwnBlitter()"} @{"DisownBlitter" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/DisownBlitter()"} @{"hardware/blit.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/hardware/blit.h/Main" 0}

@EndNode

@Node "WaitBOVP()" "graphics.library/WaitBOVP"

NAME
    WaitBOVP -- Wait till vertical beam reached bottom of
                this viewport.

SYNOPSIS
    WaitBOVP( vp )
              a0

FUNCTION
    Returns when vertical beam reaches bottom of this viewport

INPUTS
    vp - pointer to @{"ViewPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/view.h/Main" 29} structure

RESULT
    This function will return sometime after the beam gets beyond
    the bottom of the viewport.  Depending on the multitasking load
    of the system, the actual beam position may be different than
    what would be expected in a lightly loaded system.

BUGS
    Horrors! This function currently busy waits waiting for the
    beam to get to the right place.  It should use the copper
    interrupt to trigger and send signals like @{"WaitTOF" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/WaitTOF()"} does.

SEE ALSO
    @{"WaitTOF" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/WaitTOF()"} @{"VBeamPos" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/VBeamPos()"}

@EndNode

@Node "WaitTOF()" "graphics.library/WaitTOF"

NAME
    WaitTOF -- Wait for the top of the next video frame.

SYNOPSIS
    WaitTOF()

FUNCTION
    Wait  for vertical blank to occur and all vertical blank
    interrupt routines to complete before returning to caller.

INPUTS
    none

RESULT
    Place this task on the TOF wait queue. When vertical blank
    interupt comes around the interrupt service routine fires off
    signals to all the tasks doing WaitTOF. The highest priority task
    ready gets to run then.

BUGS

SEE ALSO
    exec/Wait @{"exec/Signal" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/exec/Signal()"}

@EndNode

@Node "WritePixel()" "graphics.library/WritePixel"

NAME
    WritePixel -- Change the pen num of one specific pixel in a
                 specified RasterPort.

SYNOPSIS
    error = WritePixel(  rp, x,  y)
     d0                 a1 D0  D1

    LONG error;
    struct @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} *rp;
    SHORT x,y;

FUNCTION
    Changes the pen number of the selected pixel in the specified
    @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} to that currently specified by PenA, the primary
    drawing pen. Obey minterms in @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}.

INPUTS
    rp - a pointer to the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} structure
   (x,y) - point within the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49} at which the selected
       pixel is located.

RESULT
    error = 0 if pixel succesfully changed
          = -1 if (x,y) is outside the @{"RastPort" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 49}

BUGS

SEE ALSO
    @{"ReadPixel" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/ReadPixel()"} @{"graphics/rastport.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/rastport.h/Main" 0}

@EndNode

@Node "XorRectRegion()" "graphics.library/XorRectRegion"

NAME
    XorRectRegion -- Perform 2d XOR operation of rectangle
                   with region, leaving result in region

SYNOPSIS
    status = XorRectRegion(region,rectangle)
     d0                     a0      a1

    BOOL status;
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region;
    struct @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} *rectangle;

FUNCTION
    Add portions of rectangle to region if they are not in
    the region.
    Remove portions of rectangle from region if they are
    in the region.

INPUTS
    region - pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
    rectangle - pointer to @{"Rectangle" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/gfx.h/Main" 22} structure

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

SEE ALSO
    @{"OrRegionRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/OrRegionRegion()"} @{"AndRegionRegion" Link "ADCD_v1.2:Inc&AD1.3/Autodocs/graphics/AndRegionRegion()"} @{"graphics/regions.h" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 0}

@EndNode

@Node "XorRegionRegion()" "graphics.library/XorRegionRegion"

NAME
    XorRegionRegion -- Perform 2d XOR operation of one region
                   with second region, leaving result in second region

SYNOPSIS
    status = XorRegionRegion(region1,region2)
     d0                        a0      a1

    BOOL status;
    struct @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} *region1, *region2;

FUNCTION
    Join the regions together. If any part of region1 overlaps
    region2 then remove that from the new region.

INPUTS
       region1      = pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure
       region2      = pointer to @{"Region" Link "ADCD_v1.2:Inc&AD1.3/Includes/graphics/regions.h/Main" 22} structure

RESULTS
    status - return TRUE if successful operation
             return FALSE if ran out of memory

BUGS

@EndNode

