home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Text_Autodocs / graphics.doc < prev    next >
Encoding:
Text File  |  1992-09-12  |  92.6 KB  |  3,679 lines

  1. TABLE OF CONTENTS
  2.  
  3. graphics.library/AddAnimOb
  4. graphics.library/AddBob
  5. graphics.library/AddFont
  6. graphics.library/AddVSprite
  7. graphics.library/AllocRaster
  8. graphics.library/AndRectRegion
  9. graphics.library/AndRegionRegion
  10. graphics.library/Animate
  11. graphics.library/AreaCircle
  12. graphics.library/AreaDraw
  13. graphics.library/AreaEllipse
  14. graphics.library/AreaEnd
  15. graphics.library/AreaMove
  16. graphics.library/AskFont
  17. graphics.library/AskSoftStyle
  18. graphics.library/AttemptLockLayerRom
  19. graphics.library/BltBitMap
  20. graphics.library/BltBitMapRastPort
  21. graphics.library/BltClear
  22. graphics.library/BltMaskBitMapRastPort
  23. graphics.library/BltPattern
  24. graphics.library/BltTemplate
  25. graphics.library/CBump
  26. graphics.library/CEND
  27. graphics.library/ChangeSprite
  28. graphics.library/CINIT
  29. graphics.library/ClearEOL
  30. graphics.library/ClearRectRegion
  31. graphics.library/ClearRegion
  32. graphics.library/ClearScreen
  33. graphics.library/ClipBlit
  34. graphics.library/CloseFont
  35. graphics.library/CMOVE
  36. graphics.library/CopySBitMap
  37. graphics.library/CWAIT
  38. graphics.library/DisownBlitter
  39. graphics.library/DisposeRegion
  40. graphics.library/DoCollision
  41. graphics.library/Draw
  42. graphics.library/DrawEllipse
  43. graphics.library/DrawGList
  44. graphics.library/Flood
  45. graphics.library/FreeColorMap
  46. graphics.library/FreeCopList
  47. graphics.library/FreeCprList
  48. graphics.library/FreeGBuffers
  49. graphics.library/FreeRaster
  50. graphics.library/FreeSprite
  51. graphics.library/FreeVPortCopLists
  52. graphics.library/GetColorMap
  53. graphics.library/GetGBuffers
  54. graphics.library/GetRGB4
  55. graphics.library/GetSprite
  56. graphics.library/InitArea
  57. graphics.library/InitBitMap
  58. graphics.library/InitGels
  59. graphics.library/InitGMasks
  60. graphics.library/InitMasks
  61. graphics.library/InitRastPort
  62. graphics.library/InitTmpRas
  63. graphics.library/InitView
  64. graphics.library/InitVPort
  65. graphics.library/LoadRGB4
  66. graphics.library/LoadView
  67. graphics.library/LockLayerRom
  68. graphics.library/MakeVPort
  69. graphics.library/Move
  70. graphics.library/MoveSprite
  71. graphics.library/MrgCop
  72. graphics.library/NewRegion
  73. graphics.library/OpenFont
  74. graphics.library/OrRectRegion
  75. graphics.library/OrRegionRegion
  76. graphics.library/OwnBlitter
  77. graphics.library/PolyDraw
  78. graphics.library/QBlit
  79. graphics.library/QBSBlit
  80. graphics.library/ReadPixel
  81. graphics.library/RectFill
  82. graphics.library/RemBob
  83. graphics.library/RemFont
  84. graphics.library/RemIBob
  85. graphics.library/RemVSprite
  86. graphics.library/ScrollRaster
  87. graphics.library/ScrollVPort
  88. graphics.library/SetAPen
  89. graphics.library/SetBPen
  90. graphics.library/SetCollision
  91. graphics.library/SetDrMd
  92. graphics.library/SetFont
  93. graphics.library/SetOPen
  94. graphics.library/SetRast
  95. graphics.library/SetRGB4
  96. graphics.library/SetRGB4CM
  97. graphics.library/SetSoftStyle
  98. graphics.library/SortGList
  99. graphics.library/SyncSBitMap
  100. graphics.library/Text
  101. graphics.library/TextLength
  102. graphics.library/UnlockLayerRom
  103. graphics.library/VBeamPos
  104. graphics.library/WaitBlit
  105. graphics.library/WaitBOVP
  106. graphics.library/WaitTOF
  107. graphics.library/WritePixel
  108. graphics.library/XorRectRegion
  109. graphics.library/XorRegionRegion
  110.  
  111.  
  112. graphics.library/AddAnimOb                           graphics.library/AddAnimOb
  113.  
  114.     NAME
  115.        AddAnimOb  --  Add an AnimOb to the linked list of AnimObs.
  116.     
  117.     SYNOPSIS
  118.        AddAnimOb(anOb, anKey, rp)
  119.                  a0    a1     a2
  120.  
  121.     struct AnimOb *anOb,**anKey;
  122.     struct RastPort *rp;
  123.      
  124.     FUNCTION
  125.        Links this AnimOb into the current list pointed to by animKey.
  126.        Initializes all the Timers of the AnimOb's components.
  127.        Calls AddBob with each component's Bob.
  128.     rp->GelsInfo must point to an initialized GelsInfo structure.
  129.     
  130.     INPUTS
  131.        anOb = pointer to the AnimOb structure to be added to the list
  132.        anKey = address of a pointer to the first AnimOb in the list 
  133.             (anKey = NULL if there are no AnimObs in the list so far)
  134.        rp = pointer to a valid RastPort
  135.     
  136.     BUGS
  137.     
  138.     SEE ALSO
  139.       Animate graphics/rastport.h graphics/gels.h
  140.  
  141. graphics.library/AddBob                                 graphics.library/AddBob
  142.     
  143.     NAME
  144.        AddBob  --  Adds a Bob to current gel list.
  145.     
  146.     SYNOPSIS
  147.        AddBob(Bob, rp)
  148.               a0   a1
  149.  
  150.     struct Bob *Bob;
  151.     struct RastPort *rp;
  152.      
  153.     FUNCTION
  154.        Sets up the system Bob flags, then links this gel into the list
  155.            via AddVSprite.
  156.     
  157.     INPUTS
  158.        Bob = pointer to the Bob structure to be added to the gel list
  159.        rp = pointer to a RastPort structure
  160.     
  161.     BUGS
  162.     
  163.     SEE ALSO
  164.        InitGels  AddVSprite  graphics/gels.h  graphics/rastport.h
  165.  
  166. graphics.library/AddFont                               graphics.library/AddFont
  167.  
  168.    NAME
  169.     AddFont -- add a font to the system list
  170.  
  171.    SYNOPSIS
  172.     AddFont(textFont)
  173.         a1
  174.  
  175.     struct TextFont *textFont;
  176.  
  177.    FUNCTION
  178.     This function adds the text font to the system, making it
  179.     available for use by any application.  The font added must be
  180.     in public memory, and remain until successfully removed.
  181.  
  182.    INPUTS
  183.     textFont - a TextFont structure in public ram.
  184.  
  185.    BUGS
  186.  
  187.    SEE ALSO
  188.     SetFont RemFont graphics/text.h
  189.  
  190.  
  191. graphics.library/AddVSprite                         graphics.library/AddVSprite
  192.  
  193.     NAME
  194.        AddVSprite -- Add a VSprite to the current gel list.
  195.     
  196.     SYNOPSIS
  197.        AddVSprite(vs, rp)
  198.                   a0  a1
  199.     
  200.     struct VSprite *vs;
  201.     struct RastPort *rp;
  202.  
  203.     FUNCTION
  204.        Sets up the system VSprite flags
  205.        Links this VSprite into the current gel list using its Y,X
  206.     
  207.     INPUTS
  208.        vs = pointer to the VSprite structure to be added to the gel list
  209.        rp = pointer to a RastPort structure
  210.     
  211.     BUGS
  212.     
  213.     SEE ALSO
  214.     InitGels  graphics/rastport.h  graphics/gels.h
  215.  
  216. graphics.library/AllocRaster                       graphics.library/AllocRaster
  217.  
  218.    NAME
  219.        AllocRaster -- Allocate space for a bitplane.
  220.  
  221.    SYNOPSIS
  222.        planeptr = AllocRaster( width, height )
  223.           d0                    d0:16  d1:16
  224.  
  225.     PLANEPTR planeptr;
  226.     USHORT    width,height;
  227.  
  228.    FUNCTION
  229.        This function calls the memory allocation routines
  230.        to allocate memory space for a bitplane width bits
  231.     wide and height bits high.
  232.  
  233.    INPUTS
  234.     width - number of bits wide for bitplane
  235.        height - number of rows in bitplane
  236.  
  237.    RESULT
  238.        planeptr - pointer to first word in bitplane
  239.         If unable to allocate space then planeptr will be NULL.
  240.  
  241.    BUGS
  242.  
  243.    SEE ALSO
  244.        FreeRaster graphics/gfx.h
  245.  
  246.  
  247. graphics.library/AndRectRegion                   graphics.library/AndRectRegion
  248.  
  249.    NAME
  250.     AndRectRegion -- Perform 2d AND operation of rectangle
  251.             with region, leaving result in region.
  252.  
  253.    SYNOPSIS
  254.     AndRectRegion(region,rectangle)
  255.              a0    a1
  256.  
  257.     struct Region *region;
  258.     struct Rectangle *rectangle;
  259.  
  260.    FUNCTION
  261.     Clip away any portion of the region that exists outside
  262.     of the rectangle. Leave the result in region.
  263.  
  264.    INPUTS
  265.     region - pointer to Region structure
  266.     rectangle - pointer to Rectangle structure
  267.  
  268.    BUGS
  269.  
  270.    SEE ALSO
  271.     AndRegionRegion OrRectRegion graphics/regions.h
  272.  
  273.  
  274. graphics.library/AndRegionRegion               graphics.library/AndRegionRegion
  275.  
  276.    NAME 
  277.        AndRegionRegion -- Perform 2d AND operation of one region
  278.                        with second region, leaving result in second region.
  279.  
  280.    SYNOPSIS 
  281.        status = AndRegionRegion(region1,region2) 
  282.           d0                       a0      a1 
  283.  
  284.     BOOL status;
  285.     struct Region *region1, *region2;
  286.  
  287.    FUNCTION 
  288.        Remove any portion of region2 that is not in region1.
  289.  
  290.    INPUTS 
  291.        region1 - pointer to Region structure
  292.        region2 - pointer to Region structure to use and for result
  293.  
  294.    RESULTS
  295.     status - return TRUE if successful operation
  296.          return FALSE if ran out of memory
  297.  
  298.    BUGS 
  299.  
  300.    SEE ALSO
  301.     OrRegionRegion AndRectRegion graphics/regions.h
  302.  
  303.  
  304. graphics.library/Animate                               graphics.library/Animate
  305.  
  306.     NAME
  307.        Animate  --  Processes every AnimOb in the current animation list.
  308.     
  309.     SYNOPSIS
  310.        Animate(anKey, rp)
  311.                a0     a1
  312.  
  313.     struct AnimOb **anKey;  
  314.     struct RastPort *rp;
  315.    
  316.     FUNCTION
  317.        For every AnimOb in the list
  318.            - update its location and velocities
  319.            - call the AnimOb's special routine if one is supplied
  320.            - for each component of the AnimOb
  321.                - if this sequence times out, switch to the new one
  322.                - call this component's special routine if one is supplied
  323.                - set the sequence's VSprite's y,x coordinates based 
  324.           on whatever these routines cause
  325.     
  326.     INPUTS
  327.        key = address of the variable that points to the head AnimOb
  328.        rp  = pointer to the RastPort structure
  329.     
  330.     BUGS
  331.     
  332.     SEE ALSO
  333.     AddAnimOb graphics/gels.h graphics/rastport.h
  334.  
  335.  
  336. graphics.library/AreaCircle                         graphics.library/AreaCircle
  337.  
  338.     NAME
  339.     AreaCircle -- add a circle to areainfo list for areafill.
  340.  
  341.  
  342.     SYNOPSIS
  343.     error = (int) AreaCircle( rp,  cx,  cy, radius)
  344.     D0              A1   D0   D1    D2
  345.  
  346.     LONG error;
  347.     struct RastPort *rp;
  348.     SHORT cx, cy;
  349.     SHORT radius;
  350.  
  351.     FUNCTION
  352.     Add circle to the vector buffer.
  353.  
  354.     INPUTS
  355.     rp - pointer to a RastPort structure
  356.  
  357.     (cx, cy) - are coordinates of a "centerpoint" in the raster
  358.     radius is the radius of the circle to draw around the centerpoint
  359.  
  360.     This function is a macro which calls 
  361.         AreaEllipse(rp,cx,cy,radius,radius).
  362.  
  363.     RESULTS
  364.     0 if no error
  365.     -1 if no space left in vector list
  366.  
  367.     SEE ALSO
  368.        AreaMove, AreaDraw, AreaCircle, InitArea, AreaEnd, graphics/rastport.h
  369.     graphics/gfxmacros.h
  370.  
  371.  
  372. graphics.library/AreaDraw                             graphics.library/AreaDraw
  373.  
  374.    NAME
  375.        AreaDraw -- Add a point to a list of end points for areafill.
  376.  
  377.  
  378.    SYNOPSIS
  379.        error = AreaDraw( rp,  x,     y)
  380.       d0              A1 D0:16 D1:16
  381.  
  382.     LONG error;
  383.     struct RastPort *rp;
  384.     SHORT    x,y;
  385.  
  386.    FUNCTION
  387.        Add point to the vector buffer.
  388.  
  389.  
  390.    INPUTS
  391.        rp - points to a RastPort structure
  392.        x,y -  are coordinates of a point in the raster
  393.  
  394.    RETURNS
  395.        0 if no error
  396.     -1 if no space left in vector list
  397.  
  398.    BUGS
  399.  
  400.    SEE ALSO
  401.        AreaMove InitArea AreaEnd graphics/rastport.h
  402.  
  403.  
  404.  
  405. graphics.library/AreaEllipse                       graphics.library/AreaEllipse
  406.  
  407.     NAME
  408.     AreaEllipse -- add a ellipse to areainfo list for areafill.
  409.  
  410.  
  411.     SYNOPSIS
  412.     error = AreaEllipse( rp, cx,   cy,   a,    b    )
  413.     d0             a1  d0:16 d1:16 d2:16 d3:16
  414.  
  415.     LONG error;
  416.     struct RastPort *rp;
  417.     SHORT cx, cy;
  418.     SHORT a, b;
  419.  
  420.     FUNCTION
  421.     Add ellipse to the vector buffer.
  422.  
  423.     INPUTS
  424.     rp - pointer to a RastPort structure
  425.     cx - x coordinate of the centerpoint relative to the rastport.
  426.     cy - y coordinate of the centerpoint relative to the rastport.
  427.     a - the horizontal radius of the ellipse (note: a must be > 0)
  428.     b - the vertical radius of the ellipse (note: b must be > 0)
  429.  
  430.     RESULTS
  431.     0 if no error
  432.     -1 if no space left in vector list
  433.  
  434.     SEE ALSO
  435.     AreaMove, AreaDraw, AreaCircle, InitArea, AreaEnd, graphics/rastport.h
  436.  
  437.  
  438. graphics.library/AreaEnd                               graphics.library/AreaEnd
  439.  
  440.    NAME
  441.         AreaEnd -- Process table of vectors and produce areafill.
  442.  
  443.  
  444.    SYNOPSIS
  445.         error = AreaEnd(rp)
  446.          d0              A1 
  447.  
  448.     LONG error;
  449.     struct RastPort *rp;
  450.  
  451.    FUNCTION
  452.         Trigger the filling operation.
  453.         Process  the vector buffer and  generate  required
  454.         fill  into  the raster planes.  After the fill  is
  455.         complete reinitialize for the next AreaMove.   Use
  456.         the raster set up by InitTmpRas when generating an
  457.         areafill mask.
  458.  
  459.     RESULT
  460.         Fill the area enclosed by the definitions in the vector table.
  461.         Returns -1 if an error occured anywhere.
  462.         Returns 0 if no error.
  463.  
  464.    INPUTS
  465.         rp points to a RastPort structure
  466.  
  467.    BUGS
  468.  
  469.    SEE ALSO
  470.         InitArea AreaMove AreaDraw AreaEllipse graphics/rastport.h
  471.  
  472.  
  473. graphics.library/AreaMove                             graphics.library/AreaMove
  474.  
  475.    NAME
  476.        AreaMove -- Define a new starting point for a new
  477.                    shape in the vector list.
  478.  
  479.  
  480.    SYNOPSIS
  481.        error =  AreaMove( rp,   x,     y)
  482.      d0                a1  d0:16  d1:16
  483.  
  484.     LONG error;
  485.     struct RastPort *rp;
  486.     SHORT    x,y;
  487.  
  488.    FUNCTION
  489.        Close  the last polygon and start another  polygon
  490.        at  (x,y).    Enter  necessary  points  in  vector
  491.        buffer. Cosing a polygon may result in the generation
  492.     of another AreaDraw() to close previous polygon.
  493.     Remember to have an initialized AreaInfo structure attached
  494.     to the RastPort.
  495.  
  496.    INPUTS
  497.        rp - points to a RastPort structure
  498.        x,y - positions in the raster
  499.  
  500.    RETURNS
  501.        0 if no error
  502.     -1 if no space left in vector list
  503.  
  504.    BUGS
  505.  
  506.    SEE ALSO
  507.        InitArea AreaDraw AreaEllipse AreaEnd graphics/rastport.h
  508.  
  509.  
  510.  
  511. graphics.library/AskFont                               graphics.library/AskFont
  512.  
  513.    NAME
  514.     AskFont -- get the text attributes of the current font
  515.  
  516.    SYNOPSIS
  517.     AskFont(rp, textAttr)
  518.         a1      a0
  519.  
  520.     struct RastPort *rp;
  521.     struct TextAttr *textAttr;
  522.  
  523.    FUNCTION
  524.     This function fills the text attributes structure with the
  525.     attributes of the current font in the RastPort.
  526.  
  527.    INPUTS
  528.     rp - the RastPort from which the text attributes are extracted
  529.     textAttr - the TextAttr structure to be filled
  530.  
  531.    BUGS
  532.  
  533.    SEE ALSO
  534.     graphics/text.h
  535.  
  536.  
  537. graphics.library/AskSoftStyle                     graphics.library/AskSoftStyle
  538.  
  539.    NAME
  540.     AskSoftStyle -- Get the soft style bits of the current font.
  541.  
  542.    SYNOPSIS
  543.     enable = AskSoftStyle(rp)
  544.       d0              a1
  545.  
  546.     ULONG enable;
  547.     struct RastPort *rp;
  548.  
  549.    FUNCTION
  550.     This function returns those style bits of the current font
  551.     that are not intrinsic in the font itself, but
  552.     algorithmically generated.  These are the bits that are 
  553.     valid to set in the enable mask for SetSoftStyle
  554.  
  555.    INPUTS
  556.     rp - the RastPort from which the font and style    are extracted.
  557.  
  558.    RESULTS
  559.     enable - those bits in the style algorithmically generated
  560.         Style bits that are not defined are also set.
  561.  
  562.    BUGS
  563.  
  564.    SEE ALSO
  565.     SetSoftStyle    graphics/text.h
  566.  
  567.  
  568. graphics.library/AttemptLockLayerRom
  569.                            *
  570.    NAME
  571.     AttemptLockLayerRom -- Attempt to Lock Layer structure
  572.                      by rom(gfx lib) code
  573.  
  574.    SYNOPSIS
  575.     gotit = AttemptLockLayerRom( layer )
  576.      d0                  a5
  577.  
  578.     BOOLEAN gotit;
  579.     struct Layer *layer;
  580.  
  581.    FUNCTION
  582.     Query the current state of the lock on this Layer. If it is
  583.     already locked then return FALSE, could not lock. If the
  584.     Layer was not locked then lock it and return TRUE.
  585.     This call does not destroy any registers.
  586.     This call nests so that callers in this chain will not lock
  587.     themselves out.
  588.  
  589.    INPUTS
  590.     layer - pointer to Layer structure
  591.  
  592.     RESULT
  593.     returns TRUE or FALSE depending on whether the Layer is now
  594.     locked by the caller.
  595.  
  596. SEE ALSO
  597.     LockLayerRom UnlockLayerRom
  598.  
  599.  
  600. graphics.library/BltBitMap                           graphics.library/BltBitMap
  601.  
  602.    NAME
  603.     BltBitMap -- Move a rectangular region of bits in a BitMap.
  604.  
  605.    SYNOPSIS
  606.     planecnt = BltBitMap(SrcBitMap, SrcX, SrcY, DstBitMap,
  607.     D0              A0      D0:16 D1:16   A1
  608.           DstX, DstY, SizeX, SizeY, Minterm, Mask [, TempA])
  609.           D2:16    D3:16 D4:16  D5:16   D6:8    D7:8    [A2]
  610.  
  611.     ULONG planecnt;
  612.     struct BitMap *SrcBitMap,*DstBitMap;
  613.     SHORT SrcX,SrcY;
  614.     SHORT DstX,DstY;
  615.     SHORT SizeX,SizeY;
  616.     UBYTE MinTerm,Mask;
  617.     CPTR  TempA;    /*optional */
  618.  
  619.    FUNCTION
  620.     Perform non-destructive blits to move a rectangle from one
  621.     area in a BitMap to another area, which can be on a different
  622.     BitMap.
  623.     This blit is assumed to be friendly: no error conditions (e.g.
  624.     a rectangle outside the BitMap bounds) are tested or reported.
  625.  
  626.    INPUTS
  627.     SrcBitMap, DstBitMap - the BitMap(s) containing the
  628.         rectangles
  629.         - the planes copied from the source to the destination are
  630.           only those whose plane numbers are identical and less
  631.           than the minimum Depth of either BitMap and whose Mask
  632.           bit for that plane is non-zero.
  633.         - SrcBitMap and DstBitMap can be identical
  634.     SrcX, SrcY - the x and y coordinates of the upper left corner
  635.         of the source rectangle.  Valid range is positive
  636.         signed integer such that the raster word's offset
  637.         0..(32767-Size)
  638.     DstX, DstY - the x and y coordinates of the upper left
  639.         corner of the destination for the rectangle.  Valid
  640.         range is as for Src.
  641.     SizeX, SizeY - the size of the rectangle to be moved.  Valid
  642.         range is (X: 1..976; Y: 1..1023 such that final raster
  643.         word's offset is 0..32767)
  644.     Minterm - the logic function to apply to the rectangle when
  645.         A is non-zero (i.e. within the rectangle).  B is the
  646.         source rectangle and C, D is the destination for the
  647.         rectangle.
  648.         - $0C0 is a vanilla copy
  649.         - $030 inverts the source before the copy
  650.         - $050 ignores the source and inverts the destination
  651.         - see the hardware reference manual for other combinations
  652.     Mask - the write mask to apply to this operation.  Bits set 
  653.         indicate the corresponding planes (if not greater than
  654.         the minimum plane count) are to participate in the
  655.         operation.  Typically this is set to 0xff.
  656.     TempA - If the copy overlaps exactly to the left or right
  657.         (i.e. the scan line addresses overlap), and TempA is
  658.         non-zero, it points to enough chip accessable memory
  659.         (MAXBYTESPERROW) to hold a line of A source for the blit.
  660.         BitBitMap will allocate the needed TempA if none is
  661.         provided and one is needed. If the blit does not overlap;
  662.         SrcBitMap != DstBitMap then TempA need not be supplied.
  663.  
  664.    RESULTS
  665.     planecnt - the number of planes actually involved in the blit.
  666.  
  667.    BUGS
  668.        This routine uses over 300 bytes of stack when it really does
  669.     not need to. It calculates all blits ahead of time and then
  670.     sits in a loop doing the blits when it should overlap blits
  671.     with calculations.
  672.  
  673.    SEE ALSO
  674.     ClipBlit graphics/gfx.h hardware/blit.h
  675.  
  676.  
  677. graphics.library/BltBitMapRastPort           graphics.library/BltBitMapRastPort
  678.  
  679.    NAME
  680.        BltBitMapRastPort -- Blit from source bitmap to destination rastport.
  681.  
  682.    SYNOPSIS
  683.     BltBitMapRastPort
  684.         (srcbm,srcx,srcy,destrp,destX,destY,sizeX,sizeY,minterm)
  685.          a0    d0   d1   a1     d2    d3    d4    d5    d6
  686.  
  687.     struct BitMap *srcbm;
  688.     SHORT srcx,srcy;
  689.     struct RastPort *destrp;
  690.     SHORT destX,destY;
  691.     SHORT sizeX,sizeY;
  692.     UBYTE minterm;
  693.  
  694.    FUNCTION
  695.     Blits from source bitmap to position specified in destination rastport    
  696.      using minterm.
  697.  
  698.    INPUTS
  699.     srcbm - a pointer to the source bitmap
  700.     srcx  - x offset into source bitmap
  701.     srcy  - y offset into source bitmap
  702.     destrp - a pointer to the destination rastport
  703.     destX -    x offset into dest rastport
  704.     destY -    y offset into dest rastport
  705.     sizeX -    width of blit in pixels
  706.     sizeY -    height of blit in rows 
  707.     minterm - minterm to use for this blit
  708.  
  709.    RETURNS
  710.     TRUE
  711.  
  712.    BUGS
  713.  
  714.    SEE ALSO
  715.     BltMaskBitMapRastPort graphics/gfx.h graphics/rastport.h
  716.  
  717.  
  718. graphics.library/BltClear                             graphics.library/BltClear
  719.  
  720.    NAME   
  721.  
  722.     BltClear - Clear a block of memory words to zero.
  723.  
  724.    SYNOPSIS
  725.     BltClear( memBlock, bytecount, flags )
  726.             a1         d0       d1
  727.  
  728.     APTR memBlock;
  729.     ULONG    bytecount;
  730.     ULONG    flags;
  731.  
  732.    FUNCTION
  733.     For memory that is local and blitter accessable
  734.        the most efficient way to clear a range of memory locations is
  735.        to use the system's most efficient data mover, the blitter.
  736.        This command accepts the starting location and count and clears
  737.        that block to zeros.
  738.  
  739.    INPUTS
  740.     memBloc    - pointer to local memory to be cleared
  741.         memBlock is assumed to be even.
  742.     flags    set bit 0 to force function to wait until blit
  743.         is done.
  744.         set bit1 to use row/bytesperrow
  745.     bytecount    if (flags & 2) == 0 then
  746.                 even number of bytes to clear.
  747.             else
  748.                 low 16 bits is taken as number of bytes
  749.                 per row and upper 16 bits taken as
  750.                 number of rows.
  751.  
  752.     This function is somewhat hardware dependant. In the
  753.     rows/bytesperrow mode, rows must be <=1024.
  754.     In bytecount mode multiple runs of the blitter
  755.     may be used to clear all the memory.
  756. may be used to clear all the memory.
  757.    RESULT
  758.     The block of memory is set to zeros.
  759.  
  760.    BUGS
  761.  
  762.    SEE ALSO
  763.  
  764.  
  765. graphics.library/BltMaskBitMapRastPort
  766.  
  767.    NAME
  768.  
  769.        BltMaskBitMapRastPort -- blit from source bitmap to destination rastport
  770.                 with masking of source image.
  771.  
  772.    SYNOPSIS
  773.  
  774.     BltMaskBitMapRastPort
  775.         (srcbm,srcx,srcy,destrp,destX,destY,sizeX,sizeY,minterm,bltmask)
  776.          a0    d0   d1   a1     d2    d3    d4    d5    d6      a2 
  777.  
  778.     struct BitMap *srcbm;
  779.     SHORT srcx,srcy;
  780.     struct RastPort *destrp;
  781.     SHORT destX,destY;
  782.     SHORT sizeX,sizeY;
  783.     UBYTE    minterm;
  784.     APTR    bltmask;    * chip memory *
  785.  
  786.    FUNCTION
  787.     Blits from source bitmap to position specified in destination rastport    
  788.     using bltmask to determine where source overlays destination, and 
  789.     minterm to determine whether to copy the source image "as is" or
  790.     to "invert" the sense of the source image when copying. In either
  791.     case, blit only occurs where the mask is non-zero.    
  792.  
  793.  
  794.    INPUTS
  795.     srcbm - a pointer to the source bitmap
  796.     srcx  - x offset into source bitmap
  797.     srcy  - y offset into source bitmap
  798.     destrp - a pointer to the destination rastport
  799.     destX - x offset into dest rastport
  800.     destY - y offset into dest rastport
  801.     sizeX - width of blit in pixels
  802.     sizeY - height of blit in rows 
  803.     minterm - either (ABC|ABNC|ANBC) if copy source and blit thru mask
  804.           or     (ANBC)        if invert source and blit thru mask
  805.     bltmask - pointer to the single bit-plane mask, which must be the
  806.           same size and dimensions as the planes of the
  807.           source bitmap.
  808.  
  809.    RETURNS
  810.  
  811.    BUGS
  812.  
  813.    SEE ALSO
  814.    BltBitMapRastPort    graphics/gfx.h graphics/rastport.h
  815.  
  816.  
  817. graphics.library/BltPattern                         graphics.library/BltPattern
  818.  
  819.    NAME
  820.     BltPattern --  Using standard drawing rules for areafill,
  821.                      blit through a mask.
  822.  
  823.    SYNOPSIS
  824.        BltPattern(rp, mask, xl, yl, maxx, maxy, bytecnt)
  825.                   a1,  a0   d0  d1   d2   d3     d4
  826.  
  827.     struct RastPort *rp;
  828.     APTR    mask;
  829.     SHORT    xl,yl,maxx,maxy;
  830.     SHORT bytecnt;
  831.  
  832.    FUNCTION
  833.        Blit using drawmode,areafill pattern, and mask 
  834.        at position rectangle (xl,yl) (maxx,maxy).
  835.  
  836.    INPUTS
  837.        rp -  points to RastPort
  838.        mask -  points to 2 dimensional mask if needed
  839.                if mask == NULL then use a rectangle.
  840.        xl,yl - upper left of rectangular region in RastPort
  841.        maxx,maxy - points to lower right of rectangular region in RastPort
  842.        bytecnt - BytesPerRow for mask
  843.  
  844.    RETURNS
  845.  
  846.    SEE ALSO
  847.     AreaEnd
  848.  
  849.  
  850. graphics.library/BltTemplate                       graphics.library/BltTemplate
  851.  
  852.    NAME
  853.     BltTemplate -- Cookie cut a shape in a rectangle to the RastPort.
  854.  
  855.    SYNOPSIS
  856.     BltTemplate(SrcTemplate, SrcX, SrcMod, rp,
  857.             a0             d0:16  d1:16  a1
  858.             DstX,  DstY, SizeX, SizeY)
  859.             d2:16  d3:16 d4:16  d5:16
  860.  
  861.     CPTR    SrcTemplate;
  862.     SHORT    SrcX;
  863.     SHORT    SrcMod;
  864.     struct  RastPort *rp;
  865.     SHORT    DstX,DstY;
  866.     SHORT    SizeX,SizeY;
  867.     
  868.  
  869.    FUNCTION
  870.     This function draws the image in the template into the
  871.     RastPort in the current color and drawing mode at the
  872.     specified position.  The template is assumed not to overlap
  873.     the destination.
  874.     If the template falls outside the RastPort boundary, it is
  875.     truncated to that boundary.
  876.  
  877.     Note: the SrcTemplate pointer should point to the "nearest" word
  878.        (rounded down) of the template mask. Fine alignment of the mask
  879.        is acheived by setting the SrcX bit offseet within the range
  880.        of 0 to 15 decimal.
  881.  
  882.    INPUTS
  883.     SrcTemplate - pointer to the first (nearest) word of the template mask.
  884.     SrcX - x bit offset into the template mask (range 0..15).
  885.     SrcMod - number of bytes per row in template mask.
  886.     rp - pointer to destination RastPort.
  887.     DstX, DstY - x and y coordinates of the upper left
  888.         corner of the destination for the blit.
  889.     SizeX, SizeY - size of the rectangle to be used as the
  890.         template.
  891.  
  892.    BUGS
  893.     The destination rastport (rp) must have an associated
  894.     Layer structure or srcX will be ignored.
  895.  
  896.    SEE ALSO
  897.     BltPattern    graphics/rastport.h
  898.  
  899.  
  900. graphics.library/CBump                                   graphics.library/CBump
  901.    NAME
  902.     CBump -  increment user copper list pointer (bump to next position in list).
  903.  
  904.    SYNOPSIS
  905.     CBump( c )
  906.           a1
  907.  
  908.     struct UCopList *c;
  909.  
  910.    FUNCTION
  911.     Increment pointer to space for next instruction in user copper list.
  912.  
  913.    INPUTS
  914.     c - pointer to UCopList structure
  915.  
  916.    RESULTS
  917.     User copper list pointer is incremented to next position.  
  918.     Pointer is repositioned to next user copperlist instruction block 
  919.     if the current block is full.
  920.  
  921.         Note: CBump is usually invoked for the programmer as part of the
  922.               macro definitions CWAIT or CMOVE.
  923.  
  924.    BUGS
  925.  
  926.    SEE ALSO
  927.     CINIT CWAIT CMOVE CEND graphics/copper.h
  928.  
  929. graphics.library/CEND                                     graphics.library/CEND
  930.    NAME
  931.     CEND -- Terminate user copper list.
  932.  
  933.    SYNOPSIS
  934.     CEND( c )
  935.  
  936.     struct UCopList *c;
  937.  
  938.    FUNCTION
  939.     Add instruction to terminate user copper list.
  940.  
  941.    INPUTS
  942.     c - pointer to UCopList structure
  943.  
  944.    RESULTS
  945.     This is actually a macro that calls the macro CWAIT(c,10000,255).
  946.     10000 is a magical number that the graphics library uses.
  947.     I hope display technology doesn't catch up too fast!
  948.  
  949.    BUGS
  950.  
  951.    SEE ALSO
  952.     CINIT CWAIT CMOVE graphics/copper.h
  953.  
  954. graphics.library/ChangeSprite                     graphics.library/ChangeSprite
  955.  
  956.    NAME
  957.        ChangeSprite -- Change the sprite image pointer.
  958.  
  959.    SYNOPSIS
  960.        ChangeSprite( vp, s, newdata)
  961.                      a0  a1   a2
  962.  
  963.     struct ViewPort *vp;
  964.     struct SimpleSprite *s;
  965.     APTR    newdata;    /* chip memory */
  966.  
  967.    FUNCTION 
  968.     The sprite image is changed to use the data starting at newdata
  969.  
  970.    INPUTS
  971.        vp - pointer to ViewPort structure that this sprite is
  972.           relative to.
  973.           or 0 if relative only top of View
  974.     s - pointer to SimpleSprite structure
  975.     newdata    - pointer to data structure of the following form.
  976.         struct spriteimage
  977.         {
  978.             UWORD    posctl[2];    /* used by simple sprite machine*/
  979.             UWORD    data[height][2];   /* actual sprite image */
  980.             UWORD    reserved[2];    /* initialized to */
  981.                                          /*  0x0,0x0 */
  982.         };
  983.     Programmer must initialize reserved[2].  Spriteimage must be
  984.     in CHIP memory. The height subfield of the SimpleSprite structure
  985.     must be set to reflect the height of the new spriteimage BEFORE
  986.     calling ChangeSprite. The programmer may allocate two sprites to
  987.     handle a single attached sprite.  After GetSprite, ChangeSprite,
  988.     the programmer can set the SPRITE_ATTACHED bit in posctl[1] of the
  989.     odd numbered sprite.
  990.     If you need more than 8 sprites look up VSprites in the
  991.     graphics documentation.
  992.  
  993.    RESULTS 
  994.  
  995.    BUGS 
  996.  
  997.    SEE ALSO
  998.     FreeSprite ChangeSprite MoveSprite AddVSprite graphics/sprite.h
  999.  
  1000.  
  1001. graphics.library/CINIT                                   graphics.library/CINIT
  1002.  
  1003.    NAME
  1004.     CINIT -- Initialize user copperlist to accept intermediate 
  1005.         user copper instructions.
  1006.  
  1007.    SYNOPSIS
  1008.      ucl = CINIT( c , n )
  1009.  
  1010.     UCopperListInit( c , n )
  1011.              a0  d0
  1012.  
  1013.     struct UCopList *ucl;
  1014.     struct UCopList *c;
  1015.     short n;
  1016.  
  1017.    FUNCTION
  1018.     Allocates and/or initialize copperlist structures/buffers.
  1019.     This is a macro that calls UCopListLinit. CINIT will
  1020.     allocate a new UCopList if c==0. If (c != 0) it will
  1021.     initialize the data structures to begin new copperlist
  1022.     without allocating more memory and it ignores n.
  1023.  
  1024.    INPUTS
  1025.     c - pointer to UCopList structure
  1026.     n - number of instructions buffer must hold
  1027.  
  1028.    RESULTS
  1029.     An initialize list to accept intermediate copper instructions.
  1030.         
  1031.    BUGS
  1032.     CINIT will not actually allocate a new copperlist if c==0.
  1033.     Instead you must allocate a 12 byte MEMF_PUBLIC|MEMF_CLEAR block,
  1034.     and pass it to this function.  The system's FreeVPortCopLists
  1035.     function will take care of deallocating it.
  1036.  
  1037.    SEE ALSO
  1038.  
  1039.  
  1040. graphics.library/ClearEOL                             graphics.library/ClearEOL
  1041.  
  1042.    NAME
  1043.     ClearEOL - Clear from current position to end of line.
  1044.  
  1045.    SYNOPSIS
  1046.     ClearEOL( rp )
  1047.           a1
  1048.  
  1049.     struct RastPort *rp;
  1050.  
  1051.    FUNCTION
  1052.     Clear a rectangular swath from the current position to the
  1053.     right edge of the rastPort.  The height of the swath is taken
  1054.     from that of the current text font, and the vertical 
  1055.     positioning of the swath is adjusted by the text baseline,
  1056.     such that text output at this position would lie wholly on 
  1057.     this newly cleared area.
  1058.     Clearing consists of setting the color of the swath to zero,
  1059.     or, if the DrawMode is 2, to the BgPen.
  1060.  
  1061.    INPUTS
  1062.     rp - pointer to RastPort structure
  1063.  
  1064.    BUGS
  1065.  
  1066.    SEE ALSO
  1067.     Text ClearScreen SetRast graphics/text.h graphics/rastport.h
  1068.  
  1069.  
  1070. graphics.library/ClearRectRegion               graphics.library/ClearRectRegion
  1071.  
  1072.    NAME
  1073.     ClearRectRegion -- Perform 2d CLEAR operation of rectangle
  1074.             with region, leaving result in region.
  1075.  
  1076.    SYNOPSIS
  1077.     status = ClearRectRegion(region,rectangle)
  1078.      d0                a0       a1
  1079.  
  1080.     BOOL error;
  1081.     struct Region *region;
  1082.     struct Rectangle *rectangle;
  1083.  
  1084.    FUNCTION
  1085.     Clip away any portion of the region that exists inside
  1086.     of the rectangle. Leave the result in region.
  1087.  
  1088.    INPUTS
  1089.     region - pointer to Region structure
  1090.     rectangle - pointer to Rectangle structure
  1091.  
  1092.    RESULTS
  1093.     status - return TRUE if successful operation
  1094.          return FALSE if ran out of memory
  1095.  
  1096.    BUGS
  1097.  
  1098.    SEE ALSO
  1099.     AndRectRegion graphics/regions.h
  1100.  
  1101.  
  1102. graphics.library/ClearRegion                       graphics.library/ClearRegion
  1103.  
  1104.    NAME 
  1105.        ClearRegion -- Remove all rectangles from region.
  1106.  
  1107.    SYNOPSIS 
  1108.        ClearRegion(region)
  1109.                      a0
  1110.  
  1111.     struct Region *region;
  1112.  
  1113.    FUNCTION 
  1114.        Clip away all rectangles in the region leaving nothing.
  1115.  
  1116.    INPUTS 
  1117.        region - pointer to Region structure
  1118.  
  1119.    BUGS 
  1120.  
  1121.    SEE ALSO
  1122.     NewRegion graphics/regions.h
  1123.  
  1124.  
  1125. graphics.library/ClearScreen                       graphics.library/ClearScreen
  1126.  
  1127.    NAME
  1128.     ClearScreen - Clear from current position to end of RastPort.
  1129.  
  1130.    SYNOPSIS
  1131.     ClearScreen( rp )
  1132.              a1
  1133.  
  1134.     struct RastPort *rp;
  1135.  
  1136.    FUNCTION
  1137.     Clear a rectangular swath from the current position to the
  1138.     right edge of the rastPort with ClearEOL, then clear the rest
  1139.     of the screen from just beneath the swath to the bottom of
  1140.     the rastPort.
  1141.     Clearing consists of setting the color of the swath to zero,
  1142.     or, if the DrawMode is 2, to the BgPen.
  1143.  
  1144.    INPUTS
  1145.     rp - pointer to RastPort structure
  1146.  
  1147.    BUGS
  1148.  
  1149.    SEE ALSO
  1150.        ClearEOL Text SetRast graphics/text.h graphics/rastport.h
  1151.  
  1152.  
  1153. graphics.library/ClipBlit                             graphics.library/ClipBlit
  1154.  
  1155. NAME
  1156.  
  1157.    ClipBlit  --  Calls BltBitMap() after accounting for windows
  1158.  
  1159. SYNOPSIS
  1160.  
  1161.    ClipBlit(Src, SrcX, SrcY, Dest, DestX, DestY, XSize, YSize, Minterm );
  1162.             a0   d0    d1    a1    d2     d3     d4     d5     d6
  1163.  
  1164. FUNCTION
  1165.    Performs the same function as BltBitMap(), except that it
  1166.    takes into account the Layers and ClipRects of the layer library,
  1167.    all of which are (and should be) transparent to you.  So, whereas
  1168.    BltBitMap() requires pointers to BitMaps, ClipBlit requires pointers to
  1169.    the RastPorts that contain the Bitmaps, Layers, et cetera.
  1170.  
  1171.    If you are going to blit blocks of data around via the RastPort of your
  1172.    Intuition Window, you must call this routine (rather than BltBitMap()).
  1173.  
  1174.    Either the Src RastPort, the Dest RastPort, both, or neither, can have 
  1175.    Layers.  This routine takes care of all cases.
  1176.  
  1177.    See BltBitMap() for a thorough explanation.
  1178.  
  1179. INPUTS
  1180.  
  1181.    Src = pointer to the RastPort of the source for your blit
  1182.    SrcX, SrcY = the topleft offset into Src for your data
  1183.    Dest = pointer to the RastPort to receive the blitted data
  1184.    DestX, DestY = the topleft offset into the destination RastPort
  1185.    XSize = the width of the blit
  1186.    YSize = the height of the blit
  1187.    Minterm = the boolean blitter function, where SRCB is associated with the
  1188.              Src RastPort and SRCC goes to the Dest RastPort
  1189.  
  1190. RESULT
  1191.  
  1192.    None
  1193.  
  1194. BUGS
  1195.  
  1196.    None
  1197.  
  1198. SEE ALSO
  1199.  
  1200.    BltBitMap();
  1201.  
  1202.  
  1203. graphics.library/CloseFont                           graphics.library/CloseFont
  1204.  
  1205.    NAME
  1206.     CloseFont -- Release a pointer to a system font.
  1207.  
  1208.    SYNOPSIS
  1209.     CloseFont(font)
  1210.            a1
  1211.  
  1212.     struct TextFont *font;
  1213.  
  1214.    FUNCTION
  1215.     This function indicates that the font specified is no longer 
  1216.     in use.  It is used to close a font opened by OpenFont, so 
  1217.     that fonts that are no longer in use do not consume system
  1218.     resources.
  1219.     
  1220.    INPUTS
  1221.     font -    a font pointer as returned by OpenFont or OpenDiskFont
  1222.  
  1223.    BUGS
  1224.  
  1225.    SEE ALSO
  1226.     OpenFont diskfont.library/OpenDiskFont graphics/text.h
  1227.  
  1228.  
  1229. graphics.library/CMOVE                                   graphics.library/CMOVE
  1230.  
  1231.    NAME
  1232.     CMOVE -- append copper move instruction to user copper list.
  1233.  
  1234.    SYNOPSIS
  1235.     CMOVE( c , a , v )
  1236.  
  1237.     CMove( c , a , v )
  1238.           a1  d0  d1
  1239.     CBump( c )
  1240.           a1
  1241.  
  1242.     struct UCopList *c;
  1243.     APTR    a;
  1244.     SHORT    v;
  1245.  
  1246.    FUNCTION
  1247.     Add instruction to move value v to hardware register a.
  1248.  
  1249.    INPUTS
  1250.     c - pointer to UCopList structure
  1251.     a - hardware register
  1252.     v - 16 bit value to be written
  1253.  
  1254.    RESULTS
  1255.     This is actually a macro that calls CMove(c,&a,v)
  1256.     and then calls CBump(c) to bump the local pointer
  1257.     to the next instruction. Watch out for macro side affects.
  1258.  
  1259.    BUGS
  1260.     
  1261.    SEE ALSO
  1262.     CINIT CMOVE CWAIT graphics/copper.h
  1263.  
  1264.  
  1265. graphics.library/CopySBitMap                       graphics.library/CopySBitMap
  1266.  
  1267.    NAME
  1268.        CopySBitMap --    Syncronize Layer window with contents of
  1269.                         Super BitMap
  1270.  
  1271.    SYNOPSIS
  1272.        CopySBitMap( layer )
  1273.                      a0
  1274.  
  1275.     struct Layer *layer;
  1276.  
  1277.    FUNCTION
  1278.     This is the inverse of SyncSBitMap.
  1279.        Copy all bits from SuperBitMap to Layer bounds.
  1280.     This is used for those functions that do not
  1281.     want to deal with the ClipRect structures but do want
  1282.     to be able to work with a SuperBitMap Layer.
  1283.  
  1284.    INPUTS
  1285.  
  1286.     layer - pointer to a SuperBitMap Layer
  1287.         The Layer must already be locked by the caller.
  1288.  
  1289.    BUGS
  1290.  
  1291.    SEE ALSO
  1292.     LockLayerRom SyncSBitMap
  1293.  
  1294.  
  1295. graphics.library/CWAIT                                   graphics.library/CWAIT
  1296.  
  1297.    NAME
  1298.     CWAIT -- Append copper wait instruction to user copper list.
  1299.  
  1300.    SYNOPSIS
  1301.     CWAIT( c , v , h )
  1302.  
  1303.     CWait( c , v , h )
  1304.            a1  d0  d1
  1305.     CBump( c )
  1306.           a1
  1307.  
  1308.     struct UCopList *c;
  1309.     short v,h;
  1310.  
  1311.    FUNCTION
  1312.     Add instruction to wait for vertical beam position v and
  1313.     horizontal position h to this intermediate copper list.
  1314.  
  1315.    INPUTS
  1316.     c - pointer to UCopList structure
  1317.     v - vertical beam position (relative to top of viewport)
  1318.     h - horizontal beam position
  1319.  
  1320.    RESULTS
  1321.     this is actually a macro that calls CWait(c,v,h)
  1322.     and then calls CBump(c) to bump the local pointer
  1323.     to the next instruction.
  1324.    
  1325.    BUGS
  1326.     User waiting for horizontal values of greater than 222 decimal is illegal.
  1327.  
  1328.    SEE ALSO
  1329.      CINIT CMOVE CEND graphics/copper.h
  1330.  
  1331.  
  1332. graphics.library/DisownBlitter                   graphics.library/DisownBlitter
  1333.  
  1334. NAME
  1335.        DisownBlitter - return blitter to free state.
  1336.  
  1337.  
  1338. SYNOPSIS
  1339.        DisownBlitter()
  1340.  
  1341. FUNCTION
  1342.         Free blitter up for use by other blitter users.
  1343.  
  1344. INPUTS
  1345.  
  1346. RETURNS
  1347.  
  1348. SEE ALSO
  1349.        OwnBlitter
  1350.  
  1351.  
  1352.  
  1353. graphics.library/DisposeRegion                   graphics.library/DisposeRegion
  1354.  
  1355.    NAME
  1356.        DisposeRegion -- Return all space for this region to free
  1357.              memory pool.
  1358.  
  1359.    SYNOPSIS
  1360.        DisposeRegion(region)
  1361.                       a0 
  1362.  
  1363.     struct Region *region;
  1364.  
  1365.    FUNCTION
  1366.        Free all RegionRectangles for this Region then
  1367.     free the Region itself.
  1368.  
  1369.    INPUTS
  1370.        region - pointer to Region structure
  1371.  
  1372.    BUGS
  1373.  
  1374.    SEE ALSO
  1375.     NewRegion graphics/regions.h
  1376.  
  1377.  
  1378. graphics.library/DoCollision                       graphics.library/DoCollision
  1379.     
  1380.     NAME
  1381.        DoCollision -- Test every gel in gel list for collisions.
  1382.     
  1383.     SYNOPSIS
  1384.        DoCollision(rp)
  1385.                    a1
  1386.     
  1387.     struct RastPort *rp;
  1388.  
  1389.     FUNCTION
  1390.        Tests each gel in gel list for boundary and gel-to-gel collisions.
  1391.        On detecting one of these collisions, the appropriate collision-
  1392.     handling routine is called.  See the documentation for a thorough 
  1393.     description of which collision routine is called. This routine 
  1394.     expects to find the gel list correctly sorted in Y,X order.
  1395.        The system routine SortGList performs this function for the user
  1396.     
  1397.     INPUTS
  1398.        rp = pointer to a RastPort
  1399.     
  1400.     BUGS
  1401.     
  1402.     SEE ALSO
  1403.        InitGels  SortGList  graphics/gels.h  graphics/gels.h
  1404.  
  1405. graphics.library/Draw                                     graphics.library/Draw
  1406.  
  1407.    NAME
  1408.        Draw -- Draw a line between the current pen position
  1409.                        and the new x,y position.
  1410.  
  1411.    SYNOPSIS
  1412.        Draw( rp,   x,     y)
  1413.              a1  d0:16  d1:16
  1414.  
  1415.     struct RastPort *rp;
  1416.     SHORT x,y;
  1417.  
  1418.    FUNCTION
  1419.        Draw a line from the current pen position to (x,y).
  1420.  
  1421.    INPUTS
  1422.  
  1423.     rp - pointer to a RastPort
  1424.     x,y - point in the RastPort to end the line.
  1425.  
  1426.    BUGS
  1427.  
  1428.    SEE ALSO
  1429.     Move graphics/rastport.h
  1430.  
  1431.  
  1432. graphics.library/DrawEllipse                       graphics.library/DrawEllipse
  1433.  
  1434.     NAME
  1435.     DrawEllipse -- Draw an ellipse centered at cx,cy with vertical
  1436.        and horizontal radii of a,b respectively.
  1437.  
  1438.     SYNOPSIS
  1439.     DrawEllipse( rp, cx, cy, a, b )
  1440.              a1  d0  d1  d2 d3 
  1441.  
  1442.     struct RastPort *rp;
  1443.     SHORT cx, cy;
  1444.     SHORT a, b;
  1445.  
  1446.     FUNCTION
  1447.        Create an elliptical outine within the rectangular region
  1448.     specified by the parameters, using the current foreground pen color.
  1449.  
  1450.     INPUTS
  1451.     rp - pointer to the RastPort into which the ellipse will be drawn.
  1452.     cx - x coordinate of the centerpoint relative to the rastport.
  1453.     cy - y coordinate of the centerpoint relative to the rastport.
  1454.     a - the horizontal radius of the ellipse (note: a must be > 0)
  1455.     b - the vertical radius of the ellipse (note: b must be > 0)
  1456.  
  1457.     Note: this routine does not clip the ellipse to a non-layered rastport.
  1458.  
  1459.     BUGS
  1460.  
  1461.     SEE ALSO
  1462.     DrawCircle, graphics/rastport.h
  1463.  
  1464.  
  1465. graphics.library/DrawGList                           graphics.library/DrawGList
  1466.     
  1467.     NAME
  1468.        DrawGList -- Process the gel list, queueing VSprites, drawing Bobs.
  1469.     
  1470.     SYNOPSIS
  1471.        DrawGList(rp, vp) 
  1472.                  a1  a0
  1473.     
  1474.     struct RastPort *rp;
  1475.     struct ViewPort *vp;
  1476.  
  1477.     FUNCTION
  1478.        Performs one pass of the current gel list.
  1479.           - If nextLine and lastColor are defined, these are 
  1480.         initialized for each gel.
  1481.            - If it's a VSprite build it into the copper list.
  1482.            - If it's a Bob, draw it into the current raster.
  1483.           - Copy the save values into the "old" variables, 
  1484.         double-buffering if required.
  1485.     
  1486.     INPUTS
  1487.        rp = pointer to the RastPort where Bobs will be drawn
  1488.     vp = pointer to the ViewPort for which VSprites will be created
  1489.     
  1490.     BUGS
  1491.        MUSTDRAW isn't implemented yet. 
  1492.     
  1493.     SEE ALSO
  1494.     InitGels  graphics/gels.h graphics/rastport.h  graphics/view.h
  1495.  
  1496. graphics.library/Flood                                   graphics.library/Flood
  1497.  
  1498.    NAME
  1499.     Flood -- Flood rastport like areafill.
  1500.  
  1501.    SYNOPSIS
  1502.     error = Flood( rp, mode, x, y)
  1503.         d0            a1   d2  d0  d1
  1504.  
  1505.     BOOLEAN error;
  1506.     struct RastPort rp;
  1507.     ULONG mode;
  1508.     SHORT x,y;
  1509.  
  1510.    FUNCTION
  1511.     Search the BitMap starting at (x,y). Fill all adjacent pixels
  1512.     if they are:
  1513.     a: arenot the same as AOLPen     Mode 0
  1514.     b: same as the one at (x,y)         Mode 1
  1515.     When actually doing the fill use the modes that apply to
  1516.     standard areafill routine such as drawmodes and patterns.
  1517.  
  1518.    INPUTS
  1519.     rp - pointer to RastPort
  1520.     (x,y) - coordinate in BitMap
  1521.     mode -  0 fill all adjacent pixels searching for border
  1522.         1 fill all adjacent pixels that have same pen number
  1523.                 as (x,y)
  1524.  
  1525.     Note: in order to use Flood, the destination RastPort must 
  1526.         have a valid TmpRas raster whose size is as large as 
  1527.         that of the RastPort.
  1528.  
  1529.    SEE ALSO
  1530.     AreaEnd graphics/rastport.h
  1531.  
  1532.  
  1533. graphics.library/FreeColorMap                     graphics.library/FreeColorMap
  1534.  
  1535.    NAME
  1536.        FreeColorMap -- Free the ColorMap structure and return memory
  1537.                         to free memory pool.
  1538.  
  1539.    SYNOPSIS
  1540.        FreeColorMap( colormap )
  1541.                        a0
  1542.  
  1543.     struct ColorMap *colormap;
  1544.  
  1545.     FUNCTION
  1546.     Return the memory to the free memory pool that was allocated
  1547.         with GetColorMap.
  1548.  
  1549.    INPUTS
  1550.     colormap - pointer to ColorMap allocated with GetColorMap
  1551.  
  1552.    RESULT
  1553.     The space is made available for others to use.
  1554.  
  1555.    BUGS
  1556.  
  1557.    SEE ALSO
  1558.        SetRGB4 GetColorMap graphics/view.h
  1559.  
  1560. graphics.library/FreeCopList                       graphics.library/FreeCopList
  1561.  
  1562. NAME
  1563.        FreeCopList -- deallocate intermediate copper list
  1564.  
  1565. SYNOPSIS
  1566.        FreeCopList(coplist)
  1567.               a0
  1568.  
  1569.     struct CopList *coplist;
  1570.  
  1571. FUNCTION
  1572.     Deallocate all memory associated with this copper list.
  1573.  
  1574. INPUTS
  1575.        coplist    - pointer to structure CopList
  1576.  
  1577. RESULTS
  1578.     memory returned to memory manager
  1579.  
  1580. BUGS
  1581.  
  1582. SEE ALSO
  1583.     graphics/copper.h
  1584.  
  1585.  
  1586. graphics.library/FreeCprList                       graphics.library/FreeCprList
  1587.  
  1588.    NAME
  1589.        FreeCprList -- deallocate hardware copper list
  1590.  
  1591.    SYNOPSIS
  1592.        FreeCprList(cprlist)
  1593.               a0
  1594.  
  1595.     struct cprlist *cprlist;
  1596.  
  1597.    FUNCTION
  1598.        return cprlist to free memory pool
  1599.  
  1600.    INPUTS
  1601.        cprlist - pointer to cprlist structure
  1602.  
  1603.    RESULTS
  1604.     memory returned and made available to other tasks
  1605.  
  1606.    BUGS
  1607.  
  1608.    SEE ALSO
  1609.     graphics/copper.h
  1610.  
  1611.  
  1612. graphics.library/FreeGBuffers                     graphics.library/FreeGBuffers
  1613.  
  1614.     NAME
  1615.        FreeGBuffers -- Deallocate memory obtained by GetGBufers.
  1616.     
  1617.     SYNOPSIS
  1618.        FreeGBuffers(anOb, rp, db)
  1619.                     a0    a1  d0  
  1620.    
  1621.     struct AnimOb *anOb;
  1622.     struct RastPort *rp;
  1623.     BOOL db;
  1624.  
  1625.     FUNCTION
  1626.        For each sequence of each component of the AnimOb, 
  1627.     deallocate memory for:
  1628.            SaveBuffer
  1629.            BorderLine
  1630.            CollMask and ImageShadow (point to same buffer)
  1631.            if db is set (user had used double-buffering) deallocate:
  1632.                DBufPacket
  1633.                BufBuffer
  1634.     
  1635.     INPUTS
  1636.        anOb = pointer to the AnimOb structure
  1637.        rp = pointer to the current RastPort
  1638.        db = double-buffer indicator (set TRUE for double-buffering)
  1639.     
  1640.     BUGS
  1641.     
  1642.     SEE ALSO
  1643.        GetGBuffers  graphics/gels.h  graphics/rastport.h
  1644.  
  1645. graphics.library/FreeRaster                         graphics.library/FreeRaster
  1646.  
  1647. NAME
  1648.        FreeRaster -- Release an allocated area to the system free memory pool.
  1649.  
  1650.  
  1651.  
  1652. SYNOPSIS
  1653.        FreeRaster( p, width, height)
  1654.            a0   d0:16  d1:16
  1655.  
  1656.     PLANEPTR p;
  1657.     USHORT width,height;
  1658.  
  1659.    FUNCTION
  1660.     Return the memory associated with this PLANEPTR of size
  1661.     width and height to the MEMF_CHIP memory pool.
  1662.  
  1663. INPUTS
  1664.        p  =  a pointer to a memory space  returned  as  a
  1665.                        result of a call to AllocRaster.
  1666.  
  1667.     width - the width in bits of the bitplane.
  1668.     height - number of rows in bitplane.
  1669.  
  1670.        the same values of width and height with which  you
  1671.        called AllocRaster in the first  place,  when  the
  1672.        pointer p returned.   This defines the size of the
  1673.        memory  space which is to be returned to the  free
  1674.        memory pool.
  1675.  
  1676.     BUGS
  1677.  
  1678.     SEE ALSO
  1679.     AllocRaster graphics/gfx.h
  1680.  
  1681.  
  1682. graphics.library/FreeSprite                         graphics.library/FreeSprite
  1683.  
  1684.    NAME
  1685.        FreeSprite -- Return sprite for use by others and virtual
  1686.                       sprite machine.
  1687.  
  1688.    SYNOPSIS
  1689.        FreeSprite( pick )
  1690.                     d0
  1691.  
  1692.     SHORT pick;
  1693.  
  1694.    FUNCTION
  1695.     Mark sprite as available for others to use.
  1696.        These sprite routines are provided to ease sharing of sprite
  1697.     hardware and to handle simple cases of sprite usage and
  1698.     movement.  It is assumed the programs that use these routines
  1699.     do want to be good citizens in their hearts. ie: they will
  1700.     not FreeSprite unless they actually own the sprite.
  1701.     Virtual Sprite machine may ignore simple sprite machine.
  1702.  
  1703.    INPUTS
  1704.        pick - number in range of 0-7
  1705.  
  1706.    RESULTS
  1707.     sprite made available for subsequent callers of GetSprite
  1708.     as well as use by Virtual Sprite Machine
  1709.  
  1710.    BUGS
  1711.  
  1712.    SEE ALSO
  1713.        GetSprite ChangeSprite MoveSprite graphics/sprite.h
  1714.  
  1715.  
  1716. graphics.library/FreeVPortCopLists           graphics.library/FreeVPortCopLists
  1717.  
  1718.    NAME
  1719.        FreeVPortCopLists -- deallocate all intermediate copper lists and
  1720.        their headers from a viewport
  1721.  
  1722.    SYNOPSIS
  1723.        FreeVPortCopLists(vp)
  1724.                          a0
  1725.  
  1726.     struct ViewPort *vp;
  1727.  
  1728.    FUNCTION
  1729.        Search display, color, sprite, and user copper
  1730.        lists and call FreeMem() to deallocate them from memory
  1731.  
  1732.    INPUTS
  1733.        vp - pointer to ViewPort structure
  1734.  
  1735.    RESULTS
  1736.        vp->DspIns = NULL; vp->SprIns = NULL; vp->ClrIns = NULL;
  1737.        vp->UCopIns = NULL;
  1738.  
  1739.    BUGS
  1740.        none known
  1741.  
  1742.    SEE ALSO
  1743.     graphics/view.h
  1744.  
  1745.  
  1746. graphics.library/GetColorMap                       graphics.library/GetColorMap
  1747.  
  1748.    NAME
  1749.        GetColorMap -- allocate and initialize Colormap
  1750.  
  1751.  
  1752.    SYNOPSIS
  1753.        cm = GetColorMap( entries )
  1754.        d0            d0
  1755.  
  1756.     struct ColorMap *cm;
  1757.     LONG entries;
  1758.  
  1759.    FUNCTION
  1760.        Allocates, initializes and returns a pointer to a ColorMap
  1761.        data structure, later enabling calls to SetRGB4 
  1762.        and LoadRGB4 to load colors for a view port. The ColorTable
  1763.     pointer in the ColorMap structure points to a hardware
  1764.     specific colormap data structure. You should not count on
  1765.     it being anything you can understand. Use GetRGB4() to
  1766.     query it or SetRGB4CM to set it directly.
  1767.  
  1768.    INPUTS
  1769.     entries - number of entries for this colormap 
  1770.  
  1771.     RESULT
  1772.     The pointer value returned by this routine, if nonzero,
  1773.        may be stored into the ViewPort.ColorMap pointer.
  1774.        If a value of 0 is returned, the system was unable
  1775.        to allocate enough memory space for the required
  1776.        data structures.
  1777.  
  1778.    BUGS
  1779.  
  1780.    SEE ALSO
  1781.        SetRGB4 FreeColorMap
  1782.  
  1783. graphics.library/GetGBuffers                       graphics.library/GetGBuffers
  1784.  
  1785.     NAME
  1786.        GetGBuffers -- Attempt to allocate ALL buffers of an entire AnimOb.
  1787.     
  1788.     SYNOPSIS
  1789.        status = GetGBuffers(anOb, rp, db)
  1790.          d0                 a0    a1  d0
  1791.     
  1792.     BOOL status;
  1793.     struct AnimOb *anOb;
  1794.     struct RastPort *rp;
  1795.     BOOL db;
  1796.  
  1797.     FUNCTION
  1798.        For each sequence of each component of the AnimOb, allocate memory for:
  1799.  
  1800.            SaveBuffer
  1801.            BorderLine
  1802.            CollMask and ImageShadow (point to same buffer)
  1803.            if db is set TRUE (user wants double-buffering) allocate:
  1804.                DBufPacket
  1805.                BufBuffer
  1806.     
  1807.     INPUTS
  1808.        anOb = pointer to the AnimOb structure
  1809.        rp = pointer to the current RastPort
  1810.        db = double-buffer indicator (set TRUE for double-buffering)
  1811.     
  1812.     RESULT
  1813.        status = TRUE if the memory allocations were all successful, else FALSE
  1814.  
  1815.     
  1816.     BUGS
  1817.     If any of the memory allocations fail it does not free the partial
  1818.     allocations that did succeed.
  1819.     
  1820.     SEE ALSO
  1821.     FreeGBuffers graphics/gels.h
  1822.     
  1823.  
  1824. graphics.library/GetRGB4                               graphics.library/GetRGB4
  1825.  
  1826.    NAME
  1827.        GetRGB4 -- Inquire value of entry in ColorMap.
  1828.  
  1829.    SYNOPSIS
  1830.        value = GetRGB4( colormap, entry )
  1831.           d0              a0       d0
  1832.  
  1833.     ULONG value;
  1834.     struct ColorMap *colormap;
  1835.     LONG entry;
  1836.  
  1837.    FUNCTION
  1838.     Read and format a value from the ColorMap.
  1839.  
  1840.    INPUTS
  1841.     colormap - pointer to ColorMap structure
  1842.     entry - index into colormap
  1843.  
  1844.    RESULT
  1845.     returns -1 if no valid entry
  1846.     return UWORD RGB value 4 bits per gun right justified
  1847.  
  1848.    BUGS
  1849.  
  1850.    SEE ALSO
  1851.        SetRGB4 LoadRGB4 GetColorMap FreeColorMap graphics/view.h
  1852.  
  1853. graphics.library/GetSprite                           graphics.library/GetSprite
  1854.  
  1855.    NAME
  1856.     GetSprite -- Attempt to get a sprite for the simple sprite
  1857.                      manager.
  1858.  
  1859.    SYNOPSIS
  1860.     Sprite_Number = GetSprite( sprite, pick )
  1861.         d0                a0      d0
  1862.  
  1863.     SHORT Sprite_Number;
  1864.     struct SimpleSprite *sprite;
  1865.     SHORT pick;
  1866.  
  1867.    FUNCTION
  1868.     Attempt to allocate one of the eight sprites for private use
  1869.     with the simple sprite manager. This must be done before using
  1870.     further calls to simple sprite machine. If the programmer
  1871.     wants to use 15 color sprites you must allocate both sprites
  1872.     and set the 'SPRITE_ATTACHED' bit in the odd sprite's posctldata
  1873.     array. 
  1874.  
  1875.    INPUTS
  1876.     sprite - ptr to programmers SimpleSprite structure.
  1877.     pick - number in the range of 0-7 or
  1878.       -1 if programmer just wants the next one.
  1879.  
  1880.    RESULTS
  1881.     If pick is 0-7 attempt to allocate the sprite. If the sprite
  1882.     is already allocated then return -1.
  1883.     If pick -1 allocate the next sprite starting search at 0.
  1884.     If no sprites are available return -1 and fill -1 in num entry
  1885.     of SimpleSprite structure.
  1886.     If the sprite is available for allocation, mark it allocated
  1887.     and fill in the 'num' entry of the SimpleSprite structure.
  1888.     If successful return the sprite number.
  1889.  
  1890.    BUGS
  1891.  
  1892.    SEE ALSO
  1893.     FreeSprite ChangeSprite MoveSprite GetSprite graphics/sprite.h
  1894.  
  1895.  
  1896. graphics.library/InitArea                             graphics.library/InitArea
  1897.  
  1898.    NAME   
  1899.  
  1900.     InitArea -- Initialize vector collection matrix
  1901.  
  1902.    SYNOPSIS
  1903.  
  1904.        InitArea( areainfo, buffer, maxvectors )
  1905.             a0          a1      d0
  1906.  
  1907.     struct AreaInfo *areainfo;
  1908.     APTR buffer;
  1909.     SHORT maxvectors;
  1910.     
  1911.    FUNCTION
  1912.     This function provides initialization for the vector collection matrix
  1913.     such that it has a size of (max vectors ).  The size of the region
  1914.     pointed to by buffer (short pointer) should be five (5) times as large
  1915.     as maxvectors. This size is in bytes.  Areafills done by using AreaMove,
  1916.     AreaDraw, and AreaEnd must have enough space allocated in this table to
  1917.     store all the points of the largest fill. AreaEllipse takes up two
  1918.     vectors for every call. If AreaMove/Draw/Ellipse detect too many
  1919.     vectors going into the buffer they will return -1.
  1920.  
  1921.    INPUTS
  1922.     areainfo - pointer to AreaInfo structure
  1923.     buffer - pointer to chunk of memory to collect vertices
  1924.     maxvectors - max number of vectors this buffer can hold
  1925.  
  1926.    RESULT
  1927.     Pointers are set up to begin storage of vectors done by
  1928.     AreaMove, AreaDraw, and AreaEllipse.
  1929.  
  1930.    BUGS
  1931.  
  1932.    SEE ALSO
  1933.     AreaEnd AreaMove AreaDraw AreaEllipse graphics/rastport.h
  1934.  
  1935.  
  1936. graphics.library/InitBitMap                         graphics.library/InitBitMap
  1937.  
  1938.    NAME   
  1939.  
  1940.        InitBitMap -- Initialize bit map structure with input values.
  1941.  
  1942.    SYNOPSIS
  1943.     InitBitMap( bm, depth, width, height )
  1944.             a0   d0     d1      d2
  1945.  
  1946.     struct BitMap *bm;
  1947.     BYTE depth;
  1948.     SHORT width, height;
  1949.     
  1950.    FUNCTION
  1951.     Initialize various elements in the BitMap structure to
  1952.     correctly reflect depth, width, and height.
  1953.     Must be used before use of BitMap in other graphics calls.
  1954.     The Planes[8] are not initialized and need to be set up
  1955.     by the caller.  The Planes table was put at the end of the
  1956.     structure so that it may be truncated to conserve space,
  1957.     as well as extended. All routines that use BitMap should
  1958.     only depend on existence of depth number of bitplanes.
  1959.  
  1960.    INPUTS
  1961.     bm - pointer to a BitMap structure (gfx.h)
  1962.     depth - number of bitplanes that this bitmap will have
  1963.     width - number of bits (columns) wide for this BitMap
  1964.     height- number of bits (rows) tall for this BitMap
  1965.  
  1966.    BUGS
  1967.  
  1968.    SEE ALSO
  1969.     graphics/gfx.h
  1970.  
  1971.  
  1972. graphics.library/InitGels                             graphics.library/InitGels
  1973.     
  1974.     NAME
  1975.        InitGels -- initialize a gel list; must be called before using gels.
  1976.     
  1977.     SYNOPSIS
  1978.        InitGels(head, tail, GInfo)
  1979.                 a0    a1    a2
  1980.  
  1981.     struct VSprite *head, *tail;
  1982.     struct GelsInfo *GInfo;
  1983.      
  1984.     FUNCTION
  1985.        Assigns the VSprites as the head and tail of the gel list in GfxBase.
  1986.        Links these two gels together as the keystones of the list.
  1987.        If the collHandler vector points to some memory array, sets 
  1988.     the BORDERHIT vector to NULL.
  1989.     
  1990.     INPUTS
  1991.        head = pointer to the VSprite structure to be used as the gel list head
  1992.  
  1993.        tail = pointer to the VSprite structure to be used as the gel list tail
  1994.  
  1995.        GInfo = pointer to the GelsInfo structure to be initialized
  1996.     
  1997.     BUGS
  1998.     
  1999.     SEE ALSO
  2000.     graphics/gels.h   graphics/rastport.h
  2001.  
  2002. graphics.library/InitGMasks                         graphics.library/InitGMasks
  2003.     
  2004.     NAME
  2005.        InitGMasks -- Initialize all of the masks of an AnimOb.
  2006.     
  2007.     SYNOPSIS
  2008.        InitGMasks(anOb)
  2009.                    a0
  2010.     
  2011.     struct AnimOb *anOb;
  2012.  
  2013.     FUNCTION
  2014.        For every sequence of every component call InitMasks.
  2015.     
  2016.     INPUTS
  2017.        anOb = pointer to the AnimOb
  2018.     
  2019.     BUGS
  2020.     
  2021.     SEE ALSO
  2022.     InitMasks graphics/gels.h
  2023.        
  2024.  
  2025. graphics.library/InitMasks                           graphics.library/InitMasks
  2026.     
  2027.     NAME
  2028.        InitMasks -- Initialize the BorderLine and CollMask masks of a VSprite.
  2029.  
  2030.     
  2031.     SYNOPSIS
  2032.        InitMasks(vs)
  2033.                  a0
  2034.     
  2035.     struct VSprite *vs;
  2036.  
  2037.     FUNCTION
  2038.        Creates the appropriate BorderLine and CollMask masks of the VSprite.
  2039.        Correctly detects if the VSprite is actually a Bob definition, handles
  2040.        the image data accordingly.
  2041.     
  2042.     INPUTS
  2043.        vs = pointer to the VSprite structure
  2044.     
  2045.     BUGS
  2046.     
  2047.     SEE ALSO
  2048.        InitGels  graphics/gels.h 
  2049.  
  2050. graphics.library/InitRastPort                     graphics.library/InitRastPort
  2051.  
  2052.    NAME   
  2053.     InitRastPort -- Initialize raster port structure 
  2054.  
  2055.    SYNOPSIS
  2056.        InitRastPort( rp )
  2057.               a1
  2058.  
  2059.     struct RastPort *rp;
  2060.  
  2061.    FUNCTION
  2062.        Initialize  a RastPort structure to standard values.
  2063.        The struct Rastport describes a control  structure
  2064.        for a write-able raster.   The RastPort  structure
  2065.        describes  how a complete single playfield display
  2066.        will be written into. A  RastPort   structure   is
  2067.        referenced   whenever   any  drawing  or   filling
  2068.        operations  are  to be performed on a  section  of
  2069.        memory.
  2070.  
  2071.        The section of memory which is being used in  this
  2072.        way  may  or  may not be presently a part  of  the
  2073.        current actual onscreen display memory.   The name
  2074.        of  the actual memory section which is  linked  to
  2075.        the  RastPort is referred to here as a "raster" or
  2076.        as a bitmap.
  2077.  
  2078.        NOTE:    Calling   the   routine InitRastPort only
  2079.        establishes   various  defaults.    It  does   NOT
  2080.        establish  where,   in  memory,  the  rasters  are
  2081.        located. To do graphics with this RastPort the user
  2082.     must set up the BitMap pointer in the RastPort.
  2083.  
  2084.    INPUTS
  2085.     rp    = pointer to a RastPort structure.
  2086.  
  2087.    RESULT
  2088.     all entries in RastPort get zeroed out.
  2089.     exceptions:
  2090.         The following get -1:
  2091.             Mask,FgPen,AOLPen,LinePtrn
  2092.         DrawMode = JAM2
  2093.         The font is set to the standard system font
  2094.  
  2095.    BUGS
  2096.  
  2097.    SEE ALSO
  2098.        graphics/rastport.h
  2099.  
  2100.  
  2101. graphics.library/InitTmpRas                         graphics.library/InitTmpRas
  2102.  
  2103.    NAME
  2104.     InitTmpRas -- Initialize area of local memory for usage by
  2105.             areafill, floodfill, text.
  2106.  
  2107.    SYNOPSIS
  2108.        InitTmpRas(tmpras, buffer, size)
  2109.                       a0         a1     d0
  2110.  
  2111.     struct TmpRas *tmpras;
  2112.     APTR buffer;
  2113.     LONG size;
  2114.  
  2115.    FUNCTION
  2116.     The area of memory pointed to by buffer is set up to be used
  2117.     by RastPort routines that may need to get some memory for
  2118.     intermediate operations in preparation to putting the graphics
  2119.     into the final BitMap.
  2120.     Tmpras is used to control the usage of buffer.
  2121.  
  2122.    INPUTS
  2123.     tmpras - pointer to a TmpRas structure to be linked into
  2124.         a RastPort
  2125.     buffer - pointer to a contguous piece of chip memory.
  2126.     size - size in bytes of buffer
  2127.  
  2128.    RESULT
  2129.     makes buffer available for users of RastPort
  2130.  
  2131.    BUGS
  2132.     Would be nice if RastPorts could share one TmpRas.
  2133.  
  2134.    SEE ALSO
  2135.     AreaEnd Flood Text graphics/rastport.h
  2136.  
  2137.  
  2138. graphics.library/InitView                             graphics.library/InitView
  2139.  
  2140.    NAME   
  2141.    InitView - Initialize View structure.
  2142.  
  2143.    SYNOPSIS
  2144.     InitView( view )
  2145.            a1
  2146.  
  2147.     struct View *view;
  2148.  
  2149.    FUNCTION
  2150.     Initialize View structure to default values.
  2151.  
  2152.    INPUTS
  2153.     view - pointer to a View structure
  2154.  
  2155.    RESULT
  2156.     View structure set to all 0's. (1.0,1.1.1.2)
  2157.     Then values are put in DxOffset,DyOffset to properly position
  2158.     default display about .5 inches from top and left on monitor.
  2159.     InitView pays no attention to previous contents of view.
  2160.  
  2161.    BUGS
  2162.  
  2163.    SEE ALSO
  2164.      MakeVPort graphics/view.h
  2165.  
  2166.  
  2167. graphics.library/InitVPort                           graphics.library/InitVPort
  2168.  
  2169.    NAME   
  2170.     InitVPort - Initialize ViewPort structure.
  2171.  
  2172.    SYNOPSIS
  2173.     InitVPort( vp )
  2174.            a0
  2175.  
  2176.     struct ViewPort *vp;
  2177.  
  2178.    FUNCTION
  2179.     Initialize ViewPort structure to default values.
  2180.  
  2181.    INPUTS
  2182.     vp - pointer to a ViewPort structure
  2183.  
  2184.    RESULT
  2185.  
  2186.    BUGS
  2187.  
  2188.    SEE ALSO
  2189.     MakeVPort graphics/view.h
  2190.  
  2191.  
  2192. graphics.library/LoadRGB4                             graphics.library/LoadRGB4
  2193.  
  2194. NAME
  2195.     LoadRGB4 -- Load RGB color values from table.
  2196.  
  2197. SYNOPSIS
  2198.     LoadRGB4( vp, colors , count )
  2199.                  a0      a1     d0:16
  2200.  
  2201.     struct ViewPort *vp;
  2202.     UWORD colors[];
  2203.     SHORT count;
  2204.  
  2205. FUNCTION
  2206.        load the count words of the colormapper from table starting at
  2207.     entry 0.
  2208.  
  2209. INPUTS
  2210.     vp - pointer to ViewPort, whos colors you want to change
  2211.     colors - pointer to table of RGB values set up as an array
  2212.               of USHORTS
  2213.                 background--  0x0RGB
  2214.                 color1      --  0x0RGB
  2215.                 color2    --  0x0RGB
  2216.                  etc.         UWORD per value.
  2217.             The colors are interpreted as 15 = maximum intensity.
  2218.                    0 = minimum intensity.
  2219.     count    = number of UWORDs in the table to load into the
  2220.       colormap starting at color 0(background) and proceeding
  2221.       to the next higher color number
  2222.  
  2223. RESULTS
  2224.     The ViewPort should have a pointer to a valid ColorMap to store
  2225.     the colors in.
  2226.     Update the hardware copperlist to reflect the new colors.
  2227.     Update the intermediate copperlist with the new colors.
  2228.  
  2229. BUGS
  2230.  
  2231. SEE ALSO
  2232.     SetRGB4 GetRGB4 GetColorMap graphics/view.h
  2233.  
  2234.  
  2235. graphics.library/LoadView                             graphics.library/LoadView
  2236.  
  2237.    NAME
  2238.        LoadView -- Use a (possibly freshly created) coprocessor instruction
  2239.                    list to create the current display.
  2240.  
  2241.    SYNOPSIS
  2242.        LoadView( View )
  2243.                   A1
  2244.  
  2245.     struct View *View;
  2246.  
  2247.    FUNCTION
  2248.     Install a new view to be displayed during the next display
  2249.     refresh pass.
  2250.        Coprocessor instruction list has been created by
  2251.        InitVPort, MakeView, and MrgCop.
  2252.  
  2253.    INPUTS
  2254.        View - a pointer to the View structure which contains the
  2255.        pointer to the constructed coprocessor instructions list.
  2256.  
  2257.    RESULT
  2258.        The new View is displayed, according to your instructions.
  2259.     The vertical blank routine will pick this pointer up and
  2260.     direct the copper to start displaying this View.
  2261.  
  2262.    BUGS
  2263.  
  2264.    SEE ALSO
  2265.        InitVPort MakeVPort MrgCop intuition/RethinkDisplay graphics/view.h
  2266.  
  2267.  
  2268. graphics.library/LockLayerRom                     graphics.library/LockLayerRom
  2269.                            *
  2270.    NAME
  2271.     LockLayerRom -- Lock Layer structure by rom(gfx lib) code.
  2272.  
  2273.    SYNOPSIS
  2274.     LockLayerRom( layer )
  2275.                a5
  2276.  
  2277.     struct Layer *layer;
  2278.  
  2279.    FUNCTION
  2280.     Return when the layer is locked and no other task may
  2281.     alter the ClipRect structure in the Layer structure.
  2282.     This call does not destroy any registers.
  2283.     This call nests so that callers in this chain will not lock
  2284.     themselves out.
  2285.     Do not have the Layer locked during a call to intuition.
  2286.     There is a potential deadlock problem here, if intuition
  2287.     needs to get other locks as well.
  2288.     Having the layer locked prevents other tasks from using the
  2289.     layer library functions, most notably intuition itself. So
  2290.     be brief.
  2291.     layer.library's LockLayer is identical to LockLayerRom.
  2292.  
  2293.    INPUTS
  2294.     layer - pointer to Layer structure
  2295.  
  2296.    RESULTS
  2297.     The layer is locked and the task can render assuming the
  2298.     ClipRects will not change out from underneath it until
  2299.     an UnlockLayerRom is called.
  2300.  
  2301.    SEE ALSO
  2302.     UnlockLayerRom graphics/clip.h
  2303.  
  2304.  
  2305. graphics.library/MakeVPort                           graphics.library/MakeVPort
  2306.  
  2307.    NAME
  2308.     MakeVPort -- generate display copper list.
  2309.  
  2310.    SYNOPSIS
  2311.     MakeVPort( view, viewport )
  2312.                       a0         a1
  2313.  
  2314.     struct View *view;
  2315.     struct ViewPort *viewport;
  2316.  
  2317.    FUNCTION
  2318.     Use information in the View, ViewPort, ViewPort->RasInfo;
  2319.     construct intermediate copper list for this ViewPort.
  2320.  
  2321.    INPUTS
  2322.     view - pointer to View structure
  2323.     viewport - pointer to ViewPort structure
  2324.         The viewport must have valid pointer to a RasInfo.
  2325.  
  2326.    RESULTS
  2327.     constructs intermediate copper list and puts pointers in
  2328.     viewport.DspIns
  2329.     If the ColorMap ptr in ViewPort is NULL then it uses colors
  2330.     from the default color table.
  2331.     If DUALPF in Modes then there must be a second RasInfo pointed
  2332.     to by the first RasInfo
  2333.  
  2334.    BUGS
  2335.  
  2336.    SEE ALSO
  2337.     InitVPort MrgCop graphics/view.h
  2338.     Intuition's MakeScreen RemakeDisplay and RethinkDisplay
  2339.  
  2340.  
  2341. graphics.library/Move                                     graphics.library/Move
  2342.  
  2343.    NAME
  2344.     Move -- Move graphics pen position.
  2345.  
  2346.    SYNOPSIS
  2347.     Move( rp,   x,    y)
  2348.           a1  d0:16 d1:16
  2349.  
  2350.     struct RastPort *rp;
  2351.     SHORT x,y;
  2352.  
  2353.    FUNCTION
  2354.     Move graphics pen position to (x,y) relative to upper left (0,0)
  2355.     of RastPort.
  2356.     Note: Text uses the same position.
  2357.  
  2358.    INPUTS
  2359.     rp - pointer to a RastPort structure
  2360.     x,y - point in the RastPort
  2361.  
  2362.    RESULTS
  2363.  
  2364.    BUGS
  2365.  
  2366.    SEE ALSO
  2367.     Draw graphics/rastport.h
  2368.  
  2369.  
  2370. graphics.library/MoveSprite                         graphics.library/MoveSprite
  2371.  
  2372. NAME
  2373.        MoveSprite -- Move sprite to a point relative to top of viewport.
  2374.  
  2375. SYNOPSIS
  2376.        MoveSprite( vp, sprite, x, y )
  2377.             a0   a1    d0 d1
  2378.  
  2379.     struct ViewPort *vp;
  2380.     struct SimpleSprite *sprite;
  2381.     SHORT    x,y;
  2382.  
  2383. FUNCTION
  2384.     Move sprite image to new place on display.
  2385.  
  2386. INPUTS
  2387.     vp - pointer to ViewPort structure
  2388.          if vp = 0, sprite is positioned relative to View.
  2389.     sprite - pointer to SimpleSprite structure
  2390.     (x,y) - new position relative to top of viewport or view.
  2391.  
  2392. RESULTS
  2393.     Calculate the hardware information for the sprite and
  2394.     place it in the posctldata array. During next video display
  2395.     the sprite will appear in new position.
  2396.  
  2397. BUGS
  2398.     Sprites really appear one pixel to the left of the position you specify.
  2399.     This bug affects the apparent display position of the sprite on the screen,
  2400.    but does not affect the numeric position relative to the viewport or view.
  2401.  
  2402. SEE ALSO
  2403.        FreeSprite ChangeSprite GetSprite graphics/sprite.h
  2404.  
  2405.  
  2406. graphics.library/MrgCop                                 graphics.library/MrgCop
  2407.  
  2408.    NAME
  2409.        MrgCop -- Merge together coprocessor instructions.
  2410.  
  2411.    SYNOPSIS
  2412.        MrgCop( View )
  2413.                 A1
  2414.  
  2415.     struct View *View;
  2416.  
  2417.    FUNCTION
  2418.        Merge together the display, color, sprite and user coprocessor
  2419.        instructions into a single coprocessor instruction stream.  This
  2420.        essentially creates a per-display-frame program for the coprocessor.
  2421.        This function MrgCop is used, for example, by the graphics animation
  2422.        routines which effectively add information into an essentially
  2423.        static background display.  This changes some of the user
  2424.        or sprite instructions, but not those which have formed the
  2425.        basic display in the first place.  When all forms of coprocessor
  2426.        instructions are merged together, you will have a complete per-
  2427.        frame instruction list for the coprocessor.
  2428.  
  2429.        Restrictions:  Each of the coprocessor instruction lists MUST be
  2430.        internally sorted in min to max Y-X order.  The merge routines
  2431.        depend on this!
  2432.         Each list must be terminated using CEND(copperlist)
  2433.  
  2434.    INPUTS
  2435.        View - a pointer to the view structure whose coprocessor
  2436.               instructions are to be merged.
  2437.  
  2438.    RESULT
  2439.  
  2440.        The view structure will now contain a complete, sorted/merged
  2441.        list of instructions for the coprocessor, ready to be used by
  2442.        the display processor.  The display processor is told to use
  2443.        this new instruction stream through the instruction LoadView().
  2444.  
  2445.    BUGS
  2446.  
  2447.    SEE ALSO
  2448.        InitVPort MakeVPort LoadView graphics/view.h
  2449.         Intuition's RethinkDisplay
  2450.  
  2451.  
  2452. graphics.library/NewRegion                           graphics.library/NewRegion
  2453.  
  2454.    NAME 
  2455.        NewRegion -- Get a clear region.
  2456.  
  2457.    SYNOPSIS 
  2458.        region = NewRegion()
  2459.     d0
  2460.  
  2461.     struct Region *region;
  2462.  
  2463.    FUNCTION 
  2464.     Create a Region structure, initialize it to empty and return
  2465.     a pointer it.
  2466.  
  2467.    RESULTS
  2468.     region - pointer to initialized region. If it could not allocate
  2469.         required memory region = NULL.
  2470.  
  2471.    INPUTS 
  2472.     none
  2473.  
  2474.    BUGS 
  2475.  
  2476.    SEE ALSO
  2477.     graphics/regions.h
  2478.  
  2479.  
  2480. graphics.library/OpenFont                             graphics.library/OpenFont
  2481.  
  2482.    NAME
  2483.     OpenFont -- Get a pointer to a system font.
  2484.  
  2485.    SYNOPSIS
  2486.     font = OpenFont(textAttr)
  2487.     d0          a0
  2488.  
  2489.     struct TextFont *font;
  2490.     struct TextAttr *textAttr;
  2491.  
  2492.    FUNCTION
  2493.     This function searches the system font space for the graphics
  2494.     text font that best matches the attributes specified.  The
  2495.     pointer to the font returned can be used in subsequent
  2496.     SetFont and CloseFont calls.  It is important to match this
  2497.     call with a corresponding CloseFont call for effective
  2498.     management of ram fonts.
  2499.  
  2500.    INPUTS
  2501.     textAttr - a TextAttr structure that describes the text font
  2502.         attributes desired
  2503.  
  2504.    RESULTS
  2505.     font is zero if the desired font cannot be found.  If the named
  2506.     font is found, but the size and style specified are not
  2507.     available, a font with the nearest attributes is returned.
  2508.  
  2509.    BUGS
  2510.  
  2511.    SEE ALSO
  2512.     CloseFont SetFont diskfont.library/OpenDiskFont graphics/text.h
  2513.  
  2514.  
  2515. graphics.library/OrRectRegion                     graphics.library/OrRectRegion
  2516.  
  2517.    NAME 
  2518.        OrRectRegion -- Perform 2d OR operation of rectangle
  2519.                        with region, leaving result in region.
  2520.  
  2521.    SYNOPSIS 
  2522.        status = OrRectRegion(region,rectangle) 
  2523.          d0                    a0      a1 
  2524.  
  2525.     BOOL status
  2526.     struct Region *region;
  2527.     struct Rectangle *rectangle;
  2528.  
  2529.    FUNCTION 
  2530.        If any portion of rectangle is not in the region then add
  2531.        that portion to the region.
  2532.  
  2533.    INPUTS 
  2534.        region - pointer to Region structure
  2535.        rectangle - pointer to Rectangle structure 
  2536.  
  2537.    RESULTS
  2538.     status - return TRUE if successful operation
  2539.          return FALSE if ran out of memory
  2540.  
  2541.    BUGS 
  2542.  
  2543.    SEE ALSO
  2544.     AndRectRegion OrRegionRegion graphics/regions.h
  2545.  
  2546.  
  2547. graphics.library/OrRegionRegion                 graphics.library/OrRegionRegion
  2548.  
  2549.    NAME 
  2550.        OrRegionRegion -- Perform 2d OR operation of one region
  2551.                        with second region, leaving result in second region 
  2552.  
  2553.    SYNOPSIS 
  2554.        status = OrRegionRegion(region1,region2) 
  2555.          d0                       a0      a1 
  2556.  
  2557.     BOOL status;
  2558.     struct Region *region1, *region2;
  2559.  
  2560.    FUNCTION 
  2561.        If any portion of region1  is not in the region then add
  2562.        that portion to the region2
  2563.  
  2564.    INPUTS 
  2565.        region1 - pointer to Region structure
  2566.        region2 - pointer to Region structure
  2567.  
  2568.    RESULTS
  2569.     status - return TRUE if successful operation
  2570.          return FALSE if ran out of memory
  2571.  
  2572.    BUGS 
  2573.  
  2574.    SEE ALSO
  2575.      OrRectRegion graphics/regions.h
  2576.  
  2577.  
  2578. graphics.library/OwnBlitter                         graphics.library/OwnBlitter
  2579.  
  2580.    NAME
  2581.        OwnBlitter -- get the blitter for private usage
  2582.  
  2583.    SYNOPSIS
  2584.        OwnBlitter()
  2585.  
  2586.    FUNCTION
  2587.     If blitter is available return immediately with the blitter
  2588.     locked for your exclusive use. If the blitter is not available
  2589.     put task to sleep. It will be awakened as soon as the blitter
  2590.     is available. When the task first owns the blitter the blitter
  2591.     may still be finishing up a blit for the previous owner. You
  2592.     must do a WaitBlit before actually using the blitter registers.
  2593.  
  2594.     Calls to OwnBlitter() not nest. If a task that owns the
  2595.     blitter calls OwnBlitter() again, a lockup will result. 
  2596.     (Same situation if the task calls a system function
  2597.     that tries to own the blitter).
  2598.  
  2599.    INPUTS
  2600.     NONE
  2601.  
  2602.    RETURNS
  2603.  
  2604.    SEE ALSO
  2605.     DisownBlitter
  2606.  
  2607.  
  2608. graphics.library/PolyDraw                             graphics.library/PolyDraw
  2609.                                                                    *
  2610. NAME
  2611.     PolyDraw -- Draw lines from table of (x,y) values.
  2612.  
  2613. SYNOPSIS
  2614.     PolyDraw( rp, count , array )
  2615.           a1   d0      a0
  2616.  
  2617.     struct RastPort *rp;
  2618.     SHORT count;
  2619.     SHORT    array[];
  2620.  
  2621. FUNCTION
  2622.     starting with the first pair draw connected lines to
  2623.     it and every succeeding pair.
  2624.  
  2625. INPUTS
  2626.     rp - pointer to RastPort structure
  2627.     count -  number of points in array (x,y) pairs
  2628.     array - pointer to first (x,y) pair
  2629.  
  2630. BUGS
  2631.  
  2632. SEE ALSO
  2633.     Draw Move graphics/rastport.h
  2634.                                                                    *
  2635.  
  2636. graphics.library/QBlit                                   graphics.library/QBlit
  2637.  
  2638.    NAME
  2639.  
  2640.     QBlit -- Queue up a request for blitter usage
  2641.  
  2642.    SYNOPSIS
  2643.     QBlit( bp )
  2644.            a1
  2645.  
  2646.     struct bltnode *bp;
  2647.  
  2648.    FUNCTION
  2649.     Link a request for the use of the blitter to the end of the
  2650.        current blitter queue.  The pointer bp points to a blit structure
  2651.        containing, among other things, the link information, and the
  2652.        address of your routine which is to be called when the blitter
  2653.        queue finally gets around to this specific request.  When your
  2654.        routine is called, you are in control of the blitter ... it is
  2655.        not busy with anyone else's requests.  This means that you can
  2656.        directly specify the register contents and start the blitter.
  2657.        See the description of the blit structure and the uses of QBlit
  2658.        in the section titled Graphics Support in the OS Kernel Manual.
  2659.     Your code must be written to run either in supervisor or user
  2660.     mode on the 68000.
  2661.  
  2662.    INPUTS
  2663.     bp - pointer to a blit structure
  2664.  
  2665.    RESULT
  2666.     Your routine is called when the blitter is ready for you.
  2667.     In general requests for blitter usage through this channel are
  2668.     put in front of those who use the blitter via OwnBlitter and
  2669.     DisownBlitter. However for small blits there is more overhead
  2670.     using the queuer than Own/Disown Blitter.
  2671.  
  2672.    BUGS
  2673.  
  2674.    SEE ALSO
  2675.     QBSBlit hardware/blit.h
  2676.  
  2677.  
  2678. graphics.library/QBSBlit                               graphics.library/QBSBlit
  2679.  
  2680.    NAME
  2681.  
  2682.     QBSBlit -- Synchronize the blitter request with the video beam.
  2683.  
  2684.    SYNOPSIS
  2685.  
  2686.     QBSBlit( bsp )
  2687.          a1
  2688.  
  2689.     struct bltnode *bsp;
  2690.  
  2691.    FUNCTION
  2692.     Call a user routine for use of the blitter, enqueued separately from
  2693.        the QBlit queue.  Calls the user routine contained in the blit
  2694.        structure when the video beam is located at a specified position
  2695.        onscreen.   Useful when you are trying to blit into a visible part
  2696.        of the screen and wish to perform the data move while the beam is
  2697.        not trying to display that same area.  (prevents showning part of
  2698.        an old display and part of a new display simultaneously).  Blitter
  2699.        requests on the QBSBlit queue take precedence over those on the
  2700.        regular blitter queue. The beamposition is specified the blitnode.
  2701.  
  2702.    INPUTS
  2703.     bsp - pointer to a blit structure.  See description in the
  2704.              Graphics Support section of the manual for more info.
  2705.  
  2706.    RESULT
  2707.        User routine is called when the QBSBlit queue reaches this
  2708.        request AND the video beam is in the specified position.
  2709.     If there are lots of blits going on and the video beam
  2710.     has wrapped around back to the top it will call all the
  2711.     remaining bltnodes as fast as it can to try and catch up.
  2712.  
  2713.    BUGS
  2714.     Not very smart when getting blits from different tasks.
  2715.     They all get put in same queue so there are unfortunately
  2716.     some interdependencies with the beam syncing.
  2717.  
  2718.    SEE ALSO
  2719.     QBlit hardware/blit.h
  2720.  
  2721.  
  2722. graphics.library/ReadPixel                           graphics.library/ReadPixel
  2723.  
  2724.    NAME
  2725.        ReadPixel -- read the pen number value of the pixel at a
  2726.                     specified x,y location within a certain RastPort.
  2727.  
  2728.    SYNOPSIS
  2729.        penno = ReadPixel( rp,    x,    y )
  2730.          d0               a1  d0:16 d1:16
  2731.  
  2732.     LONG    penno;
  2733.     struct RastPort *rp;
  2734.     SHORT    x,y;
  2735.  
  2736.    FUNCTION
  2737.        Combine the bits from each of the bit-planes used to describe
  2738.        a particular RastPort into the pen number selector which that
  2739.        bit combination normally forms for the system hardware selection
  2740.        of pixel color.
  2741.  
  2742.    INPUTS
  2743.        rp -  pointer to a RastPort structure
  2744.        (x,y) a point in the RastPort
  2745.  
  2746.    RESULT
  2747.        Pen - (0..255) number at that position is returned.
  2748.         -1 is returned if cannot read that pixel
  2749.  
  2750.    BUGS
  2751.  
  2752.    SEE ALSO
  2753.        WritePixel    graphics/rastport.h
  2754.  
  2755.  
  2756. graphics.library/RectFill                             graphics.library/RectFill
  2757.  
  2758.    NAME
  2759.        RectFill -- Fill a defined rectangular area with
  2760.                the current drawing pen color, outline color,
  2761.                secondary color, and pattern.
  2762.  
  2763.    SYNOPSIS
  2764.         RectFill( rp, xmin, ymin, xmax, ymax)
  2765.                  a1  d0:16 d1:16 d2:16 d3:16
  2766.  
  2767.     struct RastPort *rp;
  2768.     SHORT xmin,ymin;
  2769.     SHORT xmax,ymax;
  2770.  
  2771.    FUNCTION
  2772.         Fill  the  rectangular  region  specified  by  the
  2773.         parameters  with the chosen pen  colors,  areafill
  2774.         pattern, and drawing mode. If no areafill pattern is
  2775.         specified, fill the rectangular region with the FgPen
  2776.         color, taking into account the drawing mode.
  2777.  
  2778.    INPUTS
  2779.         rp - pointer to a RastPort structure
  2780.         (xmin,ymin) (xmax,ymax) are the coordinates of the upper
  2781.         left corner and the lower right corner, respectively, of the
  2782.        rectangle.
  2783.         The following relation MUST be true:
  2784.         (xmax >= xmin) and (ymax >= ymin)  
  2785.  
  2786.    BUGS
  2787.         Complement mode with FgPen complements all bitplanes.
  2788.  
  2789.    SEE ALSO
  2790.     AreaEnd graphics/rastport.h
  2791.  
  2792.  
  2793. graphics.library/RemBob                                 graphics.library/RemBob
  2794.     
  2795.     NAME
  2796.        RemBob -- Remove a Bob from the gel list.
  2797.     
  2798.     SYNOPSIS
  2799.        RemBob(bob)
  2800.     
  2801.     struct Bob *bob;
  2802.  
  2803.     FUNCTION
  2804.        Marks a Bob as no-longer-required.  The gels internal code then
  2805.     removes the Bob from the list of active gels the next time 
  2806.     DrawGList is executed.   This is implemented as a macro.
  2807.     If the user is double-buffering the Bob, it could take two
  2808.     calls to DrawGList before the Bob actually disappears from
  2809.     the RastPort.
  2810.     
  2811.     INPUTS
  2812.        Bob = pointer to the Bob to be removed
  2813.     
  2814.     BUGS
  2815.     
  2816.     SEE ALSO
  2817.        RemIBob  DrawGList  graphics/gels.h  graphics/gfxmacros.h
  2818.  
  2819. graphics.library/RemFont                               graphics.library/RemFont
  2820.  
  2821.    NAME
  2822.     RemFont -- Remove a font from the system list.
  2823.  
  2824.    SYNOPSIS
  2825.     RemFont(textFont)
  2826.               a1
  2827.  
  2828.     struct TextFont *textFont;
  2829.  
  2830.    FUNCTION
  2831.     This function removes a font from the system, ensuring that
  2832.     access to it is restricted to those applications that
  2833.     currently have an active pointer to it: i.e. no new SetFont
  2834.     requests to this font are satisfied.
  2835.  
  2836.    INPUTS
  2837.     textFont - the TextFont structure to remove.
  2838.  
  2839.    BUGS
  2840.  
  2841.    SEE ALSO
  2842.     SetFont AddFont graphics/text.h
  2843.  
  2844.  
  2845. graphics.library/RemIBob                               graphics.library/RemIBob
  2846.     
  2847.     NAME
  2848.        RemIBob -- Immediately remove a Bob from the gel list and the RastPort.
  2849.  
  2850.     
  2851.     SYNOPSIS
  2852.        RemIBob(bob, rp, vp)
  2853.                a0   a1  a2
  2854.     
  2855.     struct Bob *bob;
  2856.     struct RastPort *rp;
  2857.     struct ViewPort *vp;
  2858.  
  2859.     FUNCTION
  2860.        Removes a Bob immediately by uncoupling it from the gel list and 
  2861.     erases it from the RastPort.
  2862.     
  2863.     INPUTS
  2864.        bob = pointer to the Bob to be removed
  2865.        rp = pointer to the RastPort if the Bob is to be erased
  2866.        vp = pointer to the ViewPort for beam-synchronizing
  2867.     
  2868.     BUGS
  2869.     
  2870.     SEE ALSO
  2871.        InitGels  RemVSprite  graphics/gels.h
  2872.  
  2873. graphics.library/RemVSprite                         graphics.library/RemVSprite
  2874.     
  2875.     NAME
  2876.        RemVSprite -- Remove a VSprite from the current gel list.
  2877.     
  2878.     SYNOPSIS
  2879.        RemVSprite(vs)
  2880.                   a0
  2881.      
  2882.     struct VSprite *vs;
  2883.  
  2884.     FUNCTION
  2885.        Unlinks the VSprite from the current gel list.
  2886.     
  2887.     INPUTS
  2888.        vs = pointer to the VSprite structure to be removed from the gel list
  2889.     
  2890.     BUGS
  2891.     
  2892.     SEE ALSO
  2893.        InitGels  RemIBob  graphics/gels.h
  2894.  
  2895. graphics.library/ScrollRaster                     graphics.library/ScrollRaster
  2896.  
  2897.    NAME
  2898.     ScrollRaster -- Push bits in rectangle in raster around by
  2899.             dx,dy towards 0,0 inside rectangle.
  2900.    SYNOPSIS
  2901.     ScrollRaster( rp, dx, dy, xmin, ymin, xmax, ymax)
  2902.               a1  d0  d1   d2    d3    d4    d5
  2903.  
  2904.     struct RastPort *rp;
  2905.     SHORT dx,dy;
  2906.     SHORT xmin,ymin;
  2907.     SHORT xmax,ymax;
  2908.  
  2909.    FUNCTION
  2910.     Move the bits in the raster by (dx,dy) towards (0,0)
  2911.     The space vacated is RectFilled with BGPen.
  2912.     Limit the scroll operation to the rectangle defined
  2913.     by (xmin,ymin)(xmax,ymax). Bits outside will not be
  2914.     affected. If xmax,ymax is outside the rastport then use
  2915.     the lower right corner of the rastport.
  2916.     If you are dealing with a SimpleRefresh layered RastPort you
  2917.     should check rp->Layer->Flags & LAYER_REFRESH to see if
  2918.     there is any damage in the damage list.  If there is you should
  2919.     call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
  2920.     routine sequence.
  2921.  
  2922.    INPUTS
  2923.        rp - pointer to a RastPort structure
  2924.        dx,dy are integers that may be postive, zero, or negative
  2925.     xmin,ymin - upper left of bounding rectangle
  2926.     xmax,ymax - lower right of bounding rectangle
  2927.  
  2928.    EXAMPLE
  2929.        ScrollRaster(rp,0,1)    /* shift raster up by one row */
  2930.        ScrollRaster(rp,-1,-1)  /* shift raster down and to the right by 1 pixel
  2931.  
  2932.    BUGS
  2933.     In 1.2/V1.3 if you ScrollRaster a SUPERBITMAP exactly left or right,
  2934.     and there is no TmpRas attached to the RastPort, the system will
  2935.     allocate one for you, but will never free it or record its location.
  2936.     The only workaround is to attach a valid TmpRas of size at least
  2937.     MAXBYTESPERROW to the RastPort before the call.
  2938.     
  2939.     ScrollRaster does not add the shifted areas into the damage list.
  2940.     This can cause difficulties for SIMPLE_REFRESH windows.
  2941.  
  2942.    SEE ALSO
  2943.     graphics/rastport.h
  2944.  
  2945.  
  2946. graphics.library/ScrollVPort                       graphics.library/ScrollVPort
  2947.  
  2948.    NAME
  2949.     ScrollVPort -- Reinterpret RasInfo information in ViewPort.
  2950.  
  2951.    SYNOPSIS
  2952.     ScrollVPort( vp )
  2953.              a0
  2954.  
  2955.     struct ViewPort *vp;
  2956.  
  2957.    FUNCTION
  2958.     After the programmer has adjusted the Offset values in
  2959.     the RasInfo structures of ViewPort, change the
  2960.     the copper lists to reflect the the Scroll positions.
  2961.     Changing the BitMap ptr in RasInfo and not changing the
  2962.     the Offsets will effect a double buffering affect.
  2963.  
  2964.    INPUTS
  2965.        vp - pointer to a ViewPort structure
  2966.         that is currently be displayed.
  2967.    RESULTS
  2968.     modifies hardware and intermediate copperlists to reflect
  2969.     new RasInfo
  2970.  
  2971.    BUGS
  2972.        pokes not fast enough to avoid some visible hashing of display
  2973.  
  2974.    SEE ALSO
  2975.     MakeVPort MrgCop LoadView  graphics/view.h
  2976.  
  2977.  
  2978. graphics.library/SetAPen                               graphics.library/SetAPen
  2979.  
  2980.    NAME   
  2981.     SetAPen -- Set primary pen
  2982.  
  2983.    SYNOPSIS
  2984.     SetAPen( rp, pen )
  2985.          a1  d0
  2986.  
  2987.     struct RastPort *rp;
  2988.     UBYTE pen;
  2989.  
  2990.    FUNCTION
  2991.     Set the primary drawing pen for lines, fills, and text.
  2992.  
  2993.    INPUTS
  2994.     rp - pointer to RastPort structure.
  2995.     pen - (0-255)
  2996.  
  2997.    RESULT
  2998.     Changes the minterms in the RastPort to reflect new primary pen.
  2999.     Set line drawer to restart pattern.
  3000.  
  3001.    BUGS
  3002.  
  3003. SEE ALSO
  3004.     SetBPen graphics/rastport.h
  3005.  
  3006.  
  3007. graphics.library/SetBPen                               graphics.library/SetBPen
  3008.  
  3009.    NAME   
  3010.     SetBPen -- Set secondary pen
  3011.  
  3012.    SYNOPSIS
  3013.     SetBPen( rp, pen )
  3014.          a1  d0
  3015.  
  3016.     struct RastPort *rp;
  3017.     UBYTE pen;
  3018.  
  3019.    FUNCTION
  3020.     Set the secondary drawing pen for lines, fills, and text.
  3021.  
  3022.    INPUTS
  3023.     rp - pointer to RastPort structure.
  3024.     pen - (0-255)
  3025.  
  3026.    RESULT
  3027.     Changes the minterms in the RastPort to reflect new secondary pen.
  3028.     Set line drawer to restart pattern.
  3029.  
  3030.    BUGS
  3031.  
  3032. SEE ALSO
  3033.     SetAPen graphics/rastport.h
  3034.  
  3035.  
  3036. graphics.library/SetCollision                     graphics.library/SetCollision
  3037.     
  3038.     NAME
  3039.        SetCollision -- Set a pointer to a user collision routine.
  3040.     
  3041.     SYNOPSIS
  3042.        SetCollision(num, routine, GInfo)
  3043.                     d0   a0       a1
  3044.     
  3045.     ULONG num;
  3046.     VOID (*routine)();
  3047.     struct GelsInfo *GInfo;
  3048.  
  3049.     FUNCTION
  3050.        Sets a specified entry (num) in the user's collision vectors table 
  3051.     equal to the address of the specified collision routine.
  3052.     
  3053.     INPUTS
  3054.        num = collision vector number
  3055.        routine = pointer to the user's collision routine
  3056.        GInfo = pointer to a GelsInfo structure
  3057.     
  3058.     BUGS
  3059.     
  3060.     SEE ALSO
  3061.        InitGels  graphics/gels.h  graphics/rastport.h
  3062.  
  3063. graphics.library/SetDrMd                               graphics.library/SetDrMd
  3064.  
  3065.    NAME   
  3066.      SetDrMd -- Set drawing mode
  3067.  
  3068.    SYNOPSIS
  3069.     SetDrMd( rp, mode )
  3070.          a1  d0:8
  3071.  
  3072.     struct RastPort *rp;
  3073.     UBYTE mode;
  3074.  
  3075.    FUNCTION
  3076.     Set the drawing mode for lines, fills and text.
  3077.     Get the bit definitions from rastport.h
  3078.  
  3079.    INPUTS
  3080.     rp - pointer to RastPort structure.
  3081.     mode - 0-255, some combinations may not make much sense.
  3082.  
  3083.    RESULT
  3084.     The mode set is dependant on the bits selected.
  3085.     Change minterms to reflect new drawing mode.
  3086.     Set line drawer to restart pattern.
  3087.  
  3088.    BUGS
  3089.  
  3090.    SEE ALSO
  3091.     SetAPen graphics/rastport.h
  3092.  
  3093.  
  3094. graphics.library/SetFont                               graphics.library/SetFont
  3095.  
  3096.    NAME
  3097.     SetFont -- Set the text font and attributes in a RastPort.
  3098.  
  3099.    SYNOPSIS
  3100.     SetFont(rp, font)
  3101.         a1   a0
  3102.  
  3103.     struct RastPort *rp;
  3104.     struct TextFont *font;
  3105.  
  3106.    FUNCTION
  3107.     This function sets the font in the RastPort to that described
  3108.     by font, and updates the text attributes to reflect that
  3109.     change.  If font is zero, this call leaves the RastPort
  3110.     with no font.  This function clears the effect of any previous
  3111.     soft styles.
  3112.  
  3113.    INPUTS
  3114.     rp - the RastPort in which the text attributes are to be changed
  3115.     font - pointer to a TextFont structure returned from OpenFont
  3116.         or OpenDiskFont
  3117.  
  3118.    BUGS
  3119.  
  3120.    SEE ALSO
  3121.     OpenFont diskfont.library/OpenDiskFont graphics/text.h
  3122.  
  3123.  
  3124. graphics.library/SetOPen                               graphics.library/SetOPen
  3125.  
  3126.    NAME
  3127.     SetOPen -- Change the Area OutLine pen and turn on Outline
  3128.             mode for areafills.
  3129.  
  3130.    SYNOPSIS
  3131.     SetOPen(rp, pen)
  3132.  
  3133.     struct RastPort *rp;
  3134.     UBYTE pen;
  3135.  
  3136.    FUNCTION
  3137.     This is implemented as a c-macro.
  3138.     Pen is the pen number that will be used to draw a border
  3139.     around an areafill during AreaEnd().
  3140.  
  3141.    INPUTS
  3142.     rp = pointer to RastPort structure
  3143.     pen = number  between 0-255
  3144.  
  3145.    BUGS
  3146.  
  3147.    SEE ALSO
  3148.     AreaEnd() graphics/gfxmacros.h graphics/rastport.h
  3149.  
  3150.  
  3151. graphics.library/SetRast                               graphics.library/SetRast
  3152.  
  3153.    NAME
  3154.        SetRast - Set an entire drawing area to a specified color.
  3155.  
  3156.    SYNOPSIS
  3157.        SetRast( rp, pen )
  3158.                 a1  d0
  3159.  
  3160.     struct RastPort *rp;
  3161.     UBYTE pen;
  3162.  
  3163.    FUNCTION
  3164.        Set the entire contents of the specified RastPort to the
  3165.        specified pen.
  3166.  
  3167.    INPUTS
  3168.        rp - pointer to RastPort structure
  3169.        pen - the pen number (0-255) to jam into bitmap
  3170.  
  3171.    RESULT
  3172.        The drawing area becomes the selected pen number.
  3173.  
  3174.    BUGS
  3175.  
  3176.    SEE ALSO
  3177.     RectFill graphics/rastport.h
  3178.  
  3179.  
  3180. graphics.library/SetRGB4                               graphics.library/SetRGB4
  3181.  
  3182.     NAME
  3183.        SetRGB4 -- Set one color register for this viewport.
  3184.  
  3185.     SYNOPSIS
  3186.        SetRGB4(  vp, n,   r,    g,    b)
  3187.                  a0  d0  d1:4  d2:4  d3:4
  3188.  
  3189.     struct ViewPort *vp;
  3190.     SHORT n;
  3191.     UBYTE r,g,b;
  3192.  
  3193.     FUNCTION
  3194.     Change the color look up table so that this viewport displays
  3195.     the color (r,g,b) for pen number n.
  3196.  
  3197.     INPUTS
  3198.     vp - pointer to  viewport structure
  3199.        n - the color number (range from 0 to 31)
  3200.        r - red level
  3201.        g - green level
  3202.        b - blue level
  3203.  
  3204.     RESULT
  3205.     If there is a ColorMap for this viewport store the value in
  3206.     in the structure ColorMap.
  3207.        The selected color register is changed to match your specs.
  3208.     If the color value is unused then nothing will happen.
  3209.  
  3210.     BUGS
  3211.  
  3212.     SEE ALSO
  3213.        LoadRGB4 GetRGB4 graphics/view.h
  3214.  
  3215. graphics.library/SetRGB4CM                           graphics.library/SetRGB4CM
  3216.  
  3217.    NAME
  3218.        SetRGB4CM -- Set one color register for this ColorMap.
  3219.  
  3220.    SYNOPSIS
  3221.        SetRGB4CM(  cm,  n,   r,    g,    b)
  3222.                    a0  d0  d1:4  d2:4  d3:4
  3223.  
  3224.        struct ColorMap *cm;
  3225.        SHORT n;
  3226.        UBYTE r,g,b;
  3227.  
  3228.    INPUTS
  3229.     cm = colormap
  3230.        n = the color number (range from 0 to 31)
  3231.        r = red level
  3232.        g = green level
  3233.        b = blue level
  3234.  
  3235.    RESULT
  3236.     Store the (r,g,b) triplet at index n of the ColorMap structure.
  3237.        This function can be used to set up a ColorMap before before
  3238.     linking it into a viewport.
  3239.  
  3240.    BUGS
  3241.  
  3242.    SEE ALSO
  3243.        GetColorMap GetRGB4 SetRGB4 graphics/view.h
  3244.  
  3245. graphics.library/SetSoftStyle                     graphics.library/SetSoftStyle
  3246.  
  3247.    NAME
  3248.     SetSoftStyle -- Set the soft style of the current font.
  3249.  
  3250.    SYNOPSIS
  3251.     newStyle = SetSoftStyle(rp, style, enable)
  3252.       d0            a1  d0        d1
  3253.  
  3254.     ULONG    newStyle;
  3255.     struct RastPort *rp;
  3256.     ULONG    style;
  3257.     ULONG    enable;
  3258.  
  3259.    FUNCTION
  3260.     This function alters the soft style of the current font.  Only
  3261.     those bits that are also set in enable are affected.  The
  3262.     resulting style is returned, since some style request changes
  3263.     will not be honored when the implicit style of the font
  3264.     precludes changing them.
  3265.  
  3266.    INPUTS
  3267.     rp - the RastPort from which the font and style    are extracted.
  3268.     style - the new font style to set, subject to enable.
  3269.     enable - those bits in style to be changed.  Any set bits here
  3270.         that would not be set as a result of AskSoftStyle will
  3271.         be ignored, and the newStyle result will not be as
  3272.         expected. 
  3273.  
  3274.    RESULTS
  3275.     newStyle - the resulting style, both as a result of previous
  3276.         soft style selection, the effect of this function, and
  3277.         the style inherent in the set font.
  3278.  
  3279.    BUGS
  3280.  
  3281.    SEE ALSO
  3282.     AskSoftStyle graphics/text.h
  3283.  
  3284.  
  3285. graphics.library/SortGList                           graphics.library/SortGList
  3286.     
  3287.     NAME
  3288.        SortGList -- Sort the current gel list, ordering its y,x coordinates.
  3289.     
  3290.     SYNOPSIS
  3291.        SortGList(rp)
  3292.                  a1
  3293.      
  3294.     FUNCTION
  3295.        Sorts the current gel list according to the gels' y,x coordinates.
  3296.        This sorting is essential before calls to DrawGList or DoCollision.
  3297.     
  3298.     INPUTS
  3299.        rp = pointer to the RastPort structure containing the GelsInfo
  3300.     
  3301.     BUGS
  3302.     
  3303.     SEE ALSO
  3304.        InitGels  DoCollision  DrawGList  graphics/rastport.h
  3305.  
  3306. graphics.library/SyncSBitMap                       graphics.library/SyncSBitMap
  3307.  
  3308.    NAME
  3309.        SyncSBitMap --    Syncronize Super BitMap with whatever is
  3310.             in the standard Layer bounds.
  3311.  
  3312.    SYNOPSIS
  3313.        SyncSBitMap( layer )
  3314.                       a0
  3315.  
  3316.     struct Layer *layer;
  3317.  
  3318.    FUNCTION
  3319.        Copy all bits from ClipRects in Layer into Super BitMap
  3320.     BitMap.  This is used for those functions that do not
  3321.     want to deal with the ClipRect structures but do want
  3322.     to be able to work with a SuperBitMap Layer.
  3323.  
  3324.    INPUTS
  3325.     layer - pointer to a Layer that has a SuperBitMap
  3326.         The Layer should already be locked by the caller.
  3327.  
  3328.    RESULT
  3329.     A bitmap that the programmer can now diddle with the bits.
  3330.     After diddling the programmer should call CopySBitMap to
  3331.     copy the bits back into the onscreen layer.
  3332.  
  3333.    BUGS
  3334.  
  3335.    SEE ALSO
  3336.     CopySBitMap graphics/clip.h
  3337.  
  3338.  
  3339. graphics.library/Text                                     graphics.library/Text
  3340.  
  3341.    NAME
  3342.     Text -- Write text characters (no formatting).
  3343.  
  3344.    SYNOPSIS
  3345.     Text(rp, string, count)
  3346.          a1      a0    d0-0:16
  3347.  
  3348.     struct    RastPort *rp;
  3349.     STRPTR    string;
  3350.     SHORT    count;
  3351.  
  3352.    FUNCTION
  3353.     This graphics function writes printable text characters to the
  3354.     specified RastPort at the current position.  No control meaning
  3355.     is applied to any of the characters, and only text on the
  3356.     current line is output.
  3357.     If the characters displayed run past the RastPort boundary,
  3358.     the current position is truncated to the boundary, and
  3359.     thus does not represent the true position.
  3360.  
  3361.    INPUTS
  3362.     rp - a pointer to the RastPort which describes where the
  3363.         text is to be output
  3364.     count - the string length.  If zero, there are no characters
  3365.         to be output. 
  3366.     string - the address of string to output
  3367.  
  3368.    BUGS
  3369.  
  3370.     The maximum string length (in pixels) is limited to (1024 - 16 = 1008)
  3371.         pixels wide.
  3372.  
  3373.     Text is clipped to the width of the rastport even if the Text() write
  3374.         was made starting to the left of the rastport.
  3375.  
  3376.    SEE ALSO
  3377.     Move TextLength graphics/text.h graphics/rastport.h
  3378.  
  3379.  
  3380. graphics.library/TextLength                         graphics.library/TextLength
  3381.  
  3382.    NAME
  3383.     TextLength -- Determine raster length of text data.
  3384.  
  3385.    SYNOPSIS
  3386.     length = TextLength(rp, string, count)
  3387.     d0:16            a1      a0    d0:16
  3388.  
  3389.     SHORT length;
  3390.     struct RastPort *rp;
  3391.     STRPTR string;
  3392.     SHORT count;
  3393.  
  3394.    FUNCTION
  3395.     This graphics function determines the length that text data 
  3396.     would occupy if output to the specified RastPort with the 
  3397.     current attributes.  The length is specified as the number of
  3398.     raster dots: to determine what the current position would be
  3399.     after a Write using this string, add the length to cp_x
  3400.     (cp_y is unchanged by Write).
  3401.  
  3402.    INPUTS
  3403.     rp - a pointer to the RastPort which describes where the
  3404.         text attributes reside.
  3405.     string - the address of string to determine the length of
  3406.     count - the string length.  If zero, there are no characters
  3407.         in the string.
  3408.  
  3409.    RESULTS
  3410.     length - the number of pixels in x this text would occupy, not 
  3411.         including any negative kerning that may take place at
  3412.         the beginning of the text string, nor taking into
  3413.         account the effects of any clipping that may take
  3414.         place.
  3415.  
  3416.    BUGS
  3417.     A length that would overflow single word arithmatic is not 
  3418.     calculated correctly.
  3419.  
  3420.    SEE ALSO
  3421.     Text graphics/text.h graphics/rastport.h
  3422.  
  3423.  
  3424. graphics.library/UnlockLayerRom                 graphics.library/UnlockLayerRom
  3425.                            *
  3426.    NAME
  3427.     UnlockLayerRom -- Unlock Layer structure by rom(gfx lib) code.
  3428.  
  3429.    SYNOPSIS
  3430.     UnlockLayerRom( layer )
  3431.              a5
  3432.  
  3433.    FUNCTION
  3434.     Release the lock on this layer. If the same task has called
  3435.     LockLayerRom more than once than the same number of calls to
  3436.     UnlockLayerRom must happen before the layer is actually freed
  3437.     so that other tasks may use it.
  3438.     This call does destroy scratch registers.
  3439.     This call is identical to UnlockLayer (layers.library).
  3440.  
  3441.    INPUTS
  3442.     layer - pointer to Layer structure
  3443.  
  3444.    BUGS
  3445.  
  3446.    SEE ALSO
  3447.     LockLayerRom graphics/clip.h
  3448.                                *   
  3449.  
  3450. graphics.library/VBeamPos                             graphics.library/VBeamPos
  3451.  
  3452.    NAME   
  3453.     VBeamPos -- Get vertical beam position at this instant.
  3454.  
  3455.    SYNOPSIS
  3456.     pos = VBeamPos()
  3457.      d0
  3458.  
  3459.     LONG pos;
  3460.  
  3461.    FUNCTION
  3462.     Get the vertical beam position from the hardware.
  3463.  
  3464.    INPUTS
  3465.     none
  3466.  
  3467.    RESULT
  3468.     interrogates hardware for beam position and returns value.
  3469.     valid results in the range of 0-511
  3470.     Because of multitasking, the actual value returned may have
  3471.     no use. If you are the highest priority task then the value
  3472.     returned should be close, within 1 line.
  3473.  
  3474.    BUGS
  3475.  
  3476.    SEE ALSO
  3477.  
  3478.  
  3479.  
  3480. graphics.library/WaitBlit                             graphics.library/WaitBlit
  3481.  
  3482.    NAME
  3483.        WaitBlit -- Wait for the blitter to be finished before proceeding
  3484.                    with anything else.
  3485.  
  3486.    SYNOPSIS
  3487.        WaitBlit()
  3488.  
  3489.    FUNCTION
  3490.     WaitBlit returns when the blitter is idle. This function should
  3491.     normally only be used when dealing with the blitter in a
  3492.     synchronous manner, such as when using OwnBlitter and DisownBlitter.
  3493.     WaitBlit does not wait for all blits queued up using QBlit or
  3494.     QBSBlit. You should call WaitBlit if you are just about to free
  3495.     some memory that you have used with the blitter.
  3496.  
  3497.     Note that many graphics calls fire up the blitter, and let it run.
  3498.     The CPU does not need to wait for the blitter to finish before returning.
  3499.     When examining bits with the CPU right after a blit, or when freeeing
  3500.     temorary memory used by the blitter, a WaitBlit() may be required.
  3501.  
  3502.    INPUTS
  3503.        none
  3504.  
  3505.    RESULT
  3506.     Your program waits until the blitter is finished.  Unlike most Amiga rom
  3507.     routines, the CPU registers D0/D1/A0 and A1 are preserved by this call.
  3508.  
  3509.    BUGS
  3510.     There is a bug in the older revisions of the Agnus chip that can
  3511.     cause the BUSY bit to indicate the blit has finished when the blitter
  3512.     has, in fact, not started the blit yet (even though BltSize has been
  3513.     written). This most often occurs in a heavily loaded systen with
  3514.     extended memory, HIRES, and 4 bitplanes.  WaitBlit currently tries to
  3515.     avoid the Agnus problem by testing the BUSY bit multiple times to make
  3516.     sure the blitter has started, there is no need for further action on the
  3517.     part of the WaitBlit user.  Also this pig busy waits. (sigh)
  3518.  
  3519.     The hardware bug was fixed as of the first "Fat Agnus" chip, as used
  3520.     in all A500 and A2000 computers.
  3521.  
  3522.    SEE ALSO
  3523.     OwnBlitter DisownBlitter hardware/blit.h
  3524.  
  3525.  
  3526. graphics.library/WaitBOVP                             graphics.library/WaitBOVP
  3527.                                                                    *
  3528.    NAME
  3529.     WaitBOVP -- Wait till vertical beam reached bottom of
  3530.             this viewport.
  3531.  
  3532.    SYNOPSIS
  3533.     WaitBOVP( vp )
  3534.           a0
  3535.  
  3536.    FUNCTION
  3537.     Returns when vertical beam reaches bottom of this viewport
  3538.  
  3539.    INPUTS
  3540.     vp - pointer to ViewPort structure
  3541.  
  3542.    RESULT
  3543.     This function will return sometime after the beam gets beyond
  3544.     the bottom of the viewport.  Depending on the multitasking load
  3545.     of the system, the actual beam position may be different than
  3546.     what would be expected in a lightly loaded system.
  3547.  
  3548.    BUGS
  3549.     Horrors! This function currently busy waits waiting for the
  3550.     beam to get to the right place.  It should use the copper
  3551.     interrupt to trigger and send signals like WaitTOF does.
  3552.  
  3553.    SEE ALSO
  3554.     WaitTOF VBeamPos
  3555.  
  3556.  
  3557. graphics.library/WaitTOF                               graphics.library/WaitTOF
  3558.  
  3559.    NAME
  3560.        WaitTOF -- Wait for the top of the next video frame.
  3561.  
  3562.    SYNOPSIS
  3563.        WaitTOF()
  3564.  
  3565.    FUNCTION
  3566.        Wait  for vertical blank to occur and all vertical blank
  3567.        interrupt routines to complete before returning to caller.
  3568.  
  3569.    INPUTS
  3570.        none
  3571.  
  3572.    RESULT
  3573.     Place this task on the TOF wait queue. When vertical blank
  3574.     interupt comes around the interrupt service routine fires off
  3575.     signals to all the tasks doing WaitTOF. The highest priority task
  3576.     ready gets to run then.
  3577.  
  3578.    BUGS
  3579.  
  3580.    SEE ALSO
  3581.     exec/Wait exec/Signal
  3582.  
  3583.  
  3584. graphics.library/WritePixel                         graphics.library/WritePixel
  3585.  
  3586.    NAME
  3587.        WritePixel -- Change the pen num of one specific pixel in a
  3588.                      specified RasterPort.
  3589.  
  3590.    SYNOPSIS
  3591.        error = WritePixel(  rp, x,  y)
  3592.          d0                 a1 D0  D1
  3593.  
  3594.     LONG error;
  3595.     struct RastPort *rp;
  3596.     SHORT x,y;
  3597.  
  3598.    FUNCTION
  3599.        Changes the pen number of the selected pixel in the specified
  3600.        RastPort to that currently specified by PenA, the primary
  3601.        drawing pen. Obey minterms in RastPort.
  3602.  
  3603.    INPUTS
  3604.        rp - a pointer to the RastPort structure
  3605.        (x,y) - point within the RastPort at which the selected
  3606.            pixel is located.
  3607.  
  3608.    RESULT
  3609.        error = 0 if pixel succesfully changed
  3610.           = -1 if (x,y) is outside the RastPort
  3611.  
  3612.    BUGS
  3613.  
  3614.    SEE ALSO
  3615.        ReadPixel graphics/rastport.h
  3616.  
  3617.  
  3618. graphics.library/XorRectRegion                   graphics.library/XorRectRegion
  3619.  
  3620.    NAME
  3621.        XorRectRegion -- Perform 2d XOR operation of rectangle
  3622.                        with region, leaving result in region
  3623.  
  3624.    SYNOPSIS
  3625.        status = XorRectRegion(region,rectangle)
  3626.          d0                     a0      a1
  3627.  
  3628.     BOOL status;
  3629.     struct Region *region;
  3630.     struct Rectangle *rectangle;
  3631.  
  3632.    FUNCTION
  3633.     Add portions of rectangle to region if they are not in
  3634.     the region.
  3635.     Remove portions of rectangle from region if they are
  3636.     in the region.
  3637.  
  3638.    INPUTS
  3639.        region - pointer to Region structure
  3640.        rectangle - pointer to Rectangle structure
  3641.  
  3642.    RESULTS
  3643.     status - return TRUE if successful operation
  3644.          return FALSE if ran out of memory
  3645.  
  3646.    BUGS
  3647.  
  3648.    SEE ALSO
  3649.     OrRegionRegion AndRegionRegion graphics/regions.h
  3650.  
  3651.  
  3652. graphics.library/XorRegionRegion               graphics.library/XorRegionRegion
  3653.  
  3654.    NAME 
  3655.        XorRegionRegion -- Perform 2d XOR operation of one region
  3656.                        with second region, leaving result in second region 
  3657.  
  3658.    SYNOPSIS 
  3659.        status = XorRegionRegion(region1,region2) 
  3660.          d0                        a0      a1 
  3661.  
  3662.     BOOL status;
  3663.     struct Region *region1, *region2;
  3664.  
  3665.    FUNCTION 
  3666.     Join the regions together. If any part of region1 overlaps
  3667.     region2 then remove that from the new region.
  3668.  
  3669.    INPUTS 
  3670.            region1      = pointer to Region structure
  3671.            region2      = pointer to Region structure
  3672.  
  3673.    RESULTS
  3674.     status - return TRUE if successful operation
  3675.          return FALSE if ran out of memory
  3676.  
  3677.    BUGS
  3678.  
  3679.