home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Assembler / TFF-AOC.DMS / in.adf / Release3.1 / AutoDocs3.1.lha / doc / graphics.doc < prev    next >
Encoding:
Text File  |  1993-08-12  |  182.5 KB  |  6,340 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/AllocBitMap
  8. graphics.library/AllocDBufInfo
  9. graphics.library/AllocRaster
  10. graphics.library/AllocSpriteDataA
  11. graphics.library/AndRectRegion
  12. graphics.library/AndRegionRegion
  13. graphics.library/Animate
  14. graphics.library/AreaCircle
  15. graphics.library/AreaDraw
  16. graphics.library/AreaEllipse
  17. graphics.library/AreaEnd
  18. graphics.library/AreaMove
  19. graphics.library/AskFont
  20. graphics.library/AskSoftStyle
  21. graphics.library/AttachPalExtra
  22. graphics.library/AttemptLockLayerRom
  23. graphics.library/BestModeIDA
  24. graphics.library/BitMapScale
  25. graphics.library/BltBitMap
  26. graphics.library/BltBitMapRastPort
  27. graphics.library/BltClear
  28. graphics.library/BltMaskBitMapRastPort
  29. graphics.library/BltPattern
  30. graphics.library/BltTemplate
  31. graphics.library/CalcIVG
  32. graphics.library/CBump
  33. graphics.library/CEND
  34. graphics.library/ChangeExtSpriteA
  35. graphics.library/ChangeSprite
  36. graphics.library/ChangeVPBitMap
  37. graphics.library/CINIT
  38. graphics.library/ClearEOL
  39. graphics.library/ClearRectRegion
  40. graphics.library/ClearRegion
  41. graphics.library/ClearScreen
  42. graphics.library/ClipBlit
  43. graphics.library/CloseFont
  44. graphics.library/CloseMonitor
  45. graphics.library/CMOVE
  46. graphics.library/CoerceMode
  47. graphics.library/CopySBitMap
  48. graphics.library/CWAIT
  49. graphics.library/DisownBlitter
  50. graphics.library/DisposeRegion
  51. graphics.library/DoCollision
  52. graphics.library/Draw
  53. graphics.library/DrawEllipse
  54. graphics.library/DrawGList
  55. graphics.library/EraseRect
  56. graphics.library/ExtendFont
  57. graphics.library/FindColor
  58. graphics.library/FindDisplayInfo
  59. graphics.library/Flood
  60. graphics.library/FontExtent
  61. graphics.library/FreeBitMap
  62. graphics.library/FreeColorMap
  63. graphics.library/FreeCopList
  64. graphics.library/FreeCprList
  65. graphics.library/FreeDBufInfo
  66. graphics.library/FreeGBuffers
  67. graphics.library/FreeRaster
  68. graphics.library/FreeSprite
  69. graphics.library/FreeSpriteData
  70. graphics.library/FreeVPortCopLists
  71. graphics.library/GetAPen
  72. graphics.library/GetBitMapAttr
  73. graphics.library/GetBPen
  74. graphics.library/GetColorMap
  75. graphics.library/GetDisplayInfoData
  76. graphics.library/GetDrMd
  77. graphics.library/GetExtSpriteA
  78. graphics.library/GetGBuffers
  79. graphics.library/GetOPen
  80. graphics.library/GetRGB32
  81. graphics.library/GetRGB4
  82. graphics.library/GetRPAttrA
  83. graphics.library/GetSprite
  84. graphics.library/GetVPModeID
  85. graphics.library/GfxAssociate
  86. graphics.library/GfxFree
  87. graphics.library/GfxLookUP
  88. graphics.library/GfxNew
  89. graphics.library/InitArea
  90. graphics.library/InitBitMap
  91. graphics.library/InitGels
  92. graphics.library/InitGMasks
  93. graphics.library/InitMasks
  94. graphics.library/InitRastPort
  95. graphics.library/InitTmpRas
  96. graphics.library/InitView
  97. graphics.library/InitVPort
  98. graphics.library/LoadRGB32
  99. graphics.library/LoadRGB4
  100. graphics.library/LoadView
  101. graphics.library/LockLayerRom
  102. graphics.library/MakeVPort
  103. graphics.library/ModeNotAvailable
  104. graphics.library/Move
  105. graphics.library/MoveSprite
  106. graphics.library/MrgCop
  107. graphics.library/NewRegion
  108. graphics.library/NextDisplayInfo
  109. graphics.library/ObtainBestPenA
  110. graphics.library/ObtainPen
  111. graphics.library/OpenFont
  112. graphics.library/OpenMonitor
  113. graphics.library/OrRectRegion
  114. graphics.library/OrRegionRegion
  115. graphics.library/OwnBlitter
  116. graphics.library/PolyDraw
  117. graphics.library/QBlit
  118. graphics.library/QBSBlit
  119. graphics.library/ReadPixel
  120. graphics.library/ReadPixelArray8
  121. graphics.library/ReadPixelLine8
  122. graphics.library/RectFill
  123. graphics.library/ReleasePen
  124. graphics.library/RemBob
  125. graphics.library/RemFont
  126. graphics.library/RemIBob
  127. graphics.library/RemVSprite
  128. graphics.library/ScalerDiv
  129. graphics.library/ScrollRaster
  130. graphics.library/ScrollRasterBF
  131. graphics.library/ScrollVPort
  132. graphics.library/SetABPenDrMd
  133. graphics.library/SetAPen
  134. graphics.library/SetBPen
  135. graphics.library/SetChipRev
  136. graphics.library/SetCollision
  137. graphics.library/SetDrMd
  138. graphics.library/SetFont
  139. graphics.library/SetMaxPen
  140. graphics.library/SetOPen
  141. graphics.library/SetOutlinePen
  142. graphics.library/SetRast
  143. graphics.library/SetRGB32
  144. graphics.library/SetRGB32CM
  145. graphics.library/SetRGB4
  146. graphics.library/SetRGB4CM
  147. graphics.library/SetRPAttrA
  148. graphics.library/SetSoftStyle
  149. graphics.library/SetWriteMask
  150. graphics.library/SortGList
  151. graphics.library/StripFont
  152. graphics.library/SyncSBitMap
  153. graphics.library/Text
  154. graphics.library/TextExtent
  155. graphics.library/TextFit
  156. graphics.library/TextLength
  157. graphics.library/UnlockLayerRom
  158. graphics.library/VBeamPos
  159. graphics.library/VideoControl
  160. graphics.library/WaitBlit
  161. graphics.library/WaitBOVP
  162. graphics.library/WaitTOF
  163. graphics.library/WriteChunkyPixels
  164. graphics.library/WritePixel
  165. graphics.library/WritePixelArray8
  166. graphics.library/WritePixelLine8
  167. graphics.library/XorRectRegion
  168. graphics.library/XorRegionRegion
  169. graphics.library/AddAnimOb                         graphics.library/AddAnimOb
  170.  
  171.    NAME
  172.     AddAnimOb  --  Add an AnimOb to the linked list of AnimObs.
  173.  
  174.    SYNOPSIS
  175.     AddAnimOb(anOb, anKey, rp)
  176.               A0    A1     A2
  177.  
  178.     void AddAnimOb(struct AnimOb *,struct AnimOb **, struct RastPort *);
  179.  
  180.    FUNCTION
  181.     Links this AnimOb into the current list pointed to by animKey.
  182.     Initializes all the Timers of the AnimOb's components.
  183.     Calls AddBob with each component's Bob.
  184.     rp->GelsInfo must point to an initialized GelsInfo structure.
  185.  
  186.    INPUTS
  187.     anOb  = pointer to the AnimOb structure to be added to the list
  188.     anKey = address of a pointer to the first AnimOb in the list
  189.             (anKey = NULL if there are no AnimObs in the list so far)
  190.     rp    = pointer to a valid RastPort
  191.  
  192.    RESULT
  193.  
  194.    BUGS
  195.  
  196.    SEE ALSO
  197.     Animate() graphics/rastport.h graphics/gels.h
  198. graphics.library/AddBob                               graphics.library/AddBob
  199.  
  200.    NAME
  201.     AddBob -- Adds a Bob to current gel list.
  202.  
  203.    SYNOPSIS
  204.     AddBob(Bob, rp)
  205.            A0   A1
  206.  
  207.     void AddBob(struct Bob *, struct RastPort *);
  208.  
  209.    FUNCTION
  210.     Sets up the system Bob flags, then links this gel into the list
  211.     via AddVSprite.
  212.  
  213.    INPUTS
  214.     Bob = pointer to the Bob structure to be added to the gel list
  215.     rp  = pointer to a RastPort structure
  216.  
  217.    RESULT
  218.  
  219.    BUGS
  220.  
  221.    SEE ALSO
  222.     InitGels()  AddVSprite()  graphics/gels.h  graphics/rastport.h
  223.  
  224. graphics.library/AddFont                             graphics.library/AddFont
  225.  
  226.    NAME
  227.     AddFont -- add a font to the system list
  228.  
  229.    SYNOPSIS
  230.     AddFont(textFont)
  231.             A1
  232.  
  233.     void AddFont(struct TextFont *);
  234.  
  235.    FUNCTION
  236.     This function adds the text font to the system, making it
  237.     available for use by any application.  The font added must be
  238.     in public memory, and remain until successfully removed.
  239.  
  240.    INPUTS
  241.     textFont - a TextFont structure in public ram.
  242.  
  243.    RESULT
  244.  
  245.    NOTES
  246.     This function will set the tf_Accessors to 0.
  247.  
  248.    BUGS
  249.  
  250.    SEE ALSO
  251.     SetFont()  RemFont()  graphics/text.h
  252.  
  253. graphics.library/AddVSprite                       graphics.library/AddVSprite
  254.  
  255.    NAME
  256.     AddVSprite -- Add a VSprite to the current gel list.
  257.  
  258.    SYNOPSIS
  259.     AddVSprite(vs, rp)
  260.                A0  A1
  261.  
  262.     void AddVSprite(struct VSprite *, struct RastPort *);
  263.  
  264.    FUNCTION
  265.     Sets up the system VSprite flags
  266.     Links this VSprite into the current gel list using its Y,X
  267.  
  268.    INPUTS
  269.     vs = pointer to the VSprite structure to be added to the gel list
  270.     rp = pointer to a RastPort structure
  271.  
  272.    RESULT
  273.  
  274.    BUGS
  275.  
  276.    SEE ALSO
  277.     InitGels()  graphics/rastport.h  graphics/gels.h
  278.  
  279. graphics.library/AllocBitMap                     graphics.library/AllocBitMap
  280.  
  281.    NAME
  282.     AllocBitMap -- Allocate a bitmap and attach bitplanes to it. (V39)
  283.  
  284.  
  285.    SYNOPSIS
  286.     bitmap=AllocBitMap(sizex,sizey,depth, flags, friend_bitmap)
  287.                        d0    d1    d2     d3       a0
  288.  
  289.     struct BitMap *AllocBitMap(ULONG,ULONG,ULONG,ULONG, struct BitMap *);
  290.  
  291.    FUNCTION
  292.     Allocates and initializes a bitmap structure. Allocates and initializes
  293.     bitplane data, and sets the bitmap's planes to point to it.
  294.  
  295.    INPUTS
  296.     sizex = the width (in pixels) desired for the bitmap data.
  297.  
  298.     sizey = the height (in pixels) desired.
  299.  
  300.     depth = the number of bitplanes deep for the allocation.
  301.         Pixels with AT LEAST this many bits will be allocated.
  302.  
  303.     flags = BMF_CLEAR to specify that the allocated raster should be
  304.             filled with color 0.
  305.  
  306.             BMF_DISPLAYABLE to specify that this bitmap data should
  307.             be allocated in such a manner that it can be displayed.
  308.             Displayable data has more severe alignment restrictions
  309.             than non-displayable data in some systems. 
  310.  
  311.             BMF_INTERLEAVED tells graphics that you would like your
  312.             bitmap to be allocated with one large chunk of display
  313.             memory for all bitplanes. This minimizes color flashing
  314.             on deep displays. If there is not enough contiguous RAM
  315.         for an interleaved bitmap, graphics.library will fall
  316.         back to a non-interleaved one.
  317.  
  318.             BMF_MINPLANES causes graphics to only allocate enough space
  319.             in the bitmap structure for "depth" plane pointers. This
  320.         is for system use and should not be used by applications use
  321.         as it is inefficient, and may waste memory.
  322.  
  323.     friend_bitmap = pointer to another bitmap, or NULL. If this pointer
  324.             is passed, then the bitmap data will be allocated in
  325.             the most efficient form for blitting to friend_bitmap.
  326.  
  327.    BUGS
  328.  
  329.    NOTES
  330.     When allocating using a friend bitmap, it is not safe to assume
  331.     anything about the structure of the bitmap data if that friend
  332.     BitMap might not be a standard amiga bitmap (for instance, if
  333.     the workbench is running on a non-amiga display device, its
  334.     Screen->RastPort->BitMap won't be in standard amiga format.
  335.     The only safe operations to perform on a non-standard BitMap are:
  336.  
  337.             - blitting it to another bitmap, which must be either a standard
  338.               Amiga bitmap, or a friend of this bitmap.
  339.  
  340.             - blitting from this bitmap to a friend bitmap or to a standard
  341.               Amiga bitmap.
  342.  
  343.             - attaching it to a rastport and making rendering calls. 
  344.  
  345.     Good arguments to pass for the friend_bitmap are your window's
  346.     RPort->BitMap, and your screen's RastPort->BitMap.
  347.     Do NOT pass &(screenptr->BitMap)!
  348.  
  349.     BitMaps not allocated with BMF_DISPLAYABLE may not be used as
  350.     Intuition Custom BitMaps or as RasInfo->BitMaps.  They may be blitted
  351.     to a BMF_DISPLAYABLE BitMap, using one of the BltBitMap() family of
  352.     functions.
  353.  
  354.    SEE ALSO
  355.     FreeBitMap()
  356.  
  357. graphics.library/AllocDBufInfo                 graphics.library/AllocDBufInfo
  358.  
  359.    NAME
  360.        AllocDBufInfo -- Allocate structure for multi-buffered animation (V39)
  361.  
  362.    SYNOPSIS
  363.        AllocDBufInfo(vp)
  364.               a0
  365.  
  366.     struct DBufInfo * AllocDBufInfo(struct ViewPort *)
  367.  
  368.    FUNCTION
  369.     Allocates a structure which is used by the ChangeVPBitMap()
  370.     routine.
  371.  
  372.    INPUTS
  373.        vp  =  A pointer to a ViewPort structure.
  374.  
  375.    BUGS
  376.  
  377.    NOTES
  378.     Returns 0 if there is no memory available or if the display mode
  379.     of the viewport does not support double-buffering.
  380.  
  381.     The only fields of the DBufInfo structure which can be used by application
  382.     programs are the dbi_SafeMessage, dbi_DispMessage, dbi_UserData1 and 
  383.     dbi_UserData2 fields.
  384.  
  385.     dbi_SafeMessage and dbi_DispMessage are standard exec message structures
  386.     which may be used for synchronizing your animation with the screen update.
  387.  
  388.     dbi_SafeMessage is a message which is replied to when it is safe to write to
  389.     the old BitMap (the one which was installed when you called ChangeVPBitMap).
  390.  
  391.     dbi_DispMessage is replied to when it is safe to call ChangeVPBitMap again
  392.     and be certain that the new frame has been seen at least once.
  393.  
  394.     The dbi_UserData1 and dbi_UserData2 fields, which are stored after each
  395.     message, are for your application to stuff any data into that it may need
  396.     to examine when looking at the reply coming into the ReplyPort for either
  397.     of the embedded Message structures.
  398.  
  399.     DBufInfo structures MUST be allocated with this function. The size of
  400.     the structure will grow in future releases. 
  401.  
  402.     The following fragment shows proper double buffering synchronization:
  403.  
  404.     int SafeToChange=TRUE, SafeToWrite=TRUE, CurBuffer=1;
  405.     struct MsgPort *ports[2];    /* reply ports for DispMessage and SafeMessage 
  406. */
  407.     struct BitMap *BmPtrs[2];
  408.     struct DBufInfo *myDBI;
  409.  
  410.     ... allocate bitmap pointers, DBufInfo, set up viewports, etc.
  411.  
  412.     myDBI->dbi_SafeMessage.mn_ReplyPort=ports[0];
  413.     myDBI->dbi_DispMessage.mn_ReplyPort=ports[1];
  414.     while (! done)
  415.     {
  416.         if (! SafeToWrite)
  417.         while(! GetMsg(ports[0])) Wait(1l<<(ports[0]->mp_SigBit));
  418.         SafeToWrite=TRUE;
  419.  
  420.         ... render to bitmap # CurBuffer.
  421.  
  422.         if (! SafeToChange)
  423.         while(! GetMsg(ports[1])) Wait(1l<<(ports[1]->mp_SigBit));
  424.         SafeToChange=TRUE;
  425.         WaitBlit();         /* be sure rendering has finished */
  426.         ChangeVPBitMap(vp,BmPtrs[CurBuffer],myDBI);
  427.         SafeToChange=FALSE;
  428.         SafeToWrite=FALSE;
  429.         CurBuffer ^=1;    /* toggle current buffer */
  430.     }
  431.        if (! SafeToChange)    /* cleanup pending messages */
  432.         while(! GetMsg(ports[1])) Wait(1l<<(ports[1]->mp_SigBit));
  433.        if (! SafeToWrite)    /* cleanup */
  434.         while(! GetMsg(ports[0])) Wait(1l<<(ports[0]->mp_SigBit));
  435.  
  436.    SEE ALSO
  437.     FreeDBufInfo() ChangeVPBitMap()
  438.  
  439. graphics.library/AllocRaster                     graphics.library/AllocRaster
  440.  
  441.    NAME
  442.     AllocRaster -- Allocate space for a bitplane.
  443.  
  444.    SYNOPSIS
  445.     planeptr = AllocRaster( width, height )
  446.        d0                    d0     d1
  447.  
  448.     PLANEPTR AllocRaster(ULONG,ULONG);
  449.  
  450.    FUNCTION
  451.     This function calls the memory allocation routines
  452.     to allocate memory space for a bitplane "width" bits
  453.     wide and "height" bits high.
  454.  
  455.    INPUTS
  456.     width    - number of columns in bitplane
  457.     height    - number of rows in bitplane
  458.  
  459.    RESULT
  460.     planeptr - pointer to first word in bitplane, or NULL if
  461.            it was not possible to allocate the desired
  462.            amount of memory.
  463.  
  464.    NOTES
  465.     In order to assure proper alignment of display memory, the
  466.     AllocBitMap() function should be used instead of AllocRaster
  467.     when you wish to allocate display memory (rasters which are
  468.     attached to a ViewPort or Screen).
  469.  
  470.    BUGS
  471.  
  472.    SEE ALSO
  473.     FreeRaster() graphics/gfx.h
  474.  
  475. graphics.library/AllocSpriteDataA           graphics.library/AllocSpriteDataA
  476.  
  477.    NAME
  478.     AllocSpriteDataA -- allocate sprite data and convert from a bitmap. (V39)
  479.     AllocSpriteData -- varargs stub for AllocSpriteData(). (V39)
  480.  
  481.    SYNOPSIS
  482.     SpritePtr | 0 = AllocSpriteDataA(bitmap,taglist)
  483.      d0                          a2      a1
  484.  
  485.     struct ExtSprite *AllocSpriteDataA( struct BitMap *, struct TagItem * );
  486.  
  487.     extsprite=AllocSpriteData(bitmap,tags,...TAG_END)
  488.  
  489.     FUNCTION
  490.     Allocate memory to hold a sprite image, and convert the passed-in
  491.     bitmap data to the appropriate format. The tags allow specification
  492.     of width, scaling, and other options.
  493.  
  494.    INPUTS
  495.     bitmap - ptr to a bitmap. This bitmap provides the source data for the
  496.         sprite image.
  497.  
  498.     tags -
  499.         SPRITEA_Width specifies how many pixels wide you desire
  500.         the sprite to be. Specifying a width wider than the hardware
  501.         can handle will cause the function to return failure. If the
  502.         bitmap passed in is narrower than the width asked for, then
  503.         it will be padded on the right with transparent pixels.
  504.         Defaults to 16.
  505.  
  506.         SPRITEA_XReplication controls the horizontal pixel replication factor
  507.         used when converting the bitmap data. Valid values are:
  508.             0 - perform a 1 to 1 conversion
  509.             1 - each pixel from the source is replicated twice
  510.                 in the output.
  511.             2 - each pixel is replicated 4 times.
  512.                -1 - skip every other pixel in the source bitmap
  513.                -2 - only include every fourth pixel from the source.
  514.  
  515.             This tag is useful for converting data from one resolution
  516.         to another. For instance, hi-res bitmap data can be correctly
  517.         converted for a lo-res sprite by using an x replication factor
  518.         of -1. Defaults to 0.
  519.  
  520.         SPRITEA_YReplication controls the vertical pixel replication factor
  521.         in the same manner as SPRITEA_XReplication controls the horizontal.
  522.  
  523.         SPRITEA_OutputHeight specifies how tall the resulting sprite
  524.         should be. Defaults to the bitmap height. The bitmap MUST be at
  525.         least as tall as the output height.
  526.  
  527.         SPRITEA_Attached tells the function that you wish to convert
  528.         the data for the second sprite in an attached sprite pair.
  529.         This will cause AllocSpriteData() to take its data from the
  530.         3rd and 4th bitplanes of the passed in bitmap.
  531.  
  532.  
  533.     Bitplane data is not required to be in chip ram for this function.
  534.  
  535.  
  536.    RESULTS
  537.     SpritePtr = a pointer to a ExtSprite structure, or 0 if there is
  538.     a failure. You should pass this pointer to FreeSpriteData() when finished
  539.     with the sprite.
  540.  
  541.    BUGS
  542.         Under V39, the appropriate attach bits would not be set in the sprite 
  543.     data.
  544.         The work-around is to set the bits manually. Bit 7 of the second
  545.     word should be set. On a 32 bit sprite, bit 7 of the 3rd word should 
  546.     also be set. For a 64 bit sprite, bit 7 of the 5th word should also be
  547.     set. This should NOT be done under V40, as the bug is fixed.
  548.  
  549.    SEE ALSO
  550.     FreeSpriteData() FreeSprite() ChangeSprite() MoveSprite() GetExtSpriteA()
  551.     AllocBitMap() graphics/sprite.h
  552.  
  553. graphics.library/AndRectRegion                 graphics.library/AndRectRegion
  554.  
  555.    NAME
  556.     AndRectRegion -- Perform 2d AND operation of rectangle
  557.              with region, leaving result in region.
  558.  
  559.    SYNOPSIS
  560.     AndRectRegion(region,rectangle)
  561.              a0    a1
  562.  
  563.     void AndRectRegion( struct Region *, struct Rectangle * );
  564.  
  565.    FUNCTION
  566.     Clip away any portion of the region that exists outside
  567.     of the rectangle. Leave the result in region.
  568.  
  569.    INPUTS
  570.     region - pointer to Region structure
  571.     rectangle - pointer to Rectangle structure
  572.  
  573.    NOTES
  574.     Unlike the other rect-region primitives, AndRectRegion() cannot
  575.     fail.
  576.  
  577.    BUGS
  578.  
  579.    SEE ALSO
  580.     AndRegionRegion() OrRectRegion() graphics/regions.h
  581.  
  582. graphics.library/AndRegionRegion             graphics.library/AndRegionRegion
  583.  
  584.    NAME 
  585.        AndRegionRegion -- Perform 2d AND operation of one region
  586.                        with second region, leaving result in second region.
  587.  
  588.    SYNOPSIS 
  589.        status = AndRegionRegion(region1,region2) 
  590.           d0                       a0      a1 
  591.  
  592.     BOOL AndregionRegion(struct Region *, struct Region * );
  593.  
  594.    FUNCTION 
  595.        Remove any portion of region2 that is not in region1.
  596.  
  597.    INPUTS 
  598.        region1 - pointer to Region structure
  599.        region2 - pointer to Region structure to use and for result
  600.  
  601.    RESULTS
  602.     status - return TRUE if successful operation
  603.          return FALSE if ran out of memory
  604.  
  605.    BUGS 
  606.  
  607.    SEE ALSO
  608.     OrRegionRegion() AndRectRegion() graphics/regions.h
  609.  
  610. graphics.library/Animate                             graphics.library/Animate
  611.  
  612.    NAME
  613.     Animate  --  Processes every AnimOb in the current animation list.
  614.  
  615.    SYNOPSIS
  616.     Animate(anKey, rp)
  617.             A0     A1
  618.  
  619.     void Animate(struct AnimOb **, struct RastPort *);
  620.  
  621.    FUNCTION
  622.     For every AnimOb in the list
  623.         - update its location and velocities
  624.         - call the AnimOb's special routine if one is supplied
  625.         - for each component of the AnimOb
  626.             - if this sequence times out, switch to the new one
  627.             - call this component's special routine if one is supplied
  628.             - set the sequence's VSprite's y,x coordinates based
  629.               on whatever these routines cause
  630.  
  631.    INPUTS
  632.     ankey = address of the variable that points to the head AnimOb
  633.     rp    = pointer to the RastPort structure
  634.  
  635.    RESULT
  636.  
  637.    BUGS
  638.  
  639.    SEE ALSO
  640.     AddAnimOb() graphics/gels.h graphics/rastport.h
  641.  
  642. graphics.library/AreaCircle                       graphics.library/AreaCircle
  643.  
  644.     NAME
  645.     AreaCircle -- add a circle to areainfo list for areafill.
  646.  
  647.  
  648.     SYNOPSIS
  649.     error = (int) AreaCircle( rp,  cx,  cy, radius)
  650.     D0              A1   D0   D1    D2
  651.  
  652.     ULONG AreaCircle(struct RastPort *, WORD, WORD, UWORD);
  653.  
  654.     FUNCTION
  655.     Add circle to the vector buffer. It will be drawn to the rastport when
  656.     AreaEnd is executed.
  657.  
  658.     INPUTS
  659.     rp     - pointer to a RastPort structure
  660.  
  661.     cx, cy   - the coordinates of the center of the desired circle.
  662.  
  663.     radius     - is the radius of the circle to draw around the centerpoint.
  664.  
  665.     RESULTS
  666.     0 if no error
  667.     -1 if no space left in vector list
  668.  
  669.     NOTES
  670.     This function is actually a macro which calls 
  671.         AreaEllipse(rp,cx,cy,radius,radius).
  672.  
  673.     SEE ALSO
  674.     AreaMove() AreaDraw() AreaCircle() InitArea() AreaEnd()
  675.     graphics/rastport.h graphics/gfxmacros.h
  676.  
  677. graphics.library/AreaDraw                           graphics.library/AreaDraw
  678.  
  679.    NAME
  680.     AreaDraw -- Add a point to a list of end points for areafill.
  681.  
  682.  
  683.    SYNOPSIS
  684.     error = AreaDraw( rp,  x,     y)
  685.       d0              A1 D0:16 D1:16
  686.  
  687.     ULONG AreaDraw( struct RastPort *, SHORT, SHORT);
  688.  
  689.    FUNCTION
  690.     Add point to the vector buffer.
  691.  
  692.  
  693.    INPUTS
  694.     rp    - points to a RastPort structure.
  695.     x,y    - are coordinates of a point in the raster.
  696.  
  697.    RESULT
  698.     error    - zero for success, else -1 if no there was no space
  699.           left in the vector list.
  700.  
  701.    BUGS
  702.  
  703.    SEE ALSO
  704.     AreaMove() InitArea() AreaEnd() graphics/rastport.h
  705.  
  706.  
  707. graphics.library/AreaEllipse                     graphics.library/AreaEllipse
  708.  
  709.     NAME
  710.     AreaEllipse -- add a ellipse to areainfo list for areafill.
  711.  
  712.  
  713.     SYNOPSIS
  714.     error = AreaEllipse( rp, cx,   cy,   a,    b    )
  715.     d0             a1  d0:16 d1:16 d2:16 d3:16
  716.  
  717.     LONG AreaEllipse( struct RastPort *, SHORT, SHORT, SHORT, SHORT)
  718.  
  719.     FUNCTION
  720.     Add an ellipse to the vector buffer. It will be draw when AreaEnd() is
  721.     called.
  722.  
  723.     INPUTS
  724.     rp - pointer to a RastPort structure
  725.     cx - x coordinate of the centerpoint relative to the rastport.
  726.     cy - y coordinate of the centerpoint relative to the rastport.
  727.     a  - the horizontal radius of the ellipse (note: a must be > 0)
  728.     b  - the vertical radius of the ellipse (note: b must be > 0)
  729.  
  730.     RESULT
  731.     error - zero for success, or -1 if there is no space left in the
  732.         vector list
  733.  
  734.     SEE ALSO
  735.     AreaMove() AreaDraw() AreaCircle() InitArea() AreaEnd()
  736.     graphics/rastport.h
  737.  
  738. graphics.library/AreaEnd                             graphics.library/AreaEnd
  739.  
  740.    NAME
  741.     AreaEnd -- Process table of vectors and ellipses and produce areafill.
  742.  
  743.  
  744.    SYNOPSIS
  745.     error = AreaEnd(rp)
  746.       d0              A1
  747.  
  748.     LONG AreaEnd( struct RastPort * );
  749.  
  750.    FUNCTION
  751.     Trigger the filling operation.
  752.     Process the vector buffer and generate required
  753.     fill into the raster planes. After the fill is complete, reinitialize
  754.     for the next AreaMove or AreaEllipse. Use the raster set up by
  755.     InitTmpRas when generating an areafill mask.
  756.  
  757.    RESULT
  758.     error - zero for success, or -1 if an error occurred anywhere.
  759.  
  760.    INPUTS
  761.     rp - pointer to a RastPort structure which specifies where the filled
  762.          regions will be rendered to.
  763.  
  764.    BUGS
  765.  
  766.    SEE ALSO
  767.     InitArea() AreaMove() AreaDraw() AreaEllipse()  InitTmpRas()
  768.     graphics/rastport.h
  769.  
  770. graphics.library/AreaMove                           graphics.library/AreaMove
  771.  
  772.    NAME
  773.     AreaMove -- Define a new starting point for a new
  774.                 shape in the vector list.
  775.  
  776.  
  777.    SYNOPSIS
  778.     error =  AreaMove( rp,   x,     y)
  779.      d0                a1  d0:16  d1:16
  780.  
  781.     LONG AreaMove( struct RastPort *, SHORT, SHORT );
  782.  
  783.    FUNCTION
  784.     Close  the last polygon and start another polygon
  785.     at  (x,y). Add the necessary  points  to  vector
  786.     buffer. Closing a polygon may result in the generation
  787.     of another AreaDraw() to close previous polygon.
  788.     Remember to have an initialized AreaInfo structure attached
  789.     to the RastPort.
  790.  
  791.    INPUTS
  792.     rp  - points to a RastPort structure
  793.     x,y - positions in the raster
  794.  
  795.    RETURNS
  796.     error - zero for success, or -1 if there is no space left in the
  797.     vector list
  798.  
  799.    BUGS
  800.  
  801.    SEE ALSO
  802.     InitArea() AreaDraw() AreaEllipse() AreaEnd() graphics/rastport.h
  803.  
  804.  
  805. graphics.library/AskFont                             graphics.library/AskFont
  806.  
  807.    NAME
  808.     AskFont -- get the text attributes of the current font
  809.  
  810.    SYNOPSIS
  811.     AskFont(rp, textAttr)
  812.             A1  A0
  813.  
  814.     void AskFont(struct RastPort *, struct TextAttr *);
  815.  
  816.    FUNCTION
  817.     This function fills the text attributes structure with the
  818.     attributes of the current font in the RastPort.
  819.  
  820.    INPUTS
  821.     rp       - the RastPort from which the text attributes are
  822.                extracted
  823.     textAttr - the TextAttr structure to be filled.  Note that
  824.                there is no support for a TTextAttr.
  825.  
  826.    RESULT
  827.     The textAttr structure is filled with the RastPort's text
  828.     attributes.
  829.  
  830.    BUGS
  831.  
  832.    SEE ALSO
  833.     graphics/text.h
  834.  
  835. graphics.library/AskSoftStyle                   graphics.library/AskSoftStyle
  836.  
  837.    NAME
  838.     AskSoftStyle -- Get the soft style bits of the current font.
  839.  
  840.    SYNOPSIS
  841.     enable = AskSoftStyle(rp)
  842.     D0                    A1
  843.  
  844.     ULONG AskSoftStyle(struct RastPort *);
  845.  
  846.    FUNCTION
  847.     This function returns those style bits of the current font
  848.     that are not intrinsic in the font itself, but
  849.     algorithmically generated.  These are the bits that are
  850.     valid to set in the enable mask for SetSoftStyle().
  851.  
  852.    INPUTS
  853.     rp - the RastPort from which the font and style    are extracted.
  854.  
  855.    RESULTS
  856.     enable - those bits in the style algorithmically generated.
  857.              Style bits that are not defined are also set.
  858.  
  859.    BUGS
  860.  
  861.    SEE ALSO
  862.     SetSoftStyle()  graphics/text.h
  863.  
  864. graphics.library/AttachPalExtra               graphics.library/AttachPalExtra
  865.  
  866.    NAME
  867.        AttachPalExtra -- Allocate and attach a palette sharing structure to a
  868.  
  869.                       colormap. (V39)
  870.  
  871.  
  872.    SYNOPSIS
  873.        status=AttachPalExtra( cm, vp)
  874.                            a0  a1
  875.  
  876.     LONG AttachPalExtra( Struct ColorMap *, struct ViewPort *);
  877.  
  878.    FUNCTION
  879.     Allocates and attaches a PalExtra structure to a ColorMap.
  880.     This is necessary for color palette sharing to work. The
  881.     PalExtra structure will be freed by FreeColorMap().
  882.     The set of available colors will be determined by the mode
  883.     and depth of the viewport.
  884.  
  885.    INPUTS
  886.     cm  =  A pointer to a color map created by GetColorMap().
  887.  
  888.     vp   = A pointer to the viewport structure associated with
  889.            the ColorMap.
  890.  
  891.    RESULTS
  892.     status - 0 if sucessful, else an error number. The only currently
  893.              defined error number is out of memory (1).
  894.  
  895.    BUGS
  896.  
  897.    NOTES
  898.     This function is for use with custom ViewPorts and custom ColorMaps,
  899.     as Intuition attaches a PalExtra to all of its Screens.
  900.     If there is already a PalExtra associated with the ColorMap, then
  901.     this function will do nothing.
  902.  
  903.    SEE ALSO
  904.     GetColorMap() FreeColorMap() ObtainPen() ObtainBestPenA()
  905.  
  906. graphics.library/AttemptLockLayerRom     graphics.library/AttemptLockLayerRom
  907.                            *
  908.    NAME
  909.     AttemptLockLayerRom -- Attempt to Lock Layer structure
  910.                      by ROM(gfx lib) code
  911.  
  912.    SYNOPSIS
  913.     gotit = AttemptLockLayerRom( layer )
  914.      d0                  a5
  915.  
  916.     BOOL AttempLockLayerRom( struct Layer * );
  917.  
  918.    FUNCTION
  919.     Query the current state of the lock on this Layer. If it is
  920.     already locked then return FALSE, could not lock. If the
  921.     Layer was not locked then lock it and return TRUE.
  922.     This call does not destroy any registers.
  923.     This call nests so that callers in this chain will not lock
  924.     themselves out.
  925.  
  926.    INPUTS
  927.     layer - pointer to Layer structure
  928.  
  929.    RESULT
  930.     gotit - TRUE or FALSE depending on whether the Layer was
  931.         successfully locked by the caller.
  932.  
  933.    SEE ALSO
  934.     LockLayerRom() UnlockLayerRom()
  935.  
  936. graphics.library/BestModeIDA                     graphics.library/BestModeIDA
  937.  
  938.    NAME
  939.     BestModeIDA -- calculate the best ModeID with given parameters (V39)
  940.     BestModeID  -- varargs stub for BestModeIDA()
  941.  
  942.    SYNOPSIS
  943.     ID = BestModeIDA(TagItems)
  944.     d0               a0
  945.  
  946.     ULONG BestModeIDA(struct TagItem *);
  947.  
  948.     ID = BestModeID(Tag1, ...)
  949.  
  950.     ULONG BestModeID(ULONG, ...);
  951.  
  952.    FUNCTION
  953.     To determine the best ModeID to fit the parameters set in the TagList.
  954.  
  955.    INPUTS
  956.     TagItems - A pointer to an array of TagItems.
  957.  
  958.    TAGS
  959.     BIDTAG_DIPFMustHave (ULONG) - Mask of DIPF_ flags
  960.            (from DisplayInfo->PropertyFlags) that the returned ModeID
  961.            must have.
  962.            Default - NULL
  963.  
  964.     BIDTAG_DIPFMustNotHave (ULONG) - Mask of DIPF_ flags that the
  965.            returned ModeID must not have.
  966.            Default - SPECIAL_FLAGS
  967.  
  968.     BIDTAG_ViewPort (struct ViewPort *) - ViewPort for which a best-fit
  969.            ModeID is sought.
  970.            Default - NULL
  971.  
  972.     BIDTAG_NominalWidth (UWORD),
  973.     BIDTAG_NominalHeight (UWORD) - together make the aspect ratio.
  974.            These values override the vp->DWidth and vp->DHeight values
  975.            in the given ViewPort.
  976.            Default - SourceID NominalDimensionInfo if BIDTAG_SourceID is
  977.            passed, or vp->DWidth and vp->DHeight if BIDTAG_ViewPort is 
  978.            passed, or 640 x 200.
  979.  
  980.     BIDTAG_DesiredWidth (UWORD),
  981.     BIDTAG_DesiredHeight (UWORD) - Used to distinguish between two
  982.            mode IDs with identical aspect ratios.
  983.            Default - same values as NominalWidth and NominalHeight.
  984.  
  985.     BIDTAG_Depth (UBYTE) - minimum the returned ModeID must support.
  986.            Default - vp->RasInfo->BitMap->Depth if BIDTAG_ViewPort is
  987.            passed, else 1.
  988.  
  989.     BIDTAG_MonitorID (ULONG) - returned ModeID must use this monitor.
  990.            Default - will not restrict the search to any particular monitor
  991.  
  992.     BIDTAG_SourceID (ULONG) - Use this ModeID instead of a ViewPort.
  993.            If specified, the DIPFMustHave mask is made up of the
  994.            ((DisplayInfo->PropertyFlags of this ID & SPECIAL_FLAGS) |
  995.             DIPFMustHave flags).
  996.            Default - VPModeID(vp) if BIDTAG_ViewPort was passed, else the 
  997.            DIPFMustHave and DIPFMustNotHave masks are left unchanged.
  998.  
  999.     BIDTAG_RedBits (UBYTE),
  1000.     BIDTAG_BlueBits (UBYTE),
  1001.     BIDTAG_Greenits (UBYTE) - Minimum bits per gun the resultant
  1002.            ModeID must support.
  1003.            Default - 4 bits per gun.
  1004.  
  1005.    RESULTS
  1006.     ID      - ID of the best mode to use, or INVALID_ID if a match could
  1007.               not be found.
  1008.  
  1009.    NOTES
  1010.     This function takes into account the Compatability of the Monitor
  1011.     being matched to, and the source ViewPort or ModeID.
  1012.     Incompatibilitys will cause a result of INVALID_ID.
  1013.  
  1014.     BIDTAG_NominalWidth, BIDTAG_NominalHeight, 
  1015.     BIDTAG_DesiredWidth, BIDTAG_DesiredHeight, must all be non-0.
  1016.  
  1017.     The comparisons are made against the DimensionInfo->Nominal values.
  1018.     ie, this will not return a best fit against overscan dimensions.
  1019.  
  1020.    EXAMPLE
  1021.     IFF Display Program with a HAM image, to be displayed in the same
  1022.     monitor type as the Workbench ViewPort.
  1023.  
  1024.     ID = BestModeID(BIDTAG_NominalWidth, IFFImage->Width,
  1025.                     BIDTAG_NominalHeight, IFFImage->Height,
  1026.                     BIDTAG_Depth, IFFImage->Depth,
  1027.                     BIDTAG_DIPFMustHave, DIPF_IS_HAM,
  1028.                     BIDTAG_MonitorID, (GetVPModeID(WbVP) & MONITOR_ID_MASK),
  1029.                     TAG_END);
  1030.  
  1031.     To make an interlace version of a ViewPort:
  1032.  
  1033.     ID = BestModeID(BIDTAG_ViewPort, ThisViewPort,
  1034.                     BIDTAG_MustHave, DIFP_IS_LACE,
  1035.                     TAG_END);
  1036.  
  1037.    SEE ALSO
  1038.     <graphics/modeid.h> <graphics/displayinfo.h>
  1039.  
  1040. graphics.library/BitMapScale                     graphics.library/BitMapScale
  1041.  
  1042.    NAME
  1043.     BitMapScale -- Perform raster scaling on a bit map. (V36)
  1044.  
  1045.    SYNOPSIS
  1046.     BitMapScale(bitScaleArgs)
  1047.                 A0
  1048.  
  1049.     void BitMapScale(struct BitScaleArgs *);
  1050.  
  1051.    FUNCTION
  1052.     Scale a source bit map to a non-overlapping destination
  1053.     bit map.
  1054.  
  1055.    INPUTS
  1056.     bitScaleArgs - structure of parameters describing scale:
  1057.         bsa_SrcX, bsa_SrcY - origin of the source bits.
  1058.         bsa_SrcWidth, bsa_SrcHeight - number of bits to scale from in x
  1059.         and y.
  1060.         bsa_DestX, bsa_DestY - origin of the destination.
  1061.         bsa_DestWidth, bsa_DestHeight - resulting number of bits in x
  1062.         and y.  NOTE: these values are set by this function.
  1063.         bsa_XSrcFactor:bsa_XDestFactor - equivalent to the ratio
  1064.             srcWidth:destWidth, but not necessarily the same
  1065.             numbers.  Each must be in the range 1..16383.
  1066.         bsa_YSrcFactor:bsa_YDestFactor - equivalent to the ratio
  1067.             srcHeight:destHeight, but not necessarily the same
  1068.             numbers.  Each must be in the range 1..16383.
  1069.         bsa_SrcBitMap - source of the bits to scale.
  1070.         bsa_DestBitMap - destination for the bits to scale.  This had
  1071.             better be big enough!
  1072.         bsa_Flags - future scaling options.  Set it to zero!
  1073.         bsa_XDDA, bsa_YDDA - for future use.  Need not be set by user.
  1074.         bsa_Reserved1, bsa_Reserved2 - for future use.  Need not be set.
  1075.  
  1076.    RESULT
  1077.     The destWidth, destHeight fields are set by this function as
  1078.     described above.
  1079.  
  1080.    NOTES
  1081.     o   This function may use the blitter.
  1082.     o   Overlapping source and destination bit maps are not
  1083.         supported.
  1084.     o   No check is made to ensure destBitMap is big enough: use
  1085.         ScalerDiv to calculate a destination dimension.
  1086.  
  1087.    BUGS
  1088.     o   This function does not use the HighRes Agnus 'Big Blit'
  1089.         facility. You should not use XSrcFactor == XDestFactor,
  1090.         where SrcWidth or DestWidth > 1024.
  1091.  
  1092.     o   Also, the blitter is used when expanding in the Y direction.
  1093.         You should not expand in the Y direction if
  1094.         ((DestX & 0xf) + DestWidth) >= 1024 pixels. (Up to 1008 pixels
  1095.         is always safe).
  1096.  
  1097.    SEE ALSO
  1098.     ScalerDiv()  graphics/scale.h
  1099.  
  1100. graphics.library/BltBitMap                         graphics.library/BltBitMap
  1101.  
  1102.    NAME
  1103.     BltBitMap -- Move a rectangular region of bits in a BitMap.
  1104.  
  1105.    SYNOPSIS
  1106.     planecnt = BltBitMap(SrcBitMap, SrcX, SrcY, DstBitMap,
  1107.     D0                   A0         D0:16 D1:16 A1
  1108.         DstX, DstY, SizeX, SizeY, Minterm, Mask [, TempA])
  1109.         D2:16 D3:16 D4:16  D5:16  D6:8     D7:8   [A2]
  1110.  
  1111.     ULONG BltBitMap(struct BitMap *, WORD, WORD, struct BitMap *,
  1112.         WORD, WORD, WORD, WORD, UBYTE, UBYTE, UWORD *);
  1113.  
  1114.    FUNCTION
  1115.     Perform non-destructive blits to move a rectangle from one
  1116.     area in a BitMap to another area, which can be on a different
  1117.     BitMap.
  1118.     This blit is assumed to be friendly: no error conditions (e.g.
  1119.     a rectangle outside the BitMap bounds) are tested or reported.
  1120.  
  1121.    INPUTS
  1122.     SrcBitMap, DstBitMap - the BitMap(s) containing the
  1123.           rectangles
  1124.         - the planes copied from the source to the destination are
  1125.           only those whose plane numbers are identical and less
  1126.           than the minimum Depth of either BitMap and whose Mask
  1127.           bit for that plane is non-zero.
  1128.         - as a special case, if a plane pointer in the SrcBitMap
  1129.           is zero, it acts as a pointer to a plane of all zeros, and
  1130.           if the plane pointer is 0xffffffff, it acts as a pointer
  1131.           to a plane of all ones.  (Note: new for V36)
  1132.         - SrcBitMap and DstBitMap can be identical if they point
  1133.           to actual planes.
  1134.     SrcX, SrcY - the x and y coordinates of the upper left corner
  1135.         of the source rectangle.  Valid range is positive
  1136.         signed integer such that the raster word's offset
  1137.         0..(32767-Size)
  1138.     DstX, DstY - the x and y coordinates of the upper left
  1139.         corner of the destination for the rectangle.  Valid
  1140.         range is as for Src.
  1141.     SizeX, SizeY - the size of the rectangle to be moved.  Valid
  1142.         range is (X: 1..976; Y: 1..1023 such that final raster
  1143.         word's offset is 0..32767)
  1144.     Minterm - the logic function to apply to the rectangle when
  1145.         A is non-zero (i.e. within the rectangle).  B is the
  1146.         source rectangle and C, D is the destination for the
  1147.         rectangle.
  1148.         - $0C0 is a vanilla copy
  1149.         - $030 inverts the source before the copy
  1150.         - $050 ignores the source and inverts the destination
  1151.         - see the hardware reference manual for other combinations
  1152.     Mask - the write mask to apply to this operation.  Bits set 
  1153.         indicate the corresponding planes (if not greater than
  1154.         the minimum plane count) are to participate in the
  1155.         operation.  Typically this is set to 0xff.
  1156.     TempA - If the copy overlaps exactly to the left or right
  1157.         (i.e. the scan line addresses overlap), and TempA is
  1158.         non-zero, it points to enough chip accessible memory
  1159.         to hold a line of A source for the blit (ie CHIP RAM).
  1160.         BltBitMap will allocate (and free) the needed TempA if
  1161.         none is provided and one is needed.  Blit overlap is
  1162.         determined from the relation of the first non-masked
  1163.         planes in the source and destination bit maps.
  1164.  
  1165.    RESULTS
  1166.     planecnt - the number of planes actually involved in the blit.
  1167.  
  1168.    NOTES
  1169.     o   This function may use the blitter.
  1170.  
  1171.    SEE ALSO
  1172.     ClipBlit()  graphics/gfx.h  hardware/blit.h
  1173.  
  1174. graphics.library/BltBitMapRastPort         graphics.library/BltBitMapRastPort
  1175.  
  1176.    NAME
  1177.     BltBitMapRastPort -- Blit from source bitmap to destination rastport.
  1178.  
  1179.    SYNOPSIS
  1180.     error = BltBitMapRastPort
  1181.             (srcbm, srcx, srcy, destrp, destX, destY, sizeX, sizeY, minterm)
  1182.      D0      A0     D0    D1    A1      D2     D3     D4     D5     D6
  1183.  
  1184.     BOOL BltBitMapRastPort
  1185.          (struct BitMap *, WORD, WORD, struct RastPort *, WORD, WORD,
  1186.           WORD, WORD, UBYTE);
  1187.  
  1188.    FUNCTION
  1189.     Blits from source bitmap to position specified in destination rastport
  1190.     using minterm.
  1191.  
  1192.    INPUTS
  1193.     srcbm   - a pointer to the source bitmap
  1194.     srcx    - x offset into source bitmap
  1195.     srcy    - y offset into source bitmap
  1196.     destrp  - a pointer to the destination rastport
  1197.     destX   - x offset into dest rastport
  1198.     destY   - y offset into dest rastport
  1199.     sizeX   - width of blit in pixels
  1200.     sizeY   - height of blit in rows 
  1201.     minterm - minterm to use for this blit
  1202.  
  1203.    RESULT
  1204.     TRUE
  1205.  
  1206.    BUGS
  1207.  
  1208.    SEE ALSO
  1209.     BltMaskBitMapRastPort() graphics/gfx.h graphics/rastport.h
  1210.  
  1211. graphics.library/BltClear                           graphics.library/BltClear
  1212.  
  1213.    NAME   
  1214.  
  1215.     BltClear - Clear a block of memory words to zero.
  1216.  
  1217.    SYNOPSIS
  1218.     BltClear( memBlock, bytecount, flags )
  1219.             a1         d0       d1
  1220.  
  1221.     void BltClear( void *, ULONG, ULONG );
  1222.  
  1223.    FUNCTION
  1224.     For memory that is local and blitter accessible, the most
  1225.     efficient way to clear a range of memory locations is
  1226.        to use the system's most efficient data mover, the blitter.
  1227.        This command accepts the starting location and count and clears
  1228.        that block to zeros.
  1229.  
  1230.    INPUTS
  1231.     memBloc    - pointer to local memory to be cleared
  1232.           memBlock is assumed to be even.
  1233.     flags    - set bit 0 to force function to wait until 
  1234.           the blit is done.
  1235.           set bit 1 to use row/bytesperrow.
  1236.  
  1237.     bytecount - if (flags & 2) == 0 then
  1238.                 even number of bytes to clear.
  1239.             else
  1240.                 low 16 bits is taken as number of bytes
  1241.                 per row and upper 16 bits taken as
  1242.                 number of rows.
  1243.  
  1244.     This function is somewhat hardware dependent. In the rows/bytesperrow
  1245.     mode (with the pre-ECS blitter) rows must be <- 1024. In bytecount mode 
  1246.     multiple runs of the blitter may be used to clear all the memory.
  1247.  
  1248.     Set bit 2 to use the upper 16 bits of the Flags as the data to fill 
  1249.     memory with instead of 0 (V36).
  1250.  
  1251.    RESULT
  1252.     The block of memory is initialized.
  1253.  
  1254.    BUGS
  1255.  
  1256.    SEE ALSO
  1257.  
  1258. graphics.library/BltMaskBitMapRastPort graphics.library/BltMaskBitMapRastPort
  1259.  
  1260.    NAME
  1261.     BltMaskBitMapRastPort -- blit from source bitmap to destination rastport
  1262.     with masking of source image.
  1263.  
  1264.    SYNOPSIS
  1265.     BltMaskBitMapRastPort
  1266.         (srcbm, srcx, srcy, destrp, destX, destY, sizeX, sizeY,
  1267.          A0     D0    D1    A1      D2     D3     D4     D5
  1268.          minterm, bltmask)
  1269.          D6       A2
  1270.  
  1271.     void BltMaskBitMapRastPort
  1272.          (struct BitMap *, WORD, WORD, struct RastPort *, WORD, WORD,
  1273.           WORD, WORD, UBYTE, APTR);
  1274.  
  1275.    FUNCTION
  1276.     Blits from source bitmap to position specified in destination rastport
  1277.     using bltmask to determine where source overlays destination, and
  1278.     minterm to determine whether to copy the source image "as is" or
  1279.     to "invert" the sense of the source image when copying. In either
  1280.     case, blit only occurs where the mask is non-zero.
  1281.  
  1282.    INPUTS
  1283.     srcbm   - a pointer to the source bitmap
  1284.     srcx    - x offset into source bitmap
  1285.     srcy    - y offset into source bitmap
  1286.     destrp  - a pointer to the destination rastport
  1287.     destX   - x offset into dest rastport
  1288.     destY   - y offset into dest rastport
  1289.     sizeX   - width of blit in pixels
  1290.     sizeY   - height of blit in rows 
  1291.     minterm - either (ABC|ABNC|ANBC) if copy source and blit thru mask
  1292.               or     (ANBC)          if invert source and blit thru mask
  1293.     bltmask - pointer to the single bit-plane mask, which must be the
  1294.               same size and dimensions as the planes of the
  1295.               source bitmap.
  1296.  
  1297.    RESULT
  1298.  
  1299.    BUGS
  1300.  
  1301.    SEE ALSO
  1302.     BltBitMapRastPort() graphics/gfx.h graphics/rastport.h
  1303.  
  1304. graphics.library/BltPattern                       graphics.library/BltPattern
  1305.  
  1306.    NAME
  1307.     BltPattern --  Using standard drawing rules for areafill,
  1308.                      blit through a mask.
  1309.  
  1310.    SYNOPSIS
  1311.        BltPattern(rp, mask, xl, yl, maxx, maxy, bytecnt)
  1312.                   a1,  a0   d0  d1   d2   d3     d4
  1313.  
  1314.     void BltPattern
  1315.        (struct RastPort *, void *, SHORT, SHORT, SHORT, SHORT, SHORT);
  1316.  
  1317.    FUNCTION
  1318.        Blit using drawmode,areafill pattern, and mask 
  1319.        at position rectangle (xl,yl) (maxx,maxy).
  1320.  
  1321.    INPUTS
  1322.        rp    -  points to the destination RastPort for the blit.
  1323.        mask  -  points to 2 dimensional mask if needed
  1324.                 if mask == NULL then use a rectangle.
  1325.        xl,yl -  coordinates of upper left of rectangular region in RastPort
  1326.        maxx,maxy - points to lower right of rectangular region in RastPort
  1327.        bytecnt - BytesPerRow for mask
  1328.  
  1329.    RESULT
  1330.  
  1331.    SEE ALSO
  1332.     AreaEnd
  1333.  
  1334. graphics.library/BltTemplate                     graphics.library/BltTemplate
  1335.  
  1336.    NAME
  1337.     BltTemplate -- Cookie cut a shape in a rectangle to the RastPort.
  1338.  
  1339.    SYNOPSIS
  1340.     BltTemplate(SrcTemplate, SrcX, SrcMod, rp,
  1341.                 A0           D0:16  D1:16  A1
  1342.         DstX,  DstY, SizeX, SizeY)
  1343.         D2:16  D3:16 D4:16  D5:16
  1344.  
  1345.     void BltTemplate(UWORD *, WORD, WORD, struct RastPort *,
  1346.          WORD, WORD, WORD, WORD);
  1347.  
  1348.    FUNCTION
  1349.     This function draws the image in the template into the
  1350.     RastPort in the current color and drawing mode at the
  1351.     specified position.  The template is assumed not to overlap
  1352.     the destination.
  1353.     If the template falls outside the RastPort boundary, it is
  1354.     truncated to that boundary.
  1355.  
  1356.     Note: the SrcTemplate pointer should point to the "nearest" word
  1357.        (rounded down) of the template mask. Fine alignment of the mask
  1358.        is achieved by setting the SrcX bit offseet within the range
  1359.        of 0 to 15 decimal.
  1360.  
  1361.    INPUTS
  1362.     SrcTemplate  - pointer to the first (nearest) word of the template mask.
  1363.     SrcX         - x bit offset into the template mask (range 0..15).
  1364.     SrcMod       - number of bytes per row in template mask.
  1365.     rp           - pointer to destination RastPort.
  1366.     DstX, DstY   - x and y coordinates of the upper left
  1367.                    corner of the destination for the blit.
  1368.     SizeX, SizeY - size of the rectangle to be used as the
  1369.                    template.
  1370.  
  1371.    NOTES
  1372.     o   This function may use the blitter.
  1373.  
  1374.    SEE ALSO
  1375.     BltBitMap()  graphics/rastport.h
  1376.  
  1377. graphics.library/CalcIVG                             graphics.library/CalcIVG
  1378.  
  1379.    NAME
  1380.     CalcIVG -- Calculate the number of blank lines above a ViewPort (V39)
  1381.  
  1382.    SYNOPSIS
  1383.     count = CalcIVG(View, ViewPort)
  1384.      d0.w           a0    a1
  1385.  
  1386.     UWORD CalcIVG(struct View *, struct ViewPort *);
  1387.  
  1388.    FUNCTION
  1389.     To calculate the maximum number of blank lines above a viewport needed to
  1390.     load all the copper instructions, after accounting for the viewport
  1391.     bandwidth and size.
  1392.  
  1393.    INPUTS
  1394.     View       - pointer to the View
  1395.     ViewPort   - pointer to the ViewPort you are interested in.
  1396.  
  1397.    RESULT
  1398.     count      - the number of ViewPort resolution scan lines needed to
  1399.                  execute all the copper instructions for ViewPort,
  1400.                  or 0 if any error. 
  1401.  
  1402.    NOTES
  1403.     The number of copper instructions comes from the vp->vp_DspIns list.
  1404.     Although there may be other copper instructions in the final list (from
  1405.     UCopIns, SprIns and ClrIns) they are currently ignored for this
  1406.     function. This also means that if the ViewPort has never been made
  1407.     (for example, the ViewPort of an intuition screen was opened behind)
  1408.     then vp->vp_DspIns is NULL.
  1409.  
  1410.     Although CalcIVG() returns the true number of lines needed by the
  1411.     copper, intuition still maintains an inter-screen gap of 3 non-laced
  1412.     lines (6 interlaced). Therefore, for intuition screens use:
  1413.     MAX(CalcIVG(v, vp), (islaced ? 6 : 3))
  1414.  
  1415.  
  1416.    SEE ALSO
  1417.     GfxNew()  VideoControl()  graphics/view.h
  1418.  
  1419. graphics.library/CBump                                 graphics.library/CBump
  1420.    NAME
  1421.     CBump -  increment user copper list pointer (bump to next position in list).
  1422.  
  1423.    SYNOPSIS
  1424.     CBump( c )
  1425.           a1
  1426.  
  1427.     void CBump( struct UCopList * );
  1428.  
  1429.    FUNCTION
  1430.     Increment pointer to space for next instruction in user copper list.
  1431.  
  1432.    INPUTS
  1433.     c - pointer to UCopList structure
  1434.  
  1435.    RESULTS
  1436.     User copper list pointer is incremented to next position.  
  1437.     Pointer is repositioned to next user copperlist instruction block 
  1438.     if the current block is full.
  1439.  
  1440.         Note: CBump is usually invoked for the programmer as part of the
  1441.               macro definitions CWAIT or CMOVE.
  1442.  
  1443.    BUGS
  1444.  
  1445.    SEE ALSO
  1446.     CINIT CWAIT CMOVE CEND graphics/copper.h
  1447. graphics.library/CEND                                   graphics.library/CEND
  1448.    NAME
  1449.     CEND -- Terminate user copper list.
  1450.  
  1451.    SYNOPSIS
  1452.     CEND( c )
  1453.  
  1454.     struct UCopList *c;
  1455.  
  1456.    FUNCTION
  1457.     Add instruction to terminate user copper list.
  1458.  
  1459.    INPUTS
  1460.     c - pointer to UCopList structure
  1461.  
  1462.    RESULTS
  1463.     This is actually a macro that calls the macro CWAIT(c,10000,255)
  1464.     10000 is a magical number that the graphics.library uses.
  1465.     I hope display technology doesn't catch up too fast!
  1466.  
  1467.    BUGS
  1468.  
  1469.    SEE ALSO
  1470.     CINIT CWAIT CMOVE graphics/copper.h
  1471. graphics.library/ChangeExtSpriteA           graphics.library/ChangeExtSpriteA
  1472.  
  1473.    NAME
  1474.        ChangeExtSpriteA -- Change the sprite image pointer. (V39)
  1475.  
  1476.    SYNOPSIS
  1477.        ChangeExtSpriteA( vp, oldsprite, newsprite, tags)
  1478.                            a0  a1        a2        a3
  1479.  
  1480.     success=ChangeExtSpriteA(struct ViewPort *, struct ExtSprite *,
  1481.             struct ExtSprite *, struct TagList *);
  1482.  
  1483.     success=ChangeExtSprite(vp,old_sp,new_sp,tag,....);
  1484.  
  1485.    FUNCTION 
  1486.     Attempt to change which sprite is displayed for a given
  1487.     sprite engine.
  1488.  
  1489.    INPUTS
  1490.        vp - pointer to ViewPort structure that this sprite is
  1491.           relative to,  or 0 if relative only top of View
  1492.     oldsprite - pointer the old ExtSprite structure
  1493.     newsprite - pointer to the new ExtSprite structure. 
  1494.  
  1495.    RESULTS 
  1496.      success - 0 if there was an error.
  1497.    BUGS 
  1498.  
  1499.    SEE ALSO
  1500.     FreeSprite() ChangeSprite() MoveSprite() AllocSpriteDataA()
  1501.     graphics/sprite.h
  1502.  
  1503. graphics.library/ChangeSprite                   graphics.library/ChangeSprite
  1504.  
  1505.    NAME
  1506.        ChangeSprite -- Change the sprite image pointer.
  1507.  
  1508.    SYNOPSIS
  1509.        ChangeSprite( vp, s, newdata)
  1510.                      a0  a1   a2
  1511.  
  1512.     void ChangeSprite(struct ViewPort *, struct SimpleSprite *, void * )
  1513.  
  1514.    FUNCTION 
  1515.     The sprite image is changed to use the data starting at newdata
  1516.  
  1517.    INPUTS
  1518.        vp - pointer to ViewPort structure that this sprite is
  1519.           relative to,  or 0 if relative only top of View
  1520.     s - pointer to SimpleSprite structure
  1521.     newdata    - pointer to data structure of the following form.
  1522.         struct spriteimage
  1523.         {
  1524.             UWORD    posctl[2];    /* used by simple sprite machine*/
  1525.             UWORD    data[height][2];   /* actual sprite image */
  1526.             UWORD    reserved[2];    /* initialized to */
  1527.                                          /*  0x0,0x0 */
  1528.         };
  1529.     The programmer must initialize reserved[2].  Spriteimage must be
  1530.     in CHIP memory. The height subfield of the SimpleSprite structure
  1531.     must be set to reflect the height of the new spriteimage BEFORE
  1532.     calling ChangeSprite(). The programmer may allocate two sprites to
  1533.     handle a single attached sprite.  After GetSprite(), ChangeSprite(),
  1534.     the programmer can set the SPRITE_ATTACHED bit in posctl[1] of the
  1535.     odd numbered sprite.
  1536.     If you need more than 8 sprites, look up VSprites in the
  1537.     graphics documentation.
  1538.  
  1539.    RESULTS 
  1540.  
  1541.    BUGS 
  1542.  
  1543.    SEE ALSO
  1544.     FreeSprite() ChangeSprite() MoveSprite() AddVSprite() graphics/sprite.h
  1545.  
  1546. graphics.library/ChangeVPBitMap               graphics.library/ChangeVPBitMap
  1547.  
  1548.    NAME
  1549.        ChangeVPBitMap -- change display memory address for multi-buffered
  1550.               animation (V39)
  1551.  
  1552.    SYNOPSIS
  1553.        ChangeVPBitMap(vp,bm,db)
  1554.                    a0 a1 a2
  1555.  
  1556.     void ChangeVPBitMap(struct ViewPort *, struct BitMap *, struct DBufInfo *);
  1557.  
  1558.    FUNCTION
  1559.     Changes the area of display memory which will be displayed in a
  1560.     viewport. This can be used to implement double (or triple)
  1561.     buffering, a method of achieving smooth animation.
  1562.  
  1563.    INPUTS
  1564.     vp  =  a pointer to a viewport
  1565.        bm  = a pointer to a BitMap structure. This BitMap structure must be
  1566.           of the same layout as the one attached to the viewport (same
  1567.           depth, alignment, and BytesPerRow).
  1568.     db  =  A pointer to a DBufInfo.
  1569.     
  1570.    BUGS
  1571.  
  1572.    NOTES
  1573.     This will set the vp->RasInfo->BitMap field to the bm pointer which is
  1574.     passed.
  1575.  
  1576.     When using the synchronization features, you MUST carefully insure that
  1577.     all messages have been replied to before calling FreeDBufInfo or
  1578.     calling ChangeVPBitMap with the same DBufInfo.
  1579.     
  1580.  
  1581.    SEE ALSO
  1582.     AllocDBufInfo() AllocBitMap()
  1583.  
  1584. graphics.library/CINIT                                 graphics.library/CINIT
  1585.  
  1586.    NAME
  1587.     CINIT -- Initialize user copperlist to accept intermediate 
  1588.          user copper instructions.
  1589.  
  1590.    SYNOPSIS
  1591.      cl = CINIT( ucl , n )
  1592.  
  1593.     cl = UCopperListInit( ucl , n )
  1594.                   a0    d0
  1595.  
  1596.     struct CopList *UCopperListInit( struct UCopList *, UWORD );
  1597.  
  1598.    FUNCTION
  1599.     Allocates and/or initialize copperlist structures/buffers
  1600.     internal to a UCopList structure.
  1601.  
  1602.     This is a macro that calls UCopListInit. You must pass a 
  1603.     (non-initialized) UCopList to CINIT (CINIT will NOT allocate 
  1604.     a new UCopList if ucl==0 ). If (ucl != 0) it will initialize the
  1605.     intermediate data buffers internal to a UCopList. 
  1606.  
  1607.     The maximum number of intermediate copper list instructions
  1608.     that these internal CopList data buffers contain is specified
  1609.     as the parameter n.
  1610.  
  1611.    INPUTS
  1612.     ucl - pointer to UCopList structure
  1613.     n - number of instructions buffer must be able to hold
  1614.  
  1615.    RESULTS
  1616.     cl- a pointer to a buffer which will accept n intermediate copper 
  1617.         instructions. 
  1618.  
  1619.     NOTE: this is NOT a UCopList pointer, rather a pointer to the 
  1620.           UCopList's->FirstCopList sub-structure.
  1621.         
  1622.    BUGS
  1623.     CINIT will not actually allocate a new UCopList if ucl==0.
  1624.     Instead you must allocate a block MEMF_PUBLIC|MEMF_CLEAR, the 
  1625.     sizeof(struct UCopList) and pass it to this function.  
  1626.  
  1627.     The system's FreeVPortCopLists function will take care of 
  1628.     deallocating it if they are called.
  1629.  
  1630.     Prior to release V36 the  CINIT macro had { } braces surrounding
  1631.     the definition, preventing the proper return of the result value.
  1632.     These braces have been removed for the V36 include definitions.
  1633.  
  1634.    SEE ALSO
  1635.      CINIT CMOVE CEND graphics/copper.h
  1636.  
  1637. graphics.library/ClearEOL                           graphics.library/ClearEOL
  1638.  
  1639.    NAME
  1640.     ClearEOL -- Clear from current position to end of line.
  1641.  
  1642.    SYNOPSIS
  1643.     ClearEOL(rp)
  1644.              A1
  1645.  
  1646.     void ClearEOL(struct RastPort *);
  1647.  
  1648.    FUNCTION
  1649.     Clear a rectangular swath from the current position to the
  1650.     right edge of the rastPort.  The height of the swath is taken
  1651.     from that of the current text font, and the vertical
  1652.     positioning of the swath is adjusted by the text baseline,
  1653.     such that text output at this position would lie wholly on
  1654.     this newly cleared area.
  1655.     Clearing consists of setting the color of the swath to zero,
  1656.     or, if the DrawMode is 2, to the BgPen.
  1657.  
  1658.    INPUTS
  1659.     rp - pointer to RastPort structure
  1660.  
  1661.    RESULT
  1662.  
  1663.    NOTES
  1664.     o   This function may use the blitter.
  1665.  
  1666.    SEE ALSO
  1667.     Text()  ClearScreen()  SetRast()
  1668.     graphics/text.h  graphics/rastport.h
  1669.  
  1670. graphics.library/ClearRectRegion             graphics.library/ClearRectRegion
  1671.  
  1672.    NAME
  1673.     ClearRectRegion -- Perform 2d CLEAR operation of rectangle
  1674.             with region, leaving result in region.
  1675.  
  1676.    SYNOPSIS
  1677.     status = ClearRectRegion(region,rectangle)
  1678.      d0                a0       a1
  1679.  
  1680.     BOOL ClearRectRegion(struct Region *, struct Rectangle * );
  1681.  
  1682.    FUNCTION
  1683.     Clip away any portion of the region that exists inside
  1684.     of the rectangle. Leave the result in region.
  1685.  
  1686.    INPUTS
  1687.     region - pointer to Region structure
  1688.     rectangle - pointer to Rectangle structure
  1689.  
  1690.    RESULTS
  1691.     status - return TRUE if successful operation
  1692.          return FALSE if ran out of memory
  1693.  
  1694.    BUGS
  1695.  
  1696.    SEE ALSO
  1697.     AndRectRegion() graphics/regions.h
  1698.  
  1699. graphics.library/ClearRegion                     graphics.library/ClearRegion
  1700.  
  1701.    NAME 
  1702.        ClearRegion -- Remove all rectangles from region.
  1703.  
  1704.    SYNOPSIS 
  1705.        ClearRegion(region)
  1706.                      a0
  1707.  
  1708.     viod ClearRegion( struct Region * );
  1709.  
  1710.    FUNCTION 
  1711.        Clip away all rectangles in the region leaving nothing.
  1712.  
  1713.    INPUTS 
  1714.        region - pointer to Region structure
  1715.  
  1716.    BUGS 
  1717.  
  1718.    SEE ALSO
  1719.     NewRegion() graphics/regions.h
  1720.  
  1721. graphics.library/ClearScreen                     graphics.library/ClearScreen
  1722.  
  1723.    NAME
  1724.     ClearScreen -- Clear from current position to end of RastPort.
  1725.  
  1726.    SYNOPSIS
  1727.     ClearScreen(rp)
  1728.                 A1
  1729.  
  1730.     void ClearScreen(struct RastPort *);
  1731.  
  1732.    FUNCTION
  1733.     Clear a rectangular swath from the current position to the
  1734.     right edge of the rastPort with ClearEOL, then clear the rest
  1735.     of the screen from just beneath the swath to the bottom of
  1736.     the rastPort.
  1737.     Clearing consists of setting the color of the swath to zero,
  1738.     or, if the DrawMode is 2, to the BgPen.
  1739.  
  1740.    INPUTS
  1741.     rp - pointer to RastPort structure
  1742.  
  1743.    NOTES
  1744.     o   This function may use the blitter.
  1745.  
  1746.    SEE ALSO
  1747.     ClearEOL()  Text()  SetRast()
  1748.     graphics/text.h  graphics/rastport.h
  1749.  
  1750. graphics.library/ClipBlit                           graphics.library/ClipBlit
  1751.  
  1752.    NAME
  1753.     ClipBlit  --  Calls BltBitMap() after accounting for windows
  1754.  
  1755.    SYNOPSIS
  1756.     ClipBlit(Src, SrcX, SrcY, Dest, DestX, DestY, XSize, YSize, Minterm)
  1757.              A0   D0    D1    A1    D2     D3     D4     D5     D6
  1758.  
  1759.     void ClipBlit
  1760.          (struct RastPort *, WORD, WORD, struct RastPort *, WORD, WORD,
  1761.           WORD, WORD, UBYTE);
  1762.  
  1763.    FUNCTION
  1764.     Performs the same function as BltBitMap(), except that it
  1765.     takes into account the Layers and ClipRects of the layer library,
  1766.     all of which are (and should be) transparent to you.  So, whereas
  1767.     BltBitMap() requires pointers to BitMaps, ClipBlit requires pointers to
  1768.     the RastPorts that contain the Bitmaps, Layers, etcetera.
  1769.  
  1770.     If you are going to blit blocks of data around via the RastPort of your
  1771.     Intuition Window, you must call this routine (rather than BltBitMap()).
  1772.  
  1773.     Either the Src RastPort, the Dest RastPort, both, or neither, can have
  1774.     Layers. This routine takes care of all cases.
  1775.  
  1776.     See BltBitMap() for a thorough explanation.
  1777.  
  1778.    INPUTS
  1779.     Src          = pointer to the RastPort of the source for your blit
  1780.     SrcX, SrcY   = the topleft offset into Src for your data
  1781.     Dest         = pointer to the RastPort to receive the blitted data
  1782.     DestX, DestY = the topleft offset into the destination RastPort
  1783.     XSize        = the width of the blit (must be ta least 1)
  1784.     YSize        = the height of the blit (must be at least 1)
  1785.     Minterm      = the boolean blitter function, where SRCB is associated
  1786.                    with the Src RastPort and SRCC goes to the Dest RastPort
  1787.  
  1788.    RESULT
  1789.  
  1790.    BUGS
  1791.  
  1792.    SEE ALSO
  1793.     BltBitMap();
  1794.  
  1795. graphics.library/CloseFont                         graphics.library/CloseFont
  1796.  
  1797.    NAME
  1798.     CloseFont -- Release a pointer to a system font.
  1799.  
  1800.    SYNOPSIS
  1801.     CloseFont(font)
  1802.               A1
  1803.  
  1804.     void CloseFont(struct TextFont *);
  1805.  
  1806.    FUNCTION
  1807.     This function indicates that the font specified is no longer
  1808.     in use.  It is used to close a font opened by OpenFont, so
  1809.     that fonts that are no longer in use do not consume system
  1810.     resources.
  1811.     
  1812.    INPUTS
  1813.     font -    a font pointer as returned by OpenFont() or OpenDiskFont()
  1814.  
  1815.    RESULT
  1816.  
  1817.    BUGS
  1818.  
  1819.    SEE ALSO
  1820.     OpenFont()  diskfont.library/OpenDiskFont  graphics/text.h
  1821.  
  1822. graphics.library/CloseMonitor                   graphics.library/CloseMonitor
  1823.  
  1824.    NAME
  1825.     CloseMonitor -- close a MonitorSpec (V36)
  1826.  
  1827.    SYNOPSIS
  1828.     error = CloseMonitor( monitor_spec )
  1829.     d0                    a0
  1830.  
  1831.     LONG CloseMonitor( struct MonitorSpec * );
  1832.  
  1833.    FUNCTION
  1834.     Relinquish access to a MonitorSpec.
  1835.  
  1836.    INPUTS
  1837.     monitor_spec - a pointer to a MonitorSpec opened via OpenMonitor(),
  1838.     or NULL.
  1839.  
  1840.    RESULTS
  1841.     error - FALSE if MonitorSpec closed uneventfully.
  1842.             TRUE if MonitorSpec could not be closed.
  1843.  
  1844.    BUGS
  1845.  
  1846.    SEE ALSO
  1847.     OpenMonitor()
  1848.  
  1849. graphics.library/CMOVE                                 graphics.library/CMOVE
  1850.  
  1851.    NAME
  1852.     CMOVE -- append copper move instruction to user copper list.
  1853.  
  1854.    SYNOPSIS
  1855.     CMOVE( c , a , v )
  1856.  
  1857.     CMove( c , a , v )
  1858.           a1  d0  d1
  1859.     CBump( c )
  1860.           a1
  1861.  
  1862.     void CMove( struct UCopList *, void *, WORD );
  1863.  
  1864.    FUNCTION
  1865.     Add instruction to move value v to hardware register a.
  1866.  
  1867.    INPUTS
  1868.     c - pointer to UCopList structure
  1869.     a - hardware register
  1870.     v - 16 bit value to be written
  1871.  
  1872.    RESULTS
  1873.     This is actually a macro that calls CMove(c,&a,v)
  1874.     and then calls CBump(c) to bump the local pointer
  1875.     to the next instruction. Watch out for macro side affects.
  1876.  
  1877.    BUGS
  1878.     
  1879.    SEE ALSO
  1880.     CINIT CWAIT CEND graphics/copper.h
  1881.  
  1882. graphics.library/CoerceMode                       graphics.library/CoerceMode
  1883.  
  1884.    NAME
  1885.     CoerceMode -- calculate ViewPort mode coercion (V39)
  1886.  
  1887.    SYNOPSIS
  1888.     ID = CoerceMode(RealViewPort, MonitorID, Flags);
  1889.     d0              a0            d0         d1
  1890.  
  1891.     ULONG CoerceMode(struct ViewPort *, ULONG, ULONG);
  1892.  
  1893.    FUNCTION
  1894.     To determine the best mode in the MonitorID to coerce RealViewPort to,
  1895.     given the restrictions set in Flags.
  1896.  
  1897.    INPUTS
  1898.     RealViewPort - ViewPort to coerce
  1899.     MonitorID    - Montor number to coerce to (ie a mode masked with
  1900.                    MONITOR_ID_MASK).
  1901.     Flags        - PRESERVE_COLORS - keep the number of bitplanes
  1902.                    in the ViewPort.
  1903.                    AVOID_FLICKER - do not coerce to an interlace mode
  1904.  
  1905.    RESULTS
  1906.     ID      - ID of the best mode to coerce to, or INVALID_ID if could not
  1907.               coerce (see NOTES).
  1908.  
  1909.    NOTES
  1910.     This function takes into account the compatibility of the Monitor
  1911.     being coerced to, and the ViewPort that is being coerced.
  1912.     Incompatibilities will cause a result of INVALID_ID.
  1913.  
  1914.    EXAMPLE
  1915.     newmode = CoerceMode(vp, VGA_MONITOR_ID, PRESERVE_COLORS);
  1916.  
  1917.    SEE ALSO
  1918.     <graphics/coerce.h> <graphics/displayinfo.h>
  1919.  
  1920. graphics.library/CopySBitMap                     graphics.library/CopySBitMap
  1921.  
  1922.    NAME
  1923.        CopySBitMap --    Syncronize Layer window with contents of
  1924.                         Super BitMap
  1925.  
  1926.    SYNOPSIS
  1927.        CopySBitMap( layer )
  1928.                      a0
  1929.  
  1930.     void CopySBitMap(struct Layer *);
  1931.  
  1932.    FUNCTION
  1933.     This is the inverse of SyncSBitMap.
  1934.        Copy all bits from SuperBitMap to Layer bounds.
  1935.     This is used for those functions that do not
  1936.     want to deal with the ClipRect structures but do want
  1937.     to be able to work with a SuperBitMap Layer.
  1938.  
  1939.    INPUTS
  1940.     layer - pointer to a SuperBitMap Layer
  1941.         The Layer must already be locked by the caller.
  1942.  
  1943.    BUGS
  1944.  
  1945.    SEE ALSO
  1946.     LockLayerRom() SyncSBitMap()
  1947.  
  1948. graphics.library/CWAIT                                 graphics.library/CWAIT
  1949.  
  1950.    NAME
  1951.     CWAIT -- Append copper wait instruction to user copper list.
  1952.  
  1953.    SYNOPSIS
  1954.     CWAIT( c , v , h )
  1955.  
  1956.     CWait( c , v , h )
  1957.            a1  d0  d1
  1958.     CBump( c )
  1959.           a1
  1960.  
  1961.     void CWait( struct UCopList *, WORD, WORD)
  1962.  
  1963.    FUNCTION
  1964.     Add instruction to wait for vertical beam position v and
  1965.     horizontal position h to this intermediate copper list.
  1966.  
  1967.    INPUTS
  1968.     c - pointer to UCopList structure
  1969.     v - vertical beam position (relative to top of viewport)
  1970.     h - horizontal beam position
  1971.  
  1972.    RESULTS
  1973.     this is actually a macro that calls CWait(c,v,h)
  1974.     and then calls CBump(c) to bump the local pointer
  1975.     to the next instruction.
  1976.  
  1977.    BUGS
  1978.     User waiting for horizontal values of greater than 222 decimal 
  1979.     is illegal.
  1980.  
  1981.    SEE ALSO
  1982.      CINIT CMOVE CEND graphics/copper.h
  1983.  
  1984. graphics.library/DisownBlitter                 graphics.library/DisownBlitter
  1985.  
  1986.    NAME
  1987.        DisownBlitter -- return blitter to free state.
  1988.  
  1989.  
  1990.    SYNOPSIS
  1991.        DisownBlitter()
  1992.  
  1993.     void DisownBlitter( void );
  1994.  
  1995.    FUNCTION
  1996.     Free blitter up for use by other blitter users.
  1997.  
  1998.    INPUTS
  1999.  
  2000.    RETURNS
  2001.  
  2002.    SEE ALSO
  2003.        OwnBlitter()
  2004.  
  2005.  
  2006. graphics.library/DisposeRegion                 graphics.library/DisposeRegion
  2007.  
  2008.    NAME
  2009.        DisposeRegion -- Return all space for this region to free
  2010.              memory pool.
  2011.  
  2012.    SYNOPSIS
  2013.        DisposeRegion(region)
  2014.                       a0 
  2015.  
  2016.     void DisposeRegion( struct Region * );
  2017.  
  2018.    FUNCTION
  2019.        Free all RegionRectangles for this Region then
  2020.     free the Region itself.
  2021.  
  2022.    INPUTS
  2023.        region - pointer to Region structure
  2024.  
  2025.    BUGS
  2026.  
  2027.    SEE ALSO
  2028.     NewRegion() graphics/regions.h
  2029.  
  2030. graphics.library/DoCollision                     graphics.library/DoCollision
  2031.  
  2032.    NAME
  2033.     DoCollision -- Test every gel in gel list for collisions.
  2034.  
  2035.    SYNOPSIS
  2036.     DoCollision(rp)
  2037.                 A1
  2038.  
  2039.     void DoCollision(struct RastPort *);
  2040.  
  2041.    FUNCTION
  2042.     Tests each gel in gel list for boundary and gel-to-gel collisions.
  2043.     On detecting one of these collisions, the appropriate collision-
  2044.     handling routine is called. See the documentation for a thorough
  2045.     description of which collision routine is called. This routine
  2046.     expects to find the gel list correctly sorted in Y,X order.
  2047.     The system routine SortGList performs this function for the user.
  2048.  
  2049.    INPUTS
  2050.     rp = pointer to a RastPort
  2051.  
  2052.    RESULT
  2053.  
  2054.    BUGS
  2055.  
  2056.    SEE ALSO
  2057.     InitGels()  SortGList()  graphics/gels.h  graphics/gels.h
  2058.  
  2059. graphics.library/Draw                                   graphics.library/Draw
  2060.  
  2061.    NAME
  2062.        Draw -- Draw a line between the current pen position
  2063.                        and the new x,y position.
  2064.  
  2065.    SYNOPSIS
  2066.        Draw( rp,   x,     y)
  2067.              a1  d0:16  d1:16
  2068.  
  2069.     void Draw( struct RastPort *, SHORT, SHORT);
  2070.  
  2071.    FUNCTION
  2072.        Draw a line from the current pen position to (x,y).
  2073.  
  2074.    INPUTS
  2075.  
  2076.     rp - pointer to the destination RastPort
  2077.     x,y - coordinates of where in the RastPort to end the line.
  2078.  
  2079.    BUGS
  2080.  
  2081.    SEE ALSO
  2082.     Move() graphics/rastport.h
  2083.  
  2084. graphics.library/DrawEllipse                     graphics.library/DrawEllipse
  2085.  
  2086.     NAME
  2087.     DrawEllipse -- Draw an ellipse centered at cx,cy with vertical
  2088.        and horizontal radii of a,b respectively.
  2089.  
  2090.     SYNOPSIS
  2091.     DrawEllipse( rp, cx, cy, a, b )
  2092.              a1  d0  d1  d2 d3 
  2093.  
  2094.     void DrawEllipse( struct RastPort *, SHORT, SHORT, SHORT, SHORT);
  2095.  
  2096.     FUNCTION
  2097.        Creates an elliptical outline within the rectangular region
  2098.     specified by the parameters, using the current foreground pen color.
  2099.  
  2100.     INPUTS
  2101.     rp - pointer to the RastPort into which the ellipse will be drawn.
  2102.     cx - x coordinate of the centerpoint relative to the rastport.
  2103.     cy - y coordinate of the centerpoint relative to the rastport.
  2104.     a - the horizontal radius of the ellipse (note: a must be > 0)
  2105.     b - the vertical radius of the ellipse (note: b must be > 0)
  2106.  
  2107.     BUGS
  2108.  
  2109.     NOTES
  2110.     this routine does not clip the ellipse to a non-layered rastport.
  2111.  
  2112.     SEE ALSO
  2113.     DrawCircle(), graphics/rastport.h
  2114.  
  2115. graphics.library/DrawGList                         graphics.library/DrawGList
  2116.  
  2117.    NAME
  2118.     DrawGList -- Process the gel list, queueing VSprites, drawing Bobs.
  2119.  
  2120.    SYNOPSIS
  2121.     DrawGList(rp, vp)
  2122.               A1  A0
  2123.  
  2124.     void DrawGList(struct RastPort *, struct ViewPort *);
  2125.  
  2126.    FUNCTION
  2127.     Performs one pass of the current gel list.
  2128.        - If nextLine and lastColor are defined, these are
  2129.          initialized for each gel.
  2130.           - If it's a VSprite, build it into the copper list.
  2131.           - If it's a Bob, draw it into the current raster.
  2132.           - Copy the save values into the "old" variables,
  2133.          double-buffering if required.
  2134.  
  2135.    INPUTS
  2136.     rp = pointer to the RastPort where Bobs will be drawn
  2137.     vp = pointer to the ViewPort for which VSprites will be created
  2138.  
  2139.    RESULT
  2140.  
  2141.    BUGS
  2142.     MUSTDRAW isn't implemented yet.
  2143.  
  2144.    SEE ALSO
  2145.     InitGels()  graphics/gels.h graphics/rastport.h  graphics/view.h
  2146.  
  2147. graphics.library/EraseRect                         graphics.library/EraseRect
  2148.  
  2149.    NAME
  2150.  
  2151.        EraseRect -- Fill a defined rectangular area using the current
  2152.                  BackFill hook. (V36)
  2153.  
  2154.    SYNOPSIS
  2155.     EraseRect( rp, xmin, ymin, xmax, ymax)
  2156.                   a1  d0:16 d1:16 d2:16 d3:16
  2157.  
  2158.     void EraseRect(struct RastPort *, SHORT, SHORT, SHORT, SHORT);
  2159.  
  2160.    FUNCTION
  2161.     Fill the rectangular region specified by the parameters with the
  2162.     BackFill hook. If non-layered, the rectangular region specified by
  2163.     the parameters is cleared. If layered the Layer->BackFill Hook is used.
  2164.  
  2165.    INPUTS
  2166.     rp    - pointer to a RastPort structure
  2167.     xmin    - x coordinate of the upper left corner of the region to fill.
  2168.     ymin    - y coordinate of the upper left corner of the region to fill.
  2169.     xmax    - x coordinate of the lower right corner of the region to fill.
  2170.     ymax    - y coordinate of the lower right corner of the region to fill.
  2171.  
  2172.    BUGS
  2173.  
  2174.    NOTES
  2175.     The following relation MUST be true:
  2176.     (xmax >= xmin) and (ymax >= ymin)
  2177.  
  2178.    SEE ALSO
  2179.     graphics/rastport.h graphics/clip.h
  2180.  
  2181. graphics.library/ExtendFont                       graphics.library/ExtendFont
  2182.  
  2183.    NAME
  2184.     ExtendFont -- ensure tf_Extension has been built for a font (V36)
  2185.  
  2186.    SYNOPSIS
  2187.     success = ExtendFont(font, fontTags)
  2188.     D0                   A0    A1
  2189.  
  2190.     ULONG ExtendFont(struct TextFont *, struct TagItem *);
  2191.  
  2192.     success = ExtendFontTags(font, Tag1, ...)  (V39)
  2193.  
  2194.     ULONG ExtendFontTags(struct TextFont *, ULONG, ...);
  2195.  
  2196.    FUNCTION
  2197.     To extend a TextFont structure.
  2198.  
  2199.    INPUTS
  2200.     font - The font to extend.
  2201.     fontTags - An optional taglist.  If NULL, then a default is used.
  2202.                Currently, the only tag defined is TA_DeviceDPI.
  2203.  
  2204.    RESULT
  2205.     success - 1 if the TextFont was properly extended, else 0.
  2206.  
  2207.    NOTES
  2208.     The varargs stub was missing from amiga.lib until V39.
  2209.  
  2210.    SEE ALSO
  2211.     graphics/text.h
  2212.  
  2213. graphics.library/FindColor                         graphics.library/FindColor
  2214.  
  2215.    NAME
  2216.     FindColor -- Find the closest matching color in a colormap. (V39)
  2217.  
  2218.    SYNOPSIS
  2219.     color = FindColor(  cm,  R,   G,    B , maxpen)
  2220.                        a3   d1   d2    d3   d4
  2221.  
  2222.     ULONG FindColor( struct ColorMap *, ULONG, ULONG, ULONG,LONG);
  2223.  
  2224.    INPUTS
  2225.     cm = colormap
  2226.     R = red level   (32 bit left justified fraction)
  2227.     G = green level (32 bit left justified fraction)
  2228.     B = blue level  (32 bit left justified fraction)
  2229.     MaxPen = the maximum entry in the color table to search. A value of
  2230.             -1 will limt the search to only those pens which could be
  2231.             rendered in (for instance, it will not examine the sprite
  2232.             colors on a 4 color screen).
  2233.  
  2234.  
  2235.    RESULT
  2236.     The system will attempt to find the color in the passed colormap
  2237.     which most closely matches the RGB values passed. No new pens will
  2238.     be allocated, and you should not ReleasePen() the returned pen.
  2239.     This function is not sensitive to palette sharing issues. Its
  2240.     intended use is for:
  2241.  
  2242.             (a) programs which pop up on public screens when those
  2243.                 screens are not using palette sharing. You might
  2244.                 use this function as a fallback when ObtainBestPenA()
  2245.                 says that there are no sharable pens.
  2246.  
  2247.             (b) Internal color matching by an application which is
  2248.                 either running on a non-public screen, or which
  2249.                 wants to match colors to an internal color table
  2250.                 which may not be associated with any displayed screen.
  2251.  
  2252.    BUGS
  2253.  
  2254.    NOTES
  2255.     In order to use the MaxPen=-1 feature, you must have initialized
  2256.     palette sharing via AttachPalExtra() (all intuition screens do this).
  2257.     Otherwise, MaxPen=-1 will search all colors in the colormap.
  2258.  
  2259.  
  2260.    SEE ALSO
  2261.     ObtainBestPenA() GetColorMap() ObtainPen() ReleasePen()
  2262. graphics.library/FindDisplayInfo             graphics.library/FindDisplayInfo
  2263.  
  2264.    NAME
  2265.     FindDisplayInfo -- search for a record identified by a specific key (V36)
  2266.  
  2267.    SYNOPSIS
  2268.     handle = FindDisplayInfo(ID)
  2269.     D0                       D0
  2270.  
  2271.     DisplayInfoHandle FindDisplayInfo(ULONG);
  2272.  
  2273.    FUNCTION
  2274.     Given a 32-bit Mode Key, return a handle to a valid DisplayInfoRecord
  2275.     found in the graphics database.  Using this handle, you can obtain
  2276.     information about this Mode, including its default dimensions,
  2277.     properties, and whether it is currently available for use.
  2278.  
  2279.    INPUTS
  2280.     ID     - unsigned long identifier
  2281.  
  2282.    RESULT
  2283.     handle - handle to a displayinfo Record with that key
  2284.              or NULL if no match.
  2285.  
  2286.    BUGS
  2287.  
  2288.    SEE ALSO
  2289.     graphics/displayinfo.h
  2290.  
  2291. graphics.library/Flood                                 graphics.library/Flood
  2292.  
  2293.    NAME
  2294.     Flood -- Flood rastport like areafill.
  2295.  
  2296.    SYNOPSIS
  2297.     error = Flood( rp, mode, x, y)
  2298.         d0            a1   d2  d0  d1
  2299.  
  2300.     BOOL Flood(struct RastPort *, ULONG, SHORT, SHORT);
  2301.  
  2302.    FUNCTION
  2303.     Search the BitMap starting at (x,y).
  2304.     Fill all adjacent pixels if they are:
  2305.         Mode 0: not the same color as AOLPen
  2306.         Mode 1: the same color as the pixel at (x,y)
  2307.  
  2308.     When actually doing the fill use the modes that apply to
  2309.     standard areafill routine such as drawmodes and patterns.
  2310.  
  2311.    INPUTS
  2312.     rp - pointer to RastPort
  2313.     (x,y) - coordinate in BitMap to start the flood fill at.
  2314.     mode -  0 fill all adjacent pixels searching for border.
  2315.         1 fill all adjacent pixels that have same pen number
  2316.         as the one at (x,y).
  2317.  
  2318.    NOTES
  2319.     In order to use Flood, the destination RastPort must 
  2320.     have a valid TmpRas raster whose size is as large as 
  2321.     that of the RastPort.
  2322.  
  2323.    SEE ALSO
  2324.     AreaEnd() InitTmpRas() graphics/rastport.h
  2325.  
  2326. graphics.library/FontExtent                       graphics.library/FontExtent
  2327.  
  2328.    NAME
  2329.     FontExtent -- get the font attributes of the current font (V36)
  2330.  
  2331.    SYNOPSIS
  2332.     FontExtent(font, fontExtent)
  2333.                A0    A1
  2334.  
  2335.     void FontExtent(struct TextFont *, struct TextExtent *);
  2336.  
  2337.    FUNCTION
  2338.     This function fills the text extent structure with a bounding
  2339.     (i.e. maximum) extent for the characters in the specified font.
  2340.  
  2341.    INPUTS
  2342.     font       - the TextFont from which the font metrics are extracted.
  2343.     fontExtent - the TextExtent structure to be filled.
  2344.  
  2345.    RESULT
  2346.     fontExtent is filled.
  2347.  
  2348.    NOTES
  2349.     The TextFont, not the RastPort, is specified -- unlike
  2350.     TextExtent(), effect of algorithmic enhancements is not
  2351.     included, nor does te_Width include any effect of
  2352.     rp_TxSpacing.  The returned te_Width will be negative only
  2353.     when FPF_REVPATH is set in the tf_Flags of the font -- the
  2354.     effect of left-moving characters is ignored for the width of
  2355.     a normal font, and the effect of right-moving characters is
  2356.     ignored if a REVPATH font.  These characters will, however,
  2357.     be reflected in the bounding extent.
  2358.  
  2359.    SEE ALSO
  2360.     TextExtent()  graphics/text.h
  2361.  
  2362. graphics.library/FreeBitMap                       graphics.library/FreeBitMap
  2363.  
  2364.    NAME
  2365.     FreeBitMap -- free a bitmap created by AllocBitMap (V39)
  2366.  
  2367.    SYNOPSIS
  2368.     FreeBitMap(bm)
  2369.                a0
  2370.  
  2371.     VOID FreeBitMap(struct BitMap *)
  2372.  
  2373.    FUNCTION
  2374.     Frees bitmap and all associated bitplanes
  2375.  
  2376.    INPUTS
  2377.     bm  =  A pointer to a BitMap structure. Passing a NULL-pointer
  2378.            (meaning "do nothing") is OK.
  2379.  
  2380.    BUGS
  2381.  
  2382.    NOTES
  2383.     Be careful to insure that any rendering done to the bitmap has
  2384.     completed (by calling WaitBlit()) before you call this function.
  2385.  
  2386.    SEE ALSO
  2387.     AllocBitMap()
  2388.  
  2389. graphics.library/FreeColorMap                   graphics.library/FreeColorMap
  2390.  
  2391.    NAME
  2392.        FreeColorMap -- Free the ColorMap structure and return memory
  2393.                         to free memory pool.
  2394.  
  2395.    SYNOPSIS
  2396.        FreeColorMap( colormap )
  2397.                        a0
  2398.  
  2399.     void FreeColorMap(struct ColorMap *);
  2400.  
  2401.    FUNCTION
  2402.     Return the memory to the free memory pool that was allocated
  2403.     with GetColorMap.
  2404.  
  2405.    INPUTS
  2406.     colormap - pointer to ColorMap allocated with GetColorMap.
  2407.         
  2408.           Passing a NULL pointer (meaning "do nothing") is 
  2409.           acceptable (V39).
  2410.  
  2411.    RESULT
  2412.     The space is made available for others to use.
  2413.  
  2414.    BUGS
  2415.  
  2416.    SEE ALSO
  2417.        SetRGB4() GetColorMap() graphics/view.h
  2418. graphics.library/FreeCopList                     graphics.library/FreeCopList
  2419.  
  2420.    NAME
  2421.     FreeCopList -- deallocate intermediate copper list
  2422.  
  2423.    SYNOPSIS
  2424.        FreeCopList(coplist)
  2425.               a0
  2426.  
  2427.     void FreeCopList( struct CopList *);
  2428.  
  2429.    FUNCTION
  2430.     Deallocate all memory associated with this copper list.
  2431.  
  2432.    INPUTS
  2433.        coplist    - pointer to structure CopList
  2434.  
  2435.    RESULTS
  2436.     memory returned to memory manager
  2437.  
  2438.    BUGS
  2439.  
  2440.    SEE ALSO
  2441.     graphics/copper.h
  2442.  
  2443. graphics.library/FreeCprList                     graphics.library/FreeCprList
  2444.  
  2445.    NAME
  2446.        FreeCprList -- deallocate hardware copper list
  2447.  
  2448.    SYNOPSIS
  2449.        FreeCprList(cprlist)
  2450.               a0
  2451.  
  2452.     void FreeCprList(struct cprlist *);
  2453.  
  2454.    FUNCTION
  2455.        return cprlist to free memory pool
  2456.  
  2457.    INPUTS
  2458.        cprlist - pointer to cprlist structure
  2459.  
  2460.    RESULTS
  2461.     memory returned and made available to other tasks
  2462.  
  2463.    BUGS
  2464.  
  2465.    SEE ALSO
  2466.     graphics/copper.h
  2467.  
  2468. graphics.library/FreeDBufInfo                   graphics.library/FreeDBufInfo
  2469.  
  2470.    NAME
  2471.        FreeDBufInfo -- free information for multi-buffered animation (V39)
  2472.  
  2473.    SYNOPSIS
  2474.        FreeDBufInfo(db)
  2475.                  a1
  2476.  
  2477.     void FreeDBufInfo(struct DBufInfo *)
  2478.  
  2479.    FUNCTION
  2480.     Frees a structure obtained from AllocDBufInfo
  2481.  
  2482.    INPUTS
  2483.        db  =  A pointer to a DBufInfo.
  2484.  
  2485.    BUGS
  2486.  
  2487.    NOTES
  2488.     FreeDBufInfo(NULL) is a no-op.
  2489.  
  2490.    SEE ALSO
  2491.     AllocDBufInfo() ChangeVPBitMap()
  2492.  
  2493. graphics.library/FreeGBuffers                   graphics.library/FreeGBuffers
  2494.  
  2495.    NAME
  2496.     FreeGBuffers -- Deallocate memory obtained by GetGBufers.
  2497.  
  2498.    SYNOPSIS
  2499.     FreeGBuffers(anOb, rp, db)
  2500.                  A0    A1  D0
  2501.  
  2502.     void FreeGBuffers(struct AnimOb *, struct RastPort *, BOOL);
  2503.  
  2504.    FUNCTION
  2505.     For each sequence of each component of the AnimOb,
  2506.     deallocate memory for:
  2507.         SaveBuffer
  2508.         BorderLine
  2509.         CollMask and ImageShadow (point to same buffer)
  2510.         if db is set (user had used double-buffering) deallocate:
  2511.             DBufPacket
  2512.             BufBuffer
  2513.  
  2514.    INPUTS
  2515.     anOb = pointer to the AnimOb structure
  2516.     rp   = pointer to the current RastPort
  2517.     db   = double-buffer indicator (set TRUE for double-buffering)
  2518.  
  2519.    RESULT
  2520.  
  2521.    BUGS
  2522.  
  2523.    SEE ALSO
  2524.     GetGBuffers()  graphics/gels.h  graphics/rastport.h
  2525.  
  2526. graphics.library/FreeRaster                       graphics.library/FreeRaster
  2527.  
  2528.    NAME
  2529.        FreeRaster -- Release an allocated area to the system free memory pool
  2530. .
  2531.  
  2532.  
  2533.    SYNOPSIS
  2534.        FreeRaster( p, width, height)
  2535.            a0   d0:16  d1:16
  2536.  
  2537.     void FreeRaster( PLANEPTR, USHORT, USHORT);
  2538.  
  2539.    FUNCTION
  2540.     Return the memory associated with this PLANEPTR of size
  2541.     width and height to the MEMF_CHIP memory pool.
  2542.  
  2543.    INPUTS
  2544.        p  =  a pointer to a memory space  returned  as  a
  2545.              result of a call to AllocRaster.
  2546.  
  2547.     width - the width in bits of the bitplane.
  2548.     height - number of rows in bitplane.
  2549.  
  2550.    BUGS
  2551.  
  2552.    NOTES
  2553.        Width and height should be the same values with which you
  2554.        called AllocRaster in the first place.
  2555.  
  2556.    SEE ALSO
  2557.     AllocRaster() graphics/gfx.h
  2558.  
  2559. graphics.library/FreeSprite                       graphics.library/FreeSprite
  2560.  
  2561.    NAME
  2562.        FreeSprite -- Return sprite for use by others and virtual
  2563.                       sprite machine.
  2564.  
  2565.    SYNOPSIS
  2566.        FreeSprite( pick )
  2567.                     d0
  2568.  
  2569.     void FreeSprite( WORD );
  2570.  
  2571.    FUNCTION
  2572.     Mark sprite as available for others to use.
  2573.        These sprite routines are provided to ease sharing of sprite
  2574.     hardware and to handle simple cases of sprite usage and
  2575.     movement.  It is assumed the programs that use these routines
  2576.     do want to be good citizens in their hearts. ie: they will
  2577.     not FreeSprite unless they actually own the sprite.
  2578.     The Virtual Sprite machine may ignore the simple sprite machine.
  2579.  
  2580.    INPUTS
  2581.        pick - number in range of 0-7
  2582.  
  2583.    RESULTS
  2584.     sprite made available for subsequent callers of GetSprite
  2585.     as well as use by Virtual Sprite Machine.
  2586.  
  2587.    BUGS
  2588.  
  2589.    SEE ALSO
  2590.        GetSprite() ChangeSprite() MoveSprite() graphics/sprite.h
  2591.  
  2592. graphics.library/FreeSpriteData               graphics.library/FreeSpriteData
  2593.  
  2594.    NAME
  2595.     FreeSpriteData -- free sprite data allocated by AllocSpriteData() (V39)
  2596.  
  2597.    SYNOPSIS
  2598.     FreeSpriteData(extsp)
  2599.             a2
  2600.  
  2601.     void FreeSpriteData(struct ExtSprite *);
  2602.  
  2603.  
  2604.    FUNCTION
  2605.  
  2606.    INPUTS
  2607.     extsp - The extended sprite structure to be freed. Passing NULL is a
  2608.     NO-OP.
  2609.  
  2610.    SEE ALSO
  2611.     FreeSpriteData() FreeSprite() ChangeSprite() MoveSprite() GetExtSprite()
  2612.     AllocBitMap() graphics/sprite.h
  2613.  
  2614. graphics.library/FreeVPortCopLists         graphics.library/FreeVPortCopLists
  2615.  
  2616.    NAME
  2617.        FreeVPortCopLists -- deallocate all intermediate copper lists and
  2618.        their headers from a viewport
  2619.  
  2620.    SYNOPSIS
  2621.        FreeVPortCopLists(vp)
  2622.                          a0
  2623.  
  2624.     void FreeVPortCopLists(struct ViewPort *);
  2625.  
  2626.    FUNCTION
  2627.        Search display, color, sprite, and user copper
  2628.        lists and call FreeMem() to deallocate them from memory
  2629.  
  2630.    INPUTS
  2631.        vp - pointer to ViewPort structure
  2632.  
  2633.    RESULTS
  2634.        The memory allocated to the various copper lists will be returned
  2635.     to the system's free memory pool, and the following fields in
  2636.     the viewport structure will be set to NULL:
  2637.         
  2638.         DspIns, Sprins, ClrIns, UCopIns
  2639.  
  2640.    BUGS
  2641.        none known
  2642.  
  2643.    SEE ALSO
  2644.     graphics/view.h
  2645.  
  2646. graphics.library/GetAPen                             graphics.library/GetAPen
  2647.  
  2648.    NAME
  2649.        GetAPen -- Get the A Pen value for a RastPort (V39).
  2650.  
  2651.  
  2652.    SYNOPSIS
  2653.        pen = GetAPen  ( rp )
  2654.      d0         a0
  2655.  
  2656.     ULONG GetAPen(struct RastPort *)
  2657.  
  2658.    FUNCTION
  2659.     Return the current value of the A pen for the rastport. This function 
  2660.     should be used instead of peeking the structure directly, because future
  2661.     graphics devices may store it differently, for instance, using more bits.
  2662.  
  2663.    INPUTS
  2664.        rp  =  a pointer to a valid RastPort structure.
  2665.  
  2666.    BUGS
  2667.  
  2668.    NOTES
  2669.  
  2670.    SEE ALSO
  2671.     SetAPen() graphics/gfx.h
  2672.  
  2673. graphics.library/GetBitMapAttr                 graphics.library/GetBitMapAttr
  2674.  
  2675.    NAME
  2676.     GetBitMapAttr -- Returns information about a bitmap (V39)
  2677.  
  2678.  
  2679.    SYNOPSIS
  2680.     value=GetBitMapAttr(bitmap,attribute_number);
  2681.       d0                     a0       d1
  2682.  
  2683.     ULONG GetBitMapAttr(struct BitMap *,ULONG);
  2684.  
  2685.    FUNCTION
  2686.     Determines information about a bitmap. This function should be used
  2687.     instead of reading the bitmap structure fields directly. This will
  2688.     provide future compatibility.
  2689.  
  2690.    INPUTS
  2691.     bm  =  A pointer to a BitMap structure.
  2692.  
  2693.     attribute_number = A number telling graphics which attribute
  2694.                        of the bitmap should be returned:
  2695.  
  2696.                     BMA_HEIGHT returns the height in pixels
  2697.                     BMA_WIDTH  returns the width in pixels.
  2698.                     BMA_DEPTH  returns the depth. This is the number of
  2699.                             bits which are required to store the information
  2700.                             for one pixel in the bitmap.
  2701.                     BMA_FLAGS  returns a longword bitfield describing
  2702.                             various attributes which the bitmap may have.
  2703.                             Currently defined flags are BMF_DISPLAYABLE,
  2704.                             BMF_INTERLEAVED (see AllocBitMap()). The flag
  2705.                             BMF_STANDARD returns will be set if the
  2706.                             bitmap is represented as planar data in Amiga
  2707.                             Chip RAM.
  2708.  
  2709.    BUGS
  2710.  
  2711.    NOTES
  2712.  
  2713.     Unknown attributes are reserved for future use, and return zero.
  2714.  
  2715.     BMF_DISPLAYABLE will only be set if the source bitmap meets all of the
  2716.     required alignment restrictions. A bitmap which does not meet these
  2717.     restrictions may still be displayable at some loss of efficiency.
  2718.  
  2719.     Size values returned by this function may not exactly match the values
  2720.     which were passed to AllocBitMap(), due to alignment restrictions.
  2721.  
  2722.    SEE ALSO
  2723.     AllocBitMap()
  2724.  
  2725. graphics.library/GetBPen                             graphics.library/GetBPen
  2726.  
  2727.    NAME
  2728.        GetBPen -- Get the B Pen value for a RastPort (V39).
  2729.  
  2730.  
  2731.    SYNOPSIS
  2732.        pen = GetBPen  ( rp )
  2733.     d0            a0
  2734.  
  2735.     ULONG GetBPen(struct RastPort *)
  2736.  
  2737.    FUNCTION
  2738.     Return the current value of the B pen for the rastport. This function 
  2739.     should be used instead of peeking the structure directly, because future
  2740.     graphics devices may store it differently, using more bits.
  2741.  
  2742.    INPUTS
  2743.        rp  =  a pointer to a valid RastPort structure.
  2744.  
  2745.    BUGS
  2746.  
  2747.    NOTES
  2748.  
  2749.    SEE ALSO
  2750.     SetBPen() graphics/gfx.h
  2751.  
  2752. graphics.library/GetColorMap                     graphics.library/GetColorMap
  2753.  
  2754.    NAME
  2755.        GetColorMap -- allocate and initialize Colormap
  2756.  
  2757.  
  2758.    SYNOPSIS
  2759.        cm = GetColorMap( entries )
  2760.        d0            d0
  2761.  
  2762.     struct ColorMap *GetColorMap( ULONG);
  2763.  
  2764.    FUNCTION
  2765.        Allocates, initializes and returns a pointer to a ColorMap
  2766.        data structure, later enabling calls to SetRGB4 
  2767.        and LoadRGB4 to load colors for a view port. The ColorTable
  2768.     pointer in the ColorMap structure points to a hardware
  2769.     specific colormap data structure. You should not count on
  2770.     it being anything you can understand. Use GetRGB4() to
  2771.     query it or SetRGB4CM to set it directly.
  2772.  
  2773.    INPUTS
  2774.     entries - number of entries for this colormap 
  2775.  
  2776.     RESULT
  2777.     The pointer value returned by this routine, if nonzero,
  2778.        may be stored into the ViewPort.ColorMap pointer.
  2779.        If a value of 0 is returned, the system was unable
  2780.        to allocate enough memory space for the required
  2781.        data structures.
  2782.  
  2783.    BUGS
  2784.  
  2785.    SEE ALSO
  2786.        SetRGB4() FreeColorMap()
  2787. graphics.library/GetDisplayInfoData       graphics.library/GetDisplayInfoData
  2788.  
  2789.    NAME
  2790.     GetDisplayInfoData -- query DisplayInfo Record parameters (V36)
  2791.  
  2792.    SYNOPSIS
  2793.     result = GetDisplayInfoData(handle, buf, size, tagID, [ID])
  2794.     D0                          A0      A1   D0    D1     [D2]
  2795.  
  2796.     ULONG GetDisplayInfoData(DisplayInfoHandle, UBYTE *, ULONG, ULONG, ULONG);
  2797.  
  2798.    FUNCTION
  2799.     GetDisplayInfoData() fills a buffer with data meaningful to the
  2800.     DisplayInfoRecord pointed at by your valid handle. The data type
  2801.     that you are interested in is indicated by a tagID for that chunk.
  2802.     The types of tagged information that may be available include:
  2803.  
  2804.     DTAG_DISP: (DisplayInfo)   - properties and availability information.
  2805.     DTAG_DIMS: (DimensionInfo) - default dimensions and overscan info.
  2806.     DTAG_MNTR: (MonitorInfo)   - type, position, scanrate, and compatibility
  2807.     DTAG_NAME: (NameInfo)      - a user friendly way to refer to this mode.
  2808.  
  2809.    INPUTS
  2810.     handle - displayinfo handle
  2811.     buf    - pointer to destination buffer
  2812.     size   - buffer size in bytes
  2813.     tagID  - data chunk type
  2814.     ID     - displayinfo identifier, optionally used if handle is NULL
  2815.  
  2816.    RESULT
  2817.     result - if positive, number of bytes actually transferred
  2818.              if zero, no information for ID was available
  2819.  
  2820.    BUGS
  2821.  
  2822.    SEE ALSO
  2823.     FindDisplayInfo(), NextDisplayInfo()
  2824.     graphics/displayinfo.h
  2825.  
  2826. graphics.library/GetDrMd                             graphics.library/GetDrMd
  2827.  
  2828.    NAME
  2829.        GetDrMd -- Get the draw mode value for a RastPort (V39).
  2830.  
  2831.  
  2832.    SYNOPSIS
  2833.        mode = GetDrMd  ( rp )
  2834.     d0                a0
  2835.  
  2836.     ULONG GetDrMd(struct RastPort *)
  2837.  
  2838.    FUNCTION
  2839.     Return the current value of the draw mode for the rastport. This function 
  2840.     should be used instead of peeking the structure directly, because future
  2841.     graphics devices may store it differently.
  2842.  
  2843.    INPUTS
  2844.        rp  =  a pointer to a valid RastPort structure.
  2845.  
  2846.    BUGS
  2847.  
  2848.    NOTES
  2849.  
  2850.    SEE ALSO
  2851.     SetDrMd() graphics/gfx.h
  2852.  
  2853. graphics.library/GetExtSpriteA                 graphics.library/GetExtSpriteA
  2854.  
  2855.    NAME
  2856.     GetExtSpriteA -- Attempt to get a sprite for the extended sprite
  2857.                      manager. (V39)
  2858.     GetExtSprite -- varargs stub for GetExtSpriteA. (V39)
  2859.  
  2860.    SYNOPSIS
  2861.     Sprite_Number = GetExtSpriteA( sprite, tags )  (V39)
  2862.         d0                    a2      a1
  2863.  
  2864.     LONG GetExtSpriteA( struct ExtSprite *, struct TagItem * );
  2865.  
  2866.     spritenum=GetExtSprite(sprite,tags,...);
  2867.  
  2868.    FUNCTION
  2869.     Attempt to allocate one of the eight sprites for private use
  2870.     with the extended sprite manager. 
  2871.  
  2872.    INPUTS
  2873.     sprite - ptr to programmer's ExtSprite (from AllocSpriteData()).
  2874.     tags - a standard tag list:
  2875.  
  2876.         GSTAG_SPRITE_NUM    specifies a specific sprite to get by number.
  2877.         
  2878.         GSTAG_ATTACHED specifies that you wish to get a sprite pair.
  2879.             the tag data field points to a ExtSprite structure
  2880.             for the second sprite. You must free both sprites.
  2881.  
  2882.  
  2883.    RESULTS
  2884.     Sprite_number = a sprite number or -1 for an error.
  2885.         This call will fail if no sprites could be allocated, or
  2886.         if you try to allocate a sprite which would require
  2887.         a mode change when there are other sprites of incompatible
  2888.         modes in use.
  2889.  
  2890.    BUGS
  2891.  
  2892.     GSTAG_ATTACHED does not work in version 39. When running under V39,
  2893.     you should attach the second sprite with a separate GetExtSprite call.
  2894.  
  2895.    SEE ALSO
  2896.     FreeSprite() ChangeSprite() MoveSprite() GetSprite() graphics/sprite.h
  2897.  
  2898. graphics.library/GetGBuffers                     graphics.library/GetGBuffers
  2899.  
  2900.    NAME
  2901.     GetGBuffers -- Attempt to allocate ALL buffers of an entire AnimOb.
  2902.  
  2903.    SYNOPSIS
  2904.     status = GetGBuffers(anOb, rp, db)
  2905.     D0                   A0    A1  D0
  2906.  
  2907.     BOOL GetGBuffers(struct AnimOb *, struct RastPort *, BOOL);
  2908.  
  2909.    FUNCTION
  2910.     For each sequence of each component of the AnimOb, allocate memory for:
  2911.         SaveBuffer
  2912.         BorderLine
  2913.         CollMask and ImageShadow (point to same buffer)
  2914.         if db is set TRUE (user wants double-buffering) allocate:
  2915.             DBufPacket
  2916.             BufBuffer
  2917.  
  2918.    INPUTS
  2919.     anOb = pointer to the AnimOb structure
  2920.     rp   = pointer to the current RastPort
  2921.     db   = double-buffer indicator (set TRUE for double-buffering)
  2922.  
  2923.    RESULT
  2924.     status = TRUE if the memory allocations were all successful, else FALSE
  2925.  
  2926.    BUGS
  2927.     If any of the memory allocations fail it does not free the partial
  2928.     allocations that did succeed.
  2929.  
  2930.    SEE ALSO
  2931.     FreeGBuffers() graphics/gels.h
  2932.  
  2933. graphics.library/GetOPen                             graphics.library/GetOPen
  2934.  
  2935.    NAME
  2936.        GetOPen -- Get the O Pen value for a RastPort (V39).
  2937.  
  2938.  
  2939.    SYNOPSIS
  2940.        pen = GetOPen  ( rp )
  2941.     d0         a0
  2942.  
  2943.     ULONG GetOPen(struct RastPort *)
  2944.  
  2945.    FUNCTION
  2946.     Return the current value of the O pen for the rastport. This function 
  2947.     should be used instead of peeking the structure directly, because future
  2948.     graphics devices may store it differently, for instance, using more bits.
  2949.  
  2950.    INPUTS
  2951.        rp  =  a pointer to a valid RastPort structure.
  2952.  
  2953.    BUGS
  2954.  
  2955.    NOTES
  2956.  
  2957.    SEE ALSO
  2958.     SetOutlinePen() graphics/gfx.h
  2959.  
  2960. graphics.library/GetRGB32                           graphics.library/GetRGB32
  2961.  
  2962.    NAME
  2963.     GetRGB32 -- Set a series of color registers for this Viewport. (V39)
  2964.  
  2965.    SYNOPSIS
  2966.     GetRGB32(  cm,  firstcolor, ncolors, table )
  2967.                a0   d0           d1    a1
  2968.  
  2969.        void GetRGB32( struct ColorMap *, ULONG, ULONG, ULONG *);
  2970.  
  2971.    INPUTS
  2972.     cm = colormap
  2973.     firstcolor = the first color register to get
  2974.     ncolors = the number of color registers to set.
  2975.     table=a pointer to a series of 32-bit RGB triplets.
  2976.  
  2977.    RESULT
  2978.     The ULONG data pointed to by 'table' will be filled with the 32 bit
  2979.     fractional RGB values from the colormap.
  2980.    BUGS
  2981.  
  2982.    NOTES
  2983.     'Table' should point to at least ncolors*3 longwords.
  2984.  
  2985.    SEE ALSO
  2986.     LoadRGB4() GetColorMap() LoadRGB32() SetRGB32CM() graphics/view.h
  2987. graphics.library/GetRGB4                             graphics.library/GetRGB4
  2988.  
  2989.    NAME
  2990.        GetRGB4 -- Inquire value of entry in ColorMap.
  2991.  
  2992.    SYNOPSIS
  2993.        value = GetRGB4( colormap, entry )
  2994.           d0              a0       d0
  2995.  
  2996.     ULONG GetRGB4(struct ColorMap *, LONG);
  2997.  
  2998.    FUNCTION
  2999.     Read and format a value from the ColorMap.
  3000.  
  3001.    INPUTS
  3002.     colormap - pointer to ColorMap structure
  3003.     entry - index into colormap
  3004.  
  3005.    RESULT
  3006.     returns -1 if no valid entry
  3007.     return UWORD RGB value 4 bits per gun right justified
  3008.  
  3009.    NOTE
  3010.     Intuition's DisplayBeep() changes color 0. Reading Color 0 during a
  3011.     DisplayBeep() will lead to incorrect results.
  3012.  
  3013.    BUGS
  3014.  
  3015.    SEE ALSO
  3016.        SetRGB4() LoadRGB4() GetColorMap() FreeColorMap() graphics/view.h
  3017. graphics.library/GetRPAttrA                       graphics.library/GetRPAttrA
  3018.  
  3019.    NAME
  3020.        GetRPAttrA -- examine rastport settings via a tag list
  3021.     GetRPAttrs  -- varargs stub for GetRPAttrA
  3022.  
  3023.    SYNOPSIS
  3024.        GetRPAttrA(rp,tags)
  3025.                   a0   a1
  3026.  
  3027.     void GetRPAttrA(struct RastPort *, struct TagItem *);
  3028.  
  3029.     GetRPAttrs(rp,attr1,&result1,...);
  3030.  
  3031.    FUNCTION
  3032.        Read the settings of a rastport into variables. The
  3033.     ti_Tag field of the TagItem specifies which attribute
  3034.     should be read, and the ti_Data field points at the
  3035.     location where the result hsould be stored. All current
  3036.     tags store the return data as LONGs (32 bits).
  3037.  
  3038.     currently available tags are:
  3039.  
  3040.         RPTAG_Font        Font for Text()
  3041.         RPTAG_SoftStyle        style for text (see graphics/text.h)
  3042.         RPTAG_APen        Primary rendering pen
  3043.         RPTAG_BPen        Secondary rendering pen
  3044.         RPTAG_DrMd         Drawing mode (see graphics/rastport.h)
  3045.         RPTAG_OutLinePen     Area Outline pen
  3046.         RPTAG_WriteMask     Bit Mask for writing.
  3047.         RPTAG_MaxPen         Maximum pen to render (see SetMaxPen())
  3048.         RPTAG_DrawBounds    Determine the area that will be rendered
  3049.                     into by rendering commands. Can be used
  3050.                     to optimize window refresh. Pass a pointer
  3051.                     to a rectangle in the tag data. On return,
  3052.                     the rectangle's MinX will be greater than
  3053.                     its MaxX if there are no active cliprects.
  3054.  
  3055.    INPUTS
  3056.     rp - pointer to the RastPort to examine.
  3057.     tags - a standard tag list specifying the attributes to be read,
  3058.         and where to store their values.
  3059.  
  3060.    RESULT
  3061.  
  3062.    BUGS
  3063.  
  3064.    SEE ALSO
  3065.     GetAPen() GetBPen() GetDrMd() GetOutLinePen()
  3066.     GetWriteMask() SetRPAttrA() graphics/rpattr.h
  3067.  
  3068. graphics.library/GetSprite                         graphics.library/GetSprite
  3069.  
  3070.    NAME
  3071.     GetSprite -- Attempt to get a sprite for the simple sprite manager.
  3072.  
  3073.    SYNOPSIS
  3074.     Sprite_Number = GetSprite( sprite, pick )
  3075.         d0                a0      d0
  3076.  
  3077.     WORD GetSprite( struct SimpleSprite *, WORD );
  3078.  
  3079.    FUNCTION
  3080.     Attempt to allocate one of the eight sprites for private use
  3081.     with the simple sprite manager. This must be done before using
  3082.     further calls to the simple sprite machine. If the programmer
  3083.     wants to use 15 color sprites, they must allocate both sprites
  3084.     and set the 'SPRITE_ATTACHED' bit in the odd sprite's posctldata
  3085.     array. 
  3086.  
  3087.    INPUTS
  3088.     sprite - ptr to programmers SimpleSprite structure.
  3089.     pick - number in the range of 0-7 or
  3090.       -1 if programmer just wants the next one.
  3091.  
  3092.    RESULTS
  3093.     If pick is 0-7 attempt to allocate the sprite. If the sprite
  3094.     is already allocated then return -1.
  3095.     If pick -1 allocate the next sprite starting search at 0.
  3096.     If no sprites are available return -1 and fill -1 in num entry
  3097.     of SimpleSprite structure.
  3098.     If the sprite is available for allocation, mark it allocated
  3099.     and fill in the 'num' entry of the SimpleSprite structure.
  3100.     If successful return the sprite number.
  3101.  
  3102.    BUGS
  3103.  
  3104.    SEE ALSO
  3105.     FreeSprite() ChangeSprite() MoveSprite() GetSprite() graphics/sprite.h
  3106.  
  3107. graphics.library/GetVPModeID                     graphics.library/GetVPModeID
  3108.  
  3109.    NAME
  3110.     GetVPModeID -- get the 32 bit DisplayID from a ViewPort. (V36)
  3111.  
  3112.    SYNOPSIS
  3113.     modeID =  GetVPModeID( vp )
  3114.     d0               a0
  3115.  
  3116.     ULONG GetVPModeID( struct ViewPort *);
  3117.  
  3118.    FUNCTION
  3119.     returns the normal display modeID, if one is currently  associated 
  3120.     with this ViewPort.
  3121.  
  3122.    INPUTS
  3123.     vp -- pointer to a ViewPort structure.
  3124.  
  3125.    RESULT
  3126.     
  3127.     modeID -- a 32 bit DisplayInfoRecord identifier associated with 
  3128.           this ViewPort, or INVALID_ID.
  3129.  
  3130.    NOTES
  3131.     Test the return value of this function against INVALID_ID, not NULL.
  3132.     (INVALID_ID is defined in graphics/displayinfo.h).
  3133.  
  3134.    BUGS
  3135.  
  3136.    SEE ALSO
  3137.     graphics/displayinfo.h, ModeNotAvailable()
  3138.  
  3139. graphics.library/GfxAssociate                   graphics.library/GfxAssociate
  3140.  
  3141.    NAME
  3142.     GfxAssociate -- associate a graphics extended node with a given pointer
  3143.                     (V36)
  3144.  
  3145.    SYNOPSIS
  3146.        GfxAssociate(pointer, node);
  3147.                     A0       A1
  3148.  
  3149.     void GfxAssociate(VOID *, struct ExtendedNode *);
  3150.  
  3151.    FUNCTION
  3152.     Associate a special graphics extended data structure (each of which
  3153.     begins with an ExtendedNode structure)  with another structure via
  3154.     the other structure's pointer. Later, when you call GfxLookUp()
  3155.     with the other structure's pointer you may retrieve a pointer
  3156.     to this special graphics extended data structure, if it is
  3157.     available.
  3158.  
  3159.    INPUTS
  3160.     pointer = a pointer to a data structure.
  3161.     node = an ExtendedNode structure to associate with the pointer
  3162.     
  3163.    RESULT
  3164.     an association is created between the pointer and the node such
  3165.     that given the pointer the node can be retrieved via GfxLookUp().
  3166.  
  3167.    BUGS
  3168.  
  3169.    SEE ALSO
  3170.     graphics/gfxnodes.h GfxNew() GfxFree() GfxLookUp()
  3171.  
  3172. graphics.library/GfxFree                             graphics.library/GfxFree
  3173.  
  3174.    NAME
  3175.        GfxFree -- free a graphics extended data structure (V36)
  3176.  
  3177.    SYNOPSIS
  3178.        GfxFree( node );
  3179.                  a0
  3180.     
  3181.     void GfxFree(struct ExtendedNode *);
  3182.  
  3183.    FUNCTION
  3184.     Free a special graphics extended data structure (each of which
  3185.     begins with an ExtendedNode structure).
  3186.  
  3187.    INPUTS
  3188.     node = pointer to a graphics extended data structure obtained via
  3189.            GfxNew().
  3190.  
  3191.    RESULT
  3192.     the node is deallocated from memory. graphics will disassociate
  3193.     this special graphics extended node from any associated data
  3194.     structures, if necessary, before freeing it (see GfxAssociate()).
  3195.  
  3196.    BUGS
  3197.     an Alert() will be called if you attempt to free any structure 
  3198.     other than a graphics extended data structure obtained via GfxFree().
  3199.  
  3200.    SEE ALSO
  3201.     graphics/gfxnodes.h GfxNew() GfxAssociate() GfxLookUp()
  3202.  
  3203. graphics.library/GfxLookUP                         graphics.library/GfxLookUP
  3204.  
  3205.    NAME
  3206.         GfxLookUp -- find a graphics extended node associated with a 
  3207.              given pointer (V36)
  3208.  
  3209.    SYNOPSIS
  3210.        result = GfxLookUp( pointer );
  3211.        d0            a0
  3212.  
  3213.     struct ExtendedNode *GfxLookUp( void *);
  3214.  
  3215.    FUNCTION
  3216.     Finds a special graphics extended data structure (if any) associated
  3217.     with the pointer to a data structure (eg: ViewExtra associated with
  3218.     a View structure).
  3219.  
  3220.    INPUTS
  3221.     pointer = a pointer to a data structure which may have an 
  3222.           ExtendedNode associated with it (typically a View ).
  3223.  
  3224.    RESULT
  3225.     result = a pointer to the ExtendedNode that has previously been
  3226.          associated with the pointer.
  3227.         
  3228.    BUGS
  3229.  
  3230.    SEE ALSO
  3231.     graphics/gfxnodes.h GfxNew() GfxFree() GfxAssociate()
  3232.  
  3233. graphics.library/GfxNew                               graphics.library/GfxNew
  3234.  
  3235.    NAME
  3236.        GfxNew -- allocate a graphics extended data structure (V36)
  3237.  
  3238.    SYNOPSIS
  3239.      result = GfxNew( node_type );    
  3240.     d0         d0
  3241.  
  3242.     struct ExtendedNode *GfxNew( ULONG);
  3243.  
  3244.    FUNCTION
  3245.     Allocate a special graphics extended data structure (each of which
  3246.     begins with an ExtendedNode structure).  The type of structure to
  3247.     be allocated is specified by the node_type identifier.
  3248.  
  3249.    INPUTS
  3250.     node_type = which type of graphics extended data structure to allocate. 
  3251.             (see gfxnodes.h for identifier definitions.)
  3252.  
  3253.    RESULT
  3254.     result = a pointer to the allocated graphics node or NULL if the 
  3255.          allocation failed.
  3256.  
  3257.    BUGS
  3258.  
  3259.    SEE ALSO
  3260.     graphics/gfxnodes.h GfxFree() GfxAssociate() GfxLookUp()
  3261.  
  3262. graphics.library/InitArea                           graphics.library/InitArea
  3263.  
  3264.    NAME   
  3265.  
  3266.     InitArea -- Initialize vector collection matrix
  3267.  
  3268.    SYNOPSIS
  3269.  
  3270.        InitArea( areainfo, buffer, maxvectors )
  3271.             a0          a1      d0
  3272.  
  3273.     void InitArea(struct AreaInfo *, void *, SHORT);
  3274.     
  3275.    FUNCTION
  3276.     This function provides initialization for the vector collection matrix
  3277.     such that it has a size of (max vectors ).  The size of the region
  3278.     pointed to by buffer (short pointer) should be five (5) times as large
  3279.     as maxvectors. This size is in bytes.  Areafills done by using AreaMove,
  3280.     AreaDraw, and AreaEnd must have enough space allocated in this table to
  3281.     store all the points of the largest fill. AreaEllipse takes up two
  3282.     vectors for every call. If AreaMove/Draw/Ellipse detect too many
  3283.     vectors going into the buffer they will return -1.
  3284.  
  3285.    INPUTS
  3286.     areainfo - pointer to AreaInfo structure
  3287.     buffer - pointer to chunk of memory to collect vertices
  3288.     maxvectors - max number of vectors this buffer can hold
  3289.  
  3290.    RESULT
  3291.     Pointers are set up to begin storage of vectors done by
  3292.     AreaMove, AreaDraw, and AreaEllipse.
  3293.  
  3294.    BUGS
  3295.  
  3296.    SEE ALSO
  3297.     AreaEnd() AreaMove() AreaDraw() AreaEllipse() graphics/rastport.h
  3298.  
  3299. graphics.library/InitBitMap                       graphics.library/InitBitMap
  3300.  
  3301.    NAME   
  3302.  
  3303.        InitBitMap -- Initialize bit map structure with input values.
  3304.  
  3305.    SYNOPSIS
  3306.     InitBitMap( bm, depth, width, height )
  3307.             a0   d0     d1      d2
  3308.  
  3309.     void InitBitMap( struct BitMap *, BYTE, UWORD, UWORD );
  3310.     
  3311.    FUNCTION
  3312.     Initialize various elements in the BitMap structure to
  3313.     correctly reflect depth, width, and height.
  3314.     Must be used before use of BitMap in other graphics calls.
  3315.     The Planes[8] are not initialized and need to be set up
  3316.     by the caller.  The Planes table was put at the end of the
  3317.     structure so that it may be truncated to conserve space,
  3318.     as well as extended. All routines that use BitMap should
  3319.     only depend on existence of depth number of bitplanes.
  3320.     The Flagsh and pad fields are reserved for future use and
  3321.     should not be used by application programs.
  3322.  
  3323.    INPUTS
  3324.     bm - pointer to a BitMap structure (gfx.h)
  3325.     depth - number of bitplanes that this bitmap will have
  3326.     width - number of bits (columns) wide for this BitMap
  3327.     height- number of bits (rows) tall for this BitMap
  3328.  
  3329.    BUGS
  3330.  
  3331.    SEE ALSO
  3332.     graphics/gfx.h
  3333.  
  3334. graphics.library/InitGels                           graphics.library/InitGels
  3335.  
  3336.    NAME
  3337.     InitGels -- initialize a gel list; must be called before using gels.
  3338.  
  3339.    SYNOPSIS
  3340.     InitGels(head, tail, GInfo)
  3341.              A0    A1    A2
  3342.  
  3343.     void InitGels(struct VSprite *, struct VSprite *, struct GelsInfo *);
  3344.  
  3345.    FUNCTION
  3346.     Assigns the VSprites as the head and tail of the gel list in GfxBase.
  3347.     Links these two gels together as the keystones of the list.
  3348.     If the collHandler vector points to some memory array, sets
  3349.     the BORDERHIT vector to NULL.
  3350.  
  3351.    INPUTS
  3352.     head  = pointer to the VSprite structure to be used as the gel list head
  3353.     tail  = pointer to the VSprite structure to be used as the gel list tail
  3354.     GInfo = pointer to the GelsInfo structure to be initialized
  3355.  
  3356.    RESULT
  3357.  
  3358.    BUGS
  3359.  
  3360.    SEE ALSO
  3361.     graphics/gels.h  graphics/rastport.h
  3362.  
  3363. graphics.library/InitGMasks                       graphics.library/InitGMasks
  3364.  
  3365.    NAME
  3366.     InitGMasks -- Initialize all of the masks of an AnimOb.
  3367.  
  3368.    SYNOPSIS
  3369.     InitGMasks(anOb)
  3370.                A0
  3371.  
  3372.     void InitGMasks(struct AnimOb *);
  3373.  
  3374.    FUNCTION
  3375.     For every sequence of every component call InitMasks.
  3376.  
  3377.    INPUTS
  3378.     anOb = pointer to the AnimOb
  3379.  
  3380.    BUGS
  3381.  
  3382.    SEE ALSO
  3383.     InitMasks() graphics/gels.h
  3384.  
  3385. graphics.library/InitMasks                         graphics.library/InitMasks
  3386.  
  3387.    NAME
  3388.     InitMasks -- Initialize the BorderLine and CollMask masks of a VSprite.
  3389.  
  3390.    SYNOPSIS
  3391.     InitMasks(vs)
  3392.               A0
  3393.  
  3394.     void InitMasks(struct VSprite *);
  3395.  
  3396.    FUNCTION
  3397.     Creates the appropriate BorderLine and CollMask masks of the VSprite.
  3398.     Correctly detects if the VSprite is actually a Bob definition, handles
  3399.     the image data accordingly.
  3400.  
  3401.    INPUTS
  3402.     vs = pointer to the VSprite structure
  3403.  
  3404.    RESULT
  3405.  
  3406.    BUGS
  3407.  
  3408.    SEE ALSO
  3409.     InitGels()  graphics/gels.h
  3410.  
  3411. graphics.library/InitRastPort                   graphics.library/InitRastPort
  3412.  
  3413.    NAME
  3414.     InitRastPort -- Initialize raster port structure
  3415.  
  3416.    SYNOPSIS
  3417.        InitRastPort( rp )
  3418.               a1
  3419.  
  3420.     void InitRastPort(struct RastPort *rp);
  3421.  
  3422.    FUNCTION
  3423.        Initialize a RastPort structure to standard values.
  3424.  
  3425.    INPUTS
  3426.     rp    = pointer to a RastPort structure.
  3427.  
  3428.    RESULT
  3429.     all entries in RastPort get zeroed out, with the following exceptions:
  3430.  
  3431.         Mask, FgPen, AOLPen, and LinePtrn are set to -1.
  3432.         The DrawMode is set to JAM2
  3433.         The font is set to the standard system font
  3434.  
  3435.    NOTES
  3436.     The struct Rastport describes a control structure
  3437.        for a write-able raster. The RastPort structure
  3438.        describes how a complete single playfield display
  3439.        will be written into. A RastPort structure is
  3440.        referenced whenever any drawing or filling
  3441.        operations are to be performed on a section of
  3442.        memory.
  3443.  
  3444.        The section of memory which is being used in this
  3445.        way may or may not be presently a part of the
  3446.        current actual onscreen display memory. The name
  3447.        of the actual memory section which is linked to
  3448.        the RastPort is referred to here as a "raster" or
  3449.        as a bitmap.
  3450.  
  3451.        NOTE: Calling the routine InitRastPort only
  3452.        establishes various defaults. It does NOT
  3453.        establish where, in memory, the rasters are
  3454.        located. To do graphics with this RastPort the user
  3455.     must set up the BitMap pointer in the RastPort.
  3456.  
  3457.    BUGS
  3458.  
  3459.    SEE ALSO
  3460.        graphics/rastport.h
  3461.  
  3462. graphics.library/InitTmpRas                       graphics.library/InitTmpRas
  3463.  
  3464.    NAME
  3465.     InitTmpRas -- Initialize area of local memory for usage by
  3466.             areafill, floodfill, text.
  3467.  
  3468.    SYNOPSIS
  3469.        InitTmpRas(tmpras, buffer, size)
  3470.                       a0         a1     d0
  3471.  
  3472.     void InitTmpRas( struct TmpRas *, void *, ULONG );
  3473.  
  3474.    FUNCTION
  3475.     The area of memory pointed to by buffer is set up to be used
  3476.     by RastPort routines that may need to get some memory for
  3477.     intermediate operations in preparation to putting the graphics
  3478.     into the final BitMap.
  3479.     Tmpras is used to control the usage of buffer.
  3480.  
  3481.    INPUTS
  3482.     tmpras - pointer to a TmpRas structure to be linked into
  3483.         a RastPort
  3484.     buffer - pointer to a contiguous piece of chip memory.
  3485.     size - size in bytes of buffer
  3486.  
  3487.    RESULT
  3488.     makes buffer available for users of RastPort
  3489.  
  3490.    BUGS
  3491.     Would be nice if RastPorts could share one TmpRas.
  3492.  
  3493.    SEE ALSO
  3494.     AreaEnd() Flood() Text() graphics/rastport.h
  3495.  
  3496. graphics.library/InitView                           graphics.library/InitView
  3497.  
  3498.    NAME   
  3499.    InitView - Initialize View structure.
  3500.  
  3501.    SYNOPSIS
  3502.     InitView( view )
  3503.            a1
  3504.  
  3505.     void InitView( struct View * );
  3506.  
  3507.    FUNCTION
  3508.     Initialize View structure to default values.
  3509.  
  3510.    INPUTS
  3511.     view - pointer to a View structure
  3512.  
  3513.    RESULT
  3514.     View structure set to all 0's. (1.0,1.1.1.2)
  3515.     Then values are put in DxOffset,DyOffset to properly position
  3516.     default display about .5 inches from top and left on monitor.
  3517.     InitView pays no attention to previous contents of view.
  3518.  
  3519.    BUGS
  3520.  
  3521.    SEE ALSO
  3522.      MakeVPort graphics/view.h
  3523.  
  3524. graphics.library/InitVPort                         graphics.library/InitVPort
  3525.  
  3526.    NAME   
  3527.     InitVPort - Initialize ViewPort structure.
  3528.  
  3529.    SYNOPSIS
  3530.     InitVPort( vp )
  3531.            a0
  3532.  
  3533.     void InitViewPort( struct ViewPort * );
  3534.  
  3535.    FUNCTION
  3536.     Initialize ViewPort structure to default values.
  3537.  
  3538.    INPUTS
  3539.     vp - pointer to a ViewPort structure
  3540.  
  3541.    RESULT
  3542.     ViewPort structure set to all 0's. (1.0,1.1)
  3543.        New field added SpritePriorities, initialized to 0x24 (1.2)
  3544.  
  3545.    BUGS
  3546.  
  3547.    SEE ALSO
  3548.     MakeVPort() graphics/view.h
  3549.  
  3550. graphics.library/LoadRGB32                         graphics.library/LoadRGB32
  3551.  
  3552.    NAME
  3553.     LoadRGB32 -- Set a series of color registers for this Viewport. (V39)
  3554.  
  3555.    SYNOPSIS
  3556.     LoadRGB32(  vp,  table )
  3557.                 a0   a1
  3558.  
  3559.     void LoadRGB32( struct ViewPort *, ULONG *);
  3560.  
  3561.    INPUTS
  3562.     vp = viewport
  3563.     table = a pointer to a series of records which describe which colors to
  3564.             modify.
  3565.    RESULT
  3566.     The selected color registers are changed to match your specs.
  3567.    BUGS
  3568.  
  3569.    NOTES
  3570.  
  3571.     Passing a NULL "table" is ignored.
  3572.     The format of the table passed to this function is a series of records,
  3573.     each with the following format:
  3574.  
  3575.             1 Word with the number of colors to load
  3576.             1 Word with the first color to be loaded.
  3577.             3 longwords representing a left justified 32 bit rgb triplet.
  3578.             The list is terminated by a count value of 0.
  3579.  
  3580.        examples:
  3581.             ULONG table[]={1l<<16+0,0xffffffff,0,0,0} loads color register
  3582.                     0 with 100% red.
  3583.             ULONG table[]={256l<<16+0,r1,g1,b1,r2,g2,b2,.....0} can be used
  3584.                     to load an entire 256 color palette.
  3585.  
  3586.     Lower order bits of the palette specification will be discarded,
  3587.     depending on the color palette resolution of the target graphics
  3588.     device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
  3589.     etc. You can find out the palette range for your screen by
  3590.     querying the graphics data base.
  3591.  
  3592.     LoadRGB32 is faster than SetRGB32, even for one color.
  3593.  
  3594.    SEE ALSO
  3595.     LoadRGB4() GetColorMap() GetRGB32() SetRGB32CM() graphics/view.h
  3596. graphics.library/LoadRGB4                           graphics.library/LoadRGB4
  3597.  
  3598.    NAME
  3599.     LoadRGB4 -- Load RGB color values from table.
  3600.  
  3601.    SYNOPSIS
  3602.     LoadRGB4( vp, colors , count )
  3603.                  a0      a1     d0:16
  3604.  
  3605.     void LoadRGB4( struct ViewPort *, UWORD *, WORD);
  3606.  
  3607.    FUNCTION
  3608.        load the count words of the colormap from table starting at
  3609.     entry 0.
  3610.  
  3611.    INPUTS
  3612.     vp - pointer to ViewPort, whose colors you wish to change
  3613.     colors - pointer to table of RGB values set up as an array
  3614.              of USHORTS
  3615.              background--  0x0RGB
  3616.             color1      --  0x0RGB
  3617.             color2    --  0x0RGB
  3618.              etc.         UWORD per value.
  3619.         The colors are interpreted as 15 = maximum intensity.
  3620.                                       0 = minimum intensity.
  3621.     count    = number of UWORDs in the table to load into the
  3622.       colormap starting at color 0(background) and proceeding
  3623.       to the next higher color number
  3624.  
  3625.    RESULTS
  3626.     The ViewPort should have a pointer to a valid ColorMap to store
  3627.     the colors in.
  3628.     Updates the hardware copperlist to reflect the new colors.
  3629.     Updates the intermediate copperlist with the new colors.
  3630.  
  3631.    BUGS
  3632.  
  3633.     NOTE: Under V36 and up, it is not safe to call this function
  3634.     from an interrupt, due to semaphore protection of graphics
  3635.     copper lists.
  3636.  
  3637.    SEE ALSO
  3638.     SetRGB4() GetRGB4() GetColorMap() graphics/view.h
  3639.  
  3640. graphics.library/LoadView                           graphics.library/LoadView
  3641.  
  3642.    NAME
  3643.        LoadView -- Use a (possibly freshly created) coprocessor instruction
  3644.                    list to create the current display.
  3645.  
  3646.    SYNOPSIS
  3647.        LoadView( View )
  3648.                   A1
  3649.  
  3650.     void LoadView( struct View * );
  3651.  
  3652.    FUNCTION
  3653.     Install a new view to be displayed during the next display
  3654.     refresh pass.
  3655.        Coprocessor instruction list has been created by
  3656.        InitVPort(), MakeVPort(), and MrgCop().
  3657.  
  3658.    INPUTS
  3659.        View - a pointer to the View structure which contains the
  3660.        pointer to the constructed coprocessor instructions list, or NULL.
  3661.  
  3662.    RESULT
  3663.     If the View pointer is non-NULL, the new View is displayed, 
  3664.     according to your instructions.  The vertical blank routine 
  3665.     will pick this pointer up and direct the copper to start 
  3666.     displaying this View.
  3667.  
  3668.     If the View pointer is NULL, no View is displayed. 
  3669.  
  3670.    NOTE
  3671.     Even though a LoadView(NULL) is performed, display DMA will still be 
  3672.     active.  Sprites will continue to be displayed after a LoadView(NULL)
  3673.     unless an OFF_SPRITE is subsequently performed. 
  3674.  
  3675.    BUGS
  3676.  
  3677.    SEE ALSO
  3678.        InitVPort() MakeVPort() MrgCop() intuition/RethinkDisplay()
  3679.     graphics/view.h
  3680.  
  3681. graphics.library/LockLayerRom                   graphics.library/LockLayerRom
  3682.  
  3683.    NAME
  3684.     LockLayerRom -- Lock Layer structure by ROM(gfx lib) code.
  3685.  
  3686.    SYNOPSIS
  3687.     LockLayerRom( layer )
  3688.                a5
  3689.  
  3690.     void LockLayerRom( struct Layer * );
  3691.  
  3692.    FUNCTION
  3693.     Return when the layer is locked and no other task may
  3694.     alter the ClipRect structure in the Layer structure.
  3695.     This call does not destroy any registers.
  3696.     This call nests so that callers in this chain will not lock
  3697.     themselves out.
  3698.     Do not have the Layer locked during a call to intuition.
  3699.     There is a potential deadlock problem here, if intuition
  3700.     needs to get other locks as well.
  3701.     Having the layer locked prevents other tasks from using the
  3702.     layer library functions, most notably intuition itself. So
  3703.     be brief.
  3704.     layers.library's LockLayer is identical to LockLayerRom.
  3705.  
  3706.    INPUTS
  3707.     layer - pointer to Layer structure
  3708.  
  3709.    RESULTS
  3710.     The layer is locked and the task can render assuming the
  3711.     ClipRects will not change out from underneath it until
  3712.     an UnlockLayerRom is called.
  3713.  
  3714.    SEE ALSO
  3715.     UnlockLayerRom() layers.library/LockLayer() graphics/clip.h
  3716.  
  3717. graphics.library/MakeVPort                         graphics.library/MakeVPort
  3718.  
  3719.    NAME
  3720.     MakeVPort -- generate display copper list for a viewport.
  3721.  
  3722.    SYNOPSIS
  3723.     error =  MakeVPort( view, viewport )
  3724.      d0                   a0     a1
  3725.  
  3726.     ULONG MakeVPort( struct View *, struct ViewPort * );
  3727.  
  3728.    FUNCTION
  3729.     Uses information in the View, ViewPort, ViewPort->RasInfo to
  3730.     construct and intermediate copper list for this ViewPort.
  3731.  
  3732.    INPUTS
  3733.     view - pointer to a View structure
  3734.     viewport - pointer to a ViewPort structure
  3735.          The viewport must have valid pointer to a RasInfo.
  3736.  
  3737.    RESULTS
  3738.     constructs intermediate copper list and puts pointers in
  3739.     viewport.DspIns
  3740.     If the ColorMap ptr in ViewPort is NULL then it uses colors
  3741.     from the default color table.
  3742.     If DUALPF in Modes then there must be a second RasInfo pointed
  3743.     to by the first RasInfo
  3744.  
  3745.     From V39, MakeVPort can return a ULONG error value (previous versions
  3746.     returned void), to indicate that either not enough memory could be
  3747.     allocated for MakeVPort's use, or that the ViewPort mode
  3748.     and bitplane alignments are incorrect for the bitplane's depth.
  3749.  
  3750.     You should check for these error values - they are defined in
  3751.     <graphics/view.h>.
  3752.  
  3753.  
  3754.    BUGS
  3755.     In V37 and earlier, narrow Viewports (whose righthand edge is 
  3756.     less than 3/4 of the way across the display) do not work properly.
  3757.  
  3758.    SEE ALSO
  3759.     InitVPort() MrgCop() graphics/view.h intuition.library/MakeScreen()
  3760.     intuition.library/RemakeDisplay() intuition.library/RethinkDisplay()
  3761.  
  3762. graphics.library/ModeNotAvailable           graphics.library/ModeNotAvailable
  3763.  
  3764.    NAME
  3765.     ModeNotAvailable -- check to see if a DisplayID isn't available. (V36)
  3766.  
  3767.    SYNOPSIS
  3768.     error =  ModeNotAvailable( modeID )
  3769.     d0                   d0
  3770.  
  3771.     ULONG    ModeNotAvailable( ULONG);
  3772.  
  3773.    FUNCTION
  3774.     returns an error code, indicating why this modeID is not available, 
  3775.     or NULL if there is no reason known why this mode should not be there.
  3776.  
  3777.    INPUTS
  3778.     modeID -- a 32 bit DisplayInfoRecord identifier.
  3779.  
  3780.    RESULT
  3781.     error -- a general indication of why this modeID is not available,
  3782.          or NULL if there is no reason why it shouldn't be available.
  3783.  
  3784.    NOTE
  3785.     ULONG return values from this function are a proper superset of the
  3786.     DisplayInfo.NotAvailable field (defined in graphics/displayinfo.h).
  3787.  
  3788.    BUGS
  3789.  
  3790.    SEE ALSO
  3791.     graphics/displayinfo.h, GetVPModeID()
  3792.  
  3793. graphics.library/Move                                   graphics.library/Move
  3794.  
  3795.    NAME
  3796.     Move -- Move graphics pen position.
  3797.  
  3798.    SYNOPSIS
  3799.     Move( rp,   x,    y)
  3800.           a1  d0:16 d1:16
  3801.  
  3802.     void Move( struct RastPort *, SHORT, SHORT );
  3803.  
  3804.    FUNCTION
  3805.     Move graphics pen position to (x,y) relative to upper left (0,0)
  3806.     of RastPort. This sets the starting point for subsequent Draw()
  3807.     and Text() calls.
  3808.  
  3809.    INPUTS
  3810.     rp - pointer to a RastPort structure
  3811.     x,y - point in the RastPort
  3812.  
  3813.    RESULTS
  3814.  
  3815.    BUGS
  3816.  
  3817.    SEE ALSO
  3818.     Draw graphics/rastport.h
  3819.  
  3820. graphics.library/MoveSprite                       graphics.library/MoveSprite
  3821.  
  3822.    NAME
  3823.     MoveSprite -- Move sprite to a point relative to top of viewport.
  3824.  
  3825.    SYNOPSIS
  3826.     MoveSprite(vp, sprite, x, y)
  3827.                A0  A1      D0 D1
  3828.  
  3829.     void MoveSprite(struct ViewPort *,struct SimpleSprite *, WORD, WORD);
  3830.  
  3831.    FUNCTION
  3832.     Move sprite image to new place on display.
  3833.  
  3834.    INPUTS
  3835.     vp - pointer to ViewPort structure
  3836.          if vp = 0, sprite is positioned relative to View.
  3837.     sprite - pointer to SimpleSprite structure
  3838.     (x,y)  - new position relative to top of viewport or view.
  3839.  
  3840.    RESULTS
  3841.     Calculate the hardware information for the sprite and
  3842.     place it in the posctldata array. During next video display
  3843.     the sprite will appear in new position.
  3844.  
  3845.    BUGS
  3846.     Sprites really appear one pixel to the left of the position you specify.
  3847.     This bug affects the apparent display position of the sprite on the
  3848.     screen,    but does not affect the numeric position relative to the
  3849.     viewport or view. This behaviour only applies to SimpleSprites,
  3850.     not to ExtSprites.
  3851.  
  3852.  
  3853.    SEE ALSO
  3854.     FreeSprite()  ChangeSprite()  GetSprite()  graphics/sprite.h
  3855.  
  3856. graphics.library/MrgCop                               graphics.library/MrgCop
  3857.  
  3858.    NAME
  3859.        MrgCop -- Merge together coprocessor instructions.
  3860.  
  3861.    SYNOPSIS
  3862.        error = MrgCop( View )
  3863.        d0              A1
  3864.  
  3865.     ULONG MrgCop( struct View * );
  3866.  
  3867.    FUNCTION
  3868.        Merge together the display, color, sprite and user coprocessor
  3869.        instructions into a single coprocessor instruction stream.  This
  3870.        essentially creates a per-display-frame program for the coprocessor.
  3871.        This function MrgCop is used, for example, by the graphics animation
  3872.        routines which effectively add information into an essentially
  3873.        static background display.  This changes some of the user
  3874.        or sprite instructions, but not those which have formed the
  3875.        basic display in the first place.  When all forms of coprocessor
  3876.        instructions are merged together, you will have a complete per-
  3877.        frame instruction list for the coprocessor.
  3878.  
  3879.        Restrictions:  Each of the coprocessor instruction lists MUST be
  3880.        internally sorted in min to max Y-X order.  The merge routines
  3881.        depend on this! Each list must be terminated using CEND(copperlist).
  3882.  
  3883.    INPUTS
  3884.        View - a pointer to the view structure whose coprocessor
  3885.               instructions are to be merged.
  3886.  
  3887.    RESULT
  3888.        The view structure will now contain a complete, sorted/merged
  3889.        list of instructions for the coprocessor, ready to be used by
  3890.        the display processor.  The display processor is told to use
  3891.        this new instruction stream through the instruction LoadView().
  3892.  
  3893.     From V39, MrgCop() can return a ULONG error value (previous versions
  3894.     returned void), to indicate that either there was insufficient memory
  3895.     to build the system copper lists, or that MrgCop() had no work to do
  3896.     if, for example, there were no ViewPorts in the list.
  3897.  
  3898.     You should check for these error values - they are defined in
  3899.     <graphics/view.h>.
  3900.  
  3901.    BUGS
  3902.  
  3903.    SEE ALSO
  3904.        InitVPort() MakeVPort() LoadView() graphics/view.h
  3905.     intuition.library/RethinkDisplay()
  3906.  
  3907. graphics.library/NewRegion                         graphics.library/NewRegion
  3908.  
  3909.    NAME 
  3910.        NewRegion -- Get an empty region.
  3911.  
  3912.    SYNOPSIS 
  3913.        region = NewRegion()
  3914.     d0
  3915.  
  3916.     struct Region *NewRegion();
  3917.  
  3918.    FUNCTION 
  3919.     Create a Region structure, initialize it to empty, and return
  3920.     a pointer it.
  3921.  
  3922.    RESULTS
  3923.     region - pointer to initialized region. If it could not allocate
  3924.         required memory region = NULL.
  3925.  
  3926.    INPUTS 
  3927.     none
  3928.  
  3929.    BUGS 
  3930.  
  3931.    SEE ALSO
  3932.     graphics/regions.h
  3933.  
  3934. graphics.library/NextDisplayInfo             graphics.library/NextDisplayInfo
  3935.  
  3936.    NAME
  3937.     NextDisplayInfo -- iterate current displayinfo identifiers (V36)
  3938.  
  3939.    SYNOPSIS
  3940.     next_ID = NextDisplayInfo(last_ID)
  3941.     D0                        D0
  3942.  
  3943.     ULONG NextDisplayInfo(ULONG);
  3944.  
  3945.    FUNCTION
  3946.     The basic iteration function with which to find all records in the
  3947.     graphics database.  Using each ID in succession, you can then call
  3948.     FindDisplayInfo() to obtain the handle associated with each ID.
  3949.     Each ID is a 32-bit Key which uniquely identifies one record.
  3950.     The INVALID_ID is special, and indicates the end-of-list.
  3951.  
  3952.    INPUTS
  3953.     last_ID - previous displayinfo identifier
  3954.               or INVALID_ID if beginning iteration.
  3955.  
  3956.    RESULT
  3957.     next_ID - subsequent displayinfo identifier
  3958.               or INVALID_ID if no more records.
  3959.  
  3960.    BUGS
  3961.  
  3962.    SEE ALSO
  3963.     FindDisplayInfo(), GetDisplayInfoData()
  3964.     graphics/displayinfo.h
  3965.  
  3966. graphics.library/ObtainBestPenA               graphics.library/ObtainBestPenA
  3967.  
  3968.    NAME
  3969.     ObtainBestPenA --- Search for the closest color match, or allocate a
  3970.                        new one. (V39)
  3971.     ObtainBestPen  --- varargs stub for ObtainBestPenA
  3972.  
  3973.    SYNOPSIS
  3974.     color | -1 =ObtainBestPenA(  cm,  R,   G,    B,    taglist)
  3975.                                  a0   d1   d2    d3       a1
  3976.  
  3977.     LONG ObtainBestPenA( struct ColorMap *, ULONG, ULONG, 
  3978.             ULONG, struct TagItem *);
  3979.  
  3980.     color = ObtainBestPen(cm,r,g,b,tags....);
  3981.  
  3982.    INPUTS
  3983.     cm = colormap
  3984.     R = red level   (32 bit left justified fraction)
  3985.     G = green level (32 bit left justified fraction)
  3986.     B = blue level  (32 bit left justified fraction)
  3987.     taglist = a pointer to a standard tag list specifying the color
  3988.               matching settings desired:
  3989.  
  3990.             OBP_Precision - specifies the desired precision for the
  3991.                     match. Should be PRECISION_GUI, PRECISION_ICON, or
  3992.                     PRECISION_IMAGE or PRECISION_EXACT.
  3993.                     Defaults to PRECISION_IMAGE.
  3994.  
  3995.             OBP_FailIfBad - specifies that you want ObtainBestPen to return
  3996.                     a failure value if there is not a color within the
  3997.                     given tolerance, instead of returning the closest color.
  3998.                     With OBP_FailIfBad==FALSE, ObtainBestPen will only fail
  3999.                     if the ViewPort contains no sharable colors.
  4000.                     Defaults to FALSE.
  4001.  
  4002.  
  4003.    FUNCTION
  4004.     This function can be used by applications to figure out
  4005.     what pen to use to represent a given color.
  4006.  
  4007.     The system will attempt to find the color in your viewport closest
  4008.     to the specified color. If there is no color within your tolerance,
  4009.     then a new one will be allocated, if available. If none is available,
  4010.     then the closest one found will be returned. 
  4011.     
  4012.    RESULT
  4013.     The correct pen value, or -1 if no sharable palette entries are available.
  4014.  
  4015.  
  4016.    BUGS
  4017.  
  4018.    NOTES
  4019.     If this call succceeds, then you must call ReleasePen() when you are
  4020.     done with the color.
  4021.  
  4022.     The error metric used for ObtainBestPen() is based on the magnitude
  4023.     squared between the two RGB values, scaled by the percentage of free
  4024.     entries.
  4025.  
  4026.    SEE ALSO
  4027.     GetColorMap() ObtainPen() ReleasePen() 
  4028. graphics.library/ObtainPen                         graphics.library/ObtainPen
  4029.  
  4030.    NAME
  4031.     ObtainPen -- Obtain a free palette entry for use by your program. (V39)
  4032.  
  4033.  
  4034.    SYNOPSIS
  4035.     n = ObtainPen( cm, n, r, g, b, flags)
  4036.     d0           a0 d0  d1 d2 d3  d4
  4037.  
  4038.     LONG ObtainPen(struct ColorMap *,ULONG,ULONG,ULONG,ULONG,ULONG);
  4039.  
  4040.    FUNCTION
  4041.     Attempt to allocate an entry in the colormap for use by the application.
  4042.     If successful, you should ReleasePen() this entry after you have finished
  4043.     with it.
  4044.     
  4045.     Applications needing exclusive use of a color register (say for color
  4046.     cycling) will typically call this function with n=-1. Applications needing
  4047.     only the shared use of a color will typically use ObtainBestPenA() instead.
  4048.     Other uses of this function are rare.
  4049.  
  4050.    INPUTS
  4051.     cm  =  A pointer to a color map created by GetColorMap().
  4052.     n   =  The index of the desired entry, or -1 if any one is acceptable
  4053.     rgb =  The RGB values (32 bit left justified fractions) to set the new
  4054.            palette entry to.
  4055.     flags= PEN_EXCLUSIVE - tells the system that you want exclusive
  4056.            (non-shared) use of this pen value. Default is shared access.
  4057.  
  4058.            PEN_NO_SETCOLOR - tells the system to not change the rgb values
  4059.            for the selected pen. Really only makes sense for exclusive pens.
  4060.  
  4061.  
  4062.    RESULTS
  4063.  
  4064.     n   =  The allocated pen. -1 will be returned if there is no pen available
  4065.            for you.
  4066.  
  4067.    BUGS
  4068.  
  4069.    NOTES
  4070.     When you allocate a palette entry in non-exclusive mode, you
  4071.     should not change it (via SetRGB32), because other programs on the
  4072.     same screen may be using it. With PEN_EXCLUSIVE mode, you can
  4073.     change the returned entry at will.
  4074.  
  4075.     To avoid visual artifacts, you should not free up a palette
  4076.     entry until you are sure that your application is not displaying
  4077.     any pixels in that color at the time you free it. Otherwise, another
  4078.     task could allocate and set that color index, thus changing the colors
  4079.     of your pixels.
  4080.  
  4081.     Generally, for shared access, you should use ObtainBestPenA()
  4082.     instead, since it will not allocate a new color if there is one
  4083.     "close enough" to the one you want already.
  4084.     If there is no Palextra attached to the colormap, then this
  4085.     routine will always fail. 
  4086.  
  4087.    SEE ALSO
  4088.     GetColorMap() ReleasePen() AttachPalExtra() ObtainBestPenA()
  4089.  
  4090. graphics.library/OpenFont                           graphics.library/OpenFont
  4091.  
  4092.    NAME
  4093.     OpenFont -- Get a pointer to a system font.
  4094.  
  4095.    SYNOPSIS
  4096.     font = OpenFont(textAttr)
  4097.     D0              A0
  4098.  
  4099.     struct TextFont *OpenFont(struct TextAttr *);
  4100.  
  4101.    FUNCTION
  4102.     This function searches the system font space for the graphics
  4103.     text font that best matches the attributes specified.  The
  4104.     pointer to the font returned can be used in subsequent
  4105.     SetFont and CloseFont calls.  It is important to match this
  4106.     call with a corresponding CloseFont call for effective
  4107.     management of ram fonts.
  4108.  
  4109.    INPUTS
  4110.     textAttr - a TextAttr or TTextAttr structure that describes the
  4111.                text font attributes desired.
  4112.  
  4113.    RESULT
  4114.     font is zero if the desired font cannot be found.  If the named
  4115.     font is found, but the size and style specified are not
  4116.     available, a font with the nearest attributes is returned.
  4117.  
  4118.    BUGS
  4119.     Prior to V39 this function would return a TextFont pointer
  4120.     for any font which matched exactly in Y size, regardless of
  4121.     differences in DPI, or DotSize.
  4122.  
  4123.     As part of fixing this bug it is REQUIRED that you use pass the
  4124.     same TextAttr (or TTextAttr) to this function that was used when
  4125.     OpenDiskFont() was called.
  4126.  
  4127.     OpenFont(), and OpenDiskFont() use WeighTAMatch() to measure
  4128.     how well two fonts match.  WeightTAMatch() was a public function
  4129.     in graphics.library V36-V37; it is now a system PRIVATE function
  4130.     as of V39.
  4131.  
  4132.    SEE ALSO
  4133.     CloseFont()  SetFont()
  4134.     diskfont.library/OpenDiskFont  graphics/text.h
  4135.     intuition/intuition.h
  4136.  
  4137. graphics.library/OpenMonitor                     graphics.library/OpenMonitor
  4138.  
  4139.    NAME
  4140.        OpenMonitor -- open a named MonitorSpec (V36)
  4141.  
  4142.    SYNOPSIS
  4143.        mspc = OpenMonitor( monitor_name , display_id)
  4144.        d0                  a1           d0
  4145.  
  4146.        struct MonitorSpec *OpenMonitor( char *, ULONG );
  4147.  
  4148.    FUNCTION
  4149.        Locate and open a named MonitorSpec.
  4150.  
  4151.    INPUTS
  4152.        monitor_name - a pointer to a null terminated string.
  4153.        display_id - an optional 32 bit monitor/mode identifier 
  4154.  
  4155.    RESULTS
  4156.        mspc - a pointer to an open MonitorSpec structure.
  4157.               NULL if MonitorSpec could not  be opened.
  4158.  
  4159.    NOTE
  4160.     if monitor_name is non-NULL, the monitor will be opened by name.
  4161.     if monitor_name is NULL the monitor will be opened by optional ID.
  4162.     if both monitor_name and display_id are NULL returns default monitor.
  4163.  
  4164.    BUGS
  4165.  
  4166.    SEE ALSO
  4167.        CloseMonitor() graphics/monitor.h
  4168.  
  4169. graphics.library/OrRectRegion                   graphics.library/OrRectRegion
  4170.  
  4171.    NAME 
  4172.        OrRectRegion -- Perform 2d OR operation of rectangle
  4173.                        with region, leaving result in region.
  4174.  
  4175.    SYNOPSIS 
  4176.        status = OrRectRegion(region,rectangle) 
  4177.          d0                    a0      a1 
  4178.  
  4179.     BOOL OrRectRegion( struct Region *, struct Rectangle * );
  4180.  
  4181.    FUNCTION 
  4182.        If any portion of rectangle is not in the region then add
  4183.        that portion to the region.
  4184.  
  4185.    INPUTS 
  4186.        region - pointer to Region structure
  4187.        rectangle - pointer to Rectangle structure 
  4188.  
  4189.    RESULTS
  4190.     status - return TRUE if successful operation
  4191.          return FALSE if ran out of memory
  4192.  
  4193.    BUGS 
  4194.  
  4195.    SEE ALSO
  4196.     AndRectRegion() OrRegionRegion() graphics/regions.h
  4197.  
  4198. graphics.library/OrRegionRegion               graphics.library/OrRegionRegion
  4199.  
  4200.    NAME 
  4201.        OrRegionRegion -- Perform 2d OR operation of one region
  4202.                        with second region, leaving result in second region 
  4203.  
  4204.    SYNOPSIS 
  4205.        status = OrRegionRegion(region1,region2) 
  4206.          d0                       a0      a1 
  4207.  
  4208.     BOOL OrRegionRegion( struct Region *, struct Region * );
  4209.  
  4210.    FUNCTION 
  4211.        If any portion of region1  is not in the region then add
  4212.        that portion to the region2
  4213.  
  4214.    INPUTS 
  4215.        region1 - pointer to Region structure
  4216.        region2 - pointer to Region structure
  4217.  
  4218.    RESULTS
  4219.     status - return TRUE if successful operation
  4220.          return FALSE if ran out of memory
  4221.  
  4222.    BUGS 
  4223.  
  4224.    SEE ALSO
  4225.      OrRectRegion() graphics/regions.h
  4226.  
  4227. graphics.library/OwnBlitter                       graphics.library/OwnBlitter
  4228.  
  4229.    NAME
  4230.        OwnBlitter -- get the blitter for private usage
  4231.  
  4232.    SYNOPSIS
  4233.        OwnBlitter()
  4234.  
  4235.     void OwnBlitter( void );
  4236.  
  4237.    FUNCTION
  4238.     If blitter is available return immediately with the blitter
  4239.     locked for your exclusive use. If the blitter is not available
  4240.     put task to sleep. It will be awakened as soon as the blitter
  4241.     is available. When the task first owns the blitter the blitter
  4242.     may still be finishing up a blit for the previous owner. You
  4243.     must do a WaitBlit before actually using the blitter registers.
  4244.  
  4245.     Calls to OwnBlitter() do not nest. If a task that owns the
  4246.     blitter calls OwnBlitter() again, a lockup will result. 
  4247.     (Same situation if the task calls a system function
  4248.     that tries to own the blitter).
  4249.  
  4250.    INPUTS
  4251.     NONE
  4252.  
  4253.    RETURNS
  4254.     NONE
  4255.  
  4256.    SEE ALSO
  4257.     DisownBlitter() WaitBlit()
  4258. graphics.library/PolyDraw                           graphics.library/PolyDraw
  4259.  
  4260.    NAME
  4261.     PolyDraw -- Draw lines from table of (x,y) values.
  4262.  
  4263.    SYNOPSIS
  4264.     PolyDraw( rp, count , array )
  4265.           a1   d0      a0
  4266.  
  4267.     void PolyDraw( struct RastPort *, WORD, WORD * );
  4268.  
  4269.    FUNCTION
  4270.     starting with the first pair in the array, draw connected lines to
  4271.     it and every successive pair.
  4272.  
  4273.    INPUTS
  4274.     rp - pointer to RastPort structure
  4275.     count -  number of (x,y) pairs in the array
  4276.     array - pointer to first (x,y) pair
  4277.  
  4278.    BUGS
  4279.  
  4280.    SEE ALSO
  4281.     Draw() Move() graphics/rastport.h
  4282.  
  4283. graphics.library/QBlit                                 graphics.library/QBlit
  4284.  
  4285.    NAME
  4286.  
  4287.     QBlit -- Queue up a request for blitter usage
  4288.  
  4289.    SYNOPSIS
  4290.     QBlit( bp )
  4291.            a1
  4292.  
  4293.     void QBlit( struct bltnode * );
  4294.  
  4295.    FUNCTION
  4296.     Link a request for the use of the blitter to the end of the
  4297.        current blitter queue.  The pointer bp points to a blit structure
  4298.        containing, among other things, the link information, and the
  4299.        address of your routine which is to be called when the blitter
  4300.        queue finally gets around to this specific request.  When your
  4301.        routine is called, you are in control of the blitter ... it is
  4302.        not busy with anyone else's requests.  This means that you can
  4303.        directly specify the register contents and start the blitter.
  4304.        See the description of the blit structure and the uses of QBlit
  4305.        in the section titled Graphics Support in the OS Kernel Manual.
  4306.        Your code must be written to run either in supervisor or user
  4307.        mode on the 68000.
  4308.  
  4309.    INPUTS
  4310.     bp - pointer to a blit structure
  4311.  
  4312.    RESULT
  4313.     Your routine is called when the blitter is ready for you.
  4314.     In general requests for blitter usage through this channel are
  4315.     put in front of those who use the blitter via OwnBlitter and
  4316.     DisownBlitter. However for small blits there is more overhead
  4317.     using the queuer than Own/Disown Blitter.
  4318.  
  4319.    NOTES
  4320.     Code which uses QBlit(), or QBSBlit() should make use of
  4321.     the pointer to a cleanup routine in the bltnode structure.
  4322.     The cleanup routine may be called on the context of an
  4323.     interrupt, therefore the routine may set a flag, and signal
  4324.     a task, but it may not call FreeMem() directly.  Use of
  4325.     the cleanup routine is the only safe way to signal that
  4326.     your bltnode has completed.
  4327.  
  4328.    BUGS
  4329.     QBlit(), and QBSBlit() have been rewritten for V39 due to
  4330.     various long standing bugs in earlier versions of this code.
  4331.  
  4332.    SEE ALSO
  4333.     QBSBlit() hardware/blit.h
  4334.  
  4335. graphics.library/QBSBlit                             graphics.library/QBSBlit
  4336.  
  4337.    NAME
  4338.  
  4339.     QBSBlit -- Synchronize the blitter request with the video beam.
  4340.  
  4341.    SYNOPSIS
  4342.  
  4343.     QBSBlit( bsp )
  4344.          a1
  4345.  
  4346.     void QBSBlit( struct bltnode * );
  4347.  
  4348.    FUNCTION
  4349.     Call a user routine for use of the blitter, enqueued separately from
  4350.        the QBlit queue.  Calls the user routine contained in the blit
  4351.        structure when the video beam is located at a specified position
  4352.        onscreen.   Useful when you are trying to blit into a visible part
  4353.        of the screen and wish to perform the data move while the beam is
  4354.        not trying to display that same area.  (prevents showing part of
  4355.        an old display and part of a new display simultaneously).  Blitter
  4356.        requests on the QBSBlit queue take precedence over those on the
  4357.        regular blitter queue. The beam position is specified the blitnode.
  4358.  
  4359.    INPUTS
  4360.     bsp - pointer to a blit structure.  See description in the
  4361.              Graphics Support section of the manual for more info.
  4362.  
  4363.    RESULT
  4364.        User routine is called when the QBSBlit queue reaches this
  4365.        request AND the video beam is in the specified position.
  4366.        If there are lots of blits going on and the video beam
  4367.        has wrapped around back to the top it will call all the
  4368.        remaining bltnodes as fast as it can to try and catch up.
  4369.  
  4370.    NOTES
  4371.        QBlit(), and QBSBlit() have been rewritten for V39.  Queued
  4372.        blits are now handled in FIFO order.  Tasks trying to
  4373.        OwnBlitter() are now given a fair share of the total
  4374.        blitter time available.  QBSBlit() are no longer queued
  4375.        separately from nodes added by QBlit().  This fixes the
  4376.        ordering dependencies listed under BUGS in prior autodoc
  4377.        notes. 
  4378.  
  4379.    BUGS
  4380.  
  4381.    SEE ALSO
  4382.     QBlit() hardware/blit.h
  4383.  
  4384. graphics.library/ReadPixel                         graphics.library/ReadPixel
  4385.  
  4386.    NAME
  4387.        ReadPixel -- read the pen number value of the pixel at a
  4388.                     specified x,y location within a certain RastPort.
  4389.  
  4390.    SYNOPSIS
  4391.        penno = ReadPixel( rp,    x,    y )
  4392.          d0               a1  d0:16 d1:16
  4393.  
  4394.     LONG ReadPixel( struct RastPort *, SHORT, SHORT );
  4395.  
  4396.    FUNCTION
  4397.        Combine the bits from each of the bit-planes used to describe
  4398.        a particular RastPort into the pen number selector which that
  4399.        bit combination normally forms for the system hardware selection
  4400.        of pixel color.
  4401.  
  4402.    INPUTS
  4403.        rp -  pointer to a RastPort structure
  4404.        (x,y) a point in the RastPort
  4405.  
  4406.    RESULT
  4407.        penno - the pen number of the pixel at (x,y) is returned.
  4408.         -1 is returned if the pixel cannot be read for some reason.
  4409.  
  4410.    BUGS
  4411.  
  4412.    SEE ALSO
  4413.        WritePixel()    graphics/rastport.h
  4414.  
  4415. graphics.library/ReadPixelArray8             graphics.library/ReadPixelArray8
  4416.  
  4417.    NAME
  4418.     ReadPixelArray8 -- read the pen number value of a rectangular array
  4419.     of pixels starting at a specified x,y location and continuing 
  4420.     through to another x,y location within a certain RastPort. (V36)
  4421.  
  4422.    SYNOPSIS
  4423.     count = ReadPixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
  4424.     D0                      A0 D0:16  D1:16  D2:16 D3:16 A2    A1
  4425.  
  4426.      LONG ReadPixelArray8(struct  RastPort *, UWORD, UWORD, UWORD, UWORD,
  4427.        UBYTE *, struct RastPort *);
  4428.  
  4429.    FUNCTION
  4430.     For each pixel in a rectangular region, combine the bits from each
  4431.     of the bit-planes used to describe a particular RastPort into the pen
  4432.     number selector which that bit combination normally forms for the
  4433.     system hardware selection of pixel color.
  4434.  
  4435.    INPUTS
  4436.     rp    -  pointer to a RastPort structure
  4437.     (xstart,ystart) - starting point in the RastPort
  4438.     (xstop,ystop)   - stopping point in the RastPort
  4439.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  4440.             allocate at least ((((width+15)>>4)<<4)*(ystop-ystart+1)) bytes.
  4441.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  4442.              temporary memory allocated for
  4443.              temprp->BitMap with Rows set == 1,
  4444.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  4445.              and temporary memory allocated for 
  4446.              temprp->BitMap->Planes[])
  4447.  
  4448.    RESULT
  4449.     For each pixel in the array:
  4450.         Pen - (0..255) number at that position is returned
  4451.     count   - the number of pixels read.
  4452.  
  4453.    NOTE
  4454.     xstop must be >= xstart
  4455.     ystop must be >= ystart
  4456.  
  4457.    BUGS
  4458.  
  4459.    SEE ALSO
  4460.     ReadPixel()  ReadPixelLine8()  graphics/rastport.h
  4461.  
  4462. graphics.library/ReadPixelLine8               graphics.library/ReadPixelLine8
  4463.  
  4464.    NAME
  4465.     ReadPixelLine8 -- read the pen number value of a horizontal line
  4466.     of pixels starting at a specified x,y location and continuing
  4467.     right for count pixels. (V36)
  4468.  
  4469.    SYNOPSIS
  4470.     count = ReadPixelLine8(rp,xstart,ystart,width,array,temprp)
  4471.     D0                     A0 D0:16  D1:16  D2    A2    A1
  4472.  
  4473.     LONG ReadPixelLine8(struct RastPort *, UWORD, UWORD, UWORD,
  4474.          UBYTE *, struct RastPort * );
  4475.  
  4476.    FUNCTION
  4477.     For each pixel in a rectangular region, combine the bits from each
  4478.     of the bit-planes used to describe a particular RastPort into the pen
  4479.     number selector which that bit combination normally forms for the
  4480.     system hardware selection of pixel color.
  4481.  
  4482.    INPUTS
  4483.     rp    - pointer to a RastPort structure
  4484.     (x,y) - a point in the RastPort
  4485.     width - count of horizontal pixels to read
  4486.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  4487.             allocate at least (((width+15)>>4)<<4) bytes.
  4488.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  4489.              temporary memory allocated for
  4490.              temprp->BitMap with Rows set == 1,
  4491.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  4492.              and temporary memory allocated for 
  4493.              temprp->BitMap->Planes[])
  4494.  
  4495.    RESULT
  4496.     For each pixel in the array:
  4497.         Pen - (0..255) number at that position is returned
  4498.     count   - the number of pixels read.
  4499.  
  4500.    NOTE
  4501.     width must be non negative
  4502.  
  4503.    BUGS
  4504.  
  4505.    SEE ALSO
  4506.     ReadPixel()  graphics/rastport.h
  4507.  
  4508. graphics.library/RectFill                           graphics.library/RectFill
  4509.  
  4510.    NAME
  4511.        RectFill -- Fill a rectangular region in a RastPort.
  4512.  
  4513.    SYNOPSIS
  4514.  
  4515.     RectFill( rp, xmin, ymin, xmax, ymax)
  4516.                  a1  d0:16 d1:16 d2:16 d3:16
  4517.  
  4518.     void RectFill( struct RastPort *, SHORT, SHORT, SHORT, SHORT );
  4519.  
  4520.    FUNCTION
  4521.     Fills  the  rectangular  region  specified  by  the
  4522.     parameters  with the chosen pen  colors,  areafill
  4523.     pattern, and drawing mode. If no areafill pattern is
  4524.     specified, fill the rectangular region with the FgPen
  4525.     color, taking into account the drawing mode.
  4526.  
  4527.    INPUTS
  4528.     rp - pointer to a RastPort structure
  4529.     (xmin,ymin) (xmax,ymax) are the coordinates of the upper
  4530.         left corner and the lower right corner, respectively, of the
  4531.             rectangle.
  4532.    NOTE
  4533.  
  4534.     The following relation MUST be true:
  4535.         (xmax >= xmin) and (ymax >= ymin)  
  4536.  
  4537.    BUGS
  4538.     Complement mode with FgPen complements all bitplanes.
  4539.  
  4540.    SEE ALSO
  4541.     AreaEnd() graphics/rastport.h
  4542.  
  4543. graphics.library/ReleasePen                       graphics.library/ReleasePen
  4544.  
  4545.    NAME
  4546.     ReleasePen -- Release an allocated palette entry to the free pool. (V39)
  4547.  
  4548.  
  4549.    SYNOPSIS
  4550.     ReleasePen( cm, n)
  4551.                 a0 d0
  4552.  
  4553.     void ReleasePen( Struct ColorMap *, ULONG);
  4554.  
  4555.    FUNCTION
  4556.     Return the palette entry for use by other applications.
  4557.     If the reference count for this palette entry goes to zero,
  4558.     then it may be reset to another RGB value.
  4559.  
  4560.    INPUTS
  4561.        cm  =  A pointer to a color map created by GetColorMap().
  4562.  
  4563.     n   =  A palette index obtained via any of the palette allocation
  4564.            functions. Passing a -1 will result in this call doing
  4565.            nothing.
  4566.  
  4567.    BUGS
  4568.  
  4569.    NOTES
  4570.     This function works for both shared and exclusive palette entries.
  4571.  
  4572.    SEE ALSO
  4573.     GetColorMap() ObtainPen() ObtainBestPenA()
  4574.  
  4575. graphics.library/RemBob                               graphics.library/RemBob
  4576.  
  4577.    NAME
  4578.     RemBob -- Macro to remove a Bob from the gel list.
  4579.  
  4580.    SYNOPSIS
  4581.     RemBob(bob)
  4582.  
  4583.     RemBob(struct Bob *);
  4584.  
  4585.    FUNCTION
  4586.     Marks a Bob as no-longer-required.  The gels internal code then
  4587.     removes the Bob from the list of active gels the next time
  4588.     DrawGList is executed. This is implemented as a macro.
  4589.     If the user is double-buffering the Bob, it could take two
  4590.     calls to DrawGList before the Bob actually disappears from
  4591.     the RastPort.
  4592.  
  4593.    INPUTS
  4594.     Bob = pointer to the Bob to be removed
  4595.  
  4596.    RESULT
  4597.  
  4598.    BUGS
  4599.  
  4600.    SEE ALSO
  4601.     RemIBob()  DrawGList()  graphics/gels.h  graphics/gfxmacros.h
  4602.  
  4603. graphics.library/RemFont                             graphics.library/RemFont
  4604.  
  4605.    NAME
  4606.     RemFont -- Remove a font from the system list.
  4607.  
  4608.    SYNOPSIS
  4609.     RemFont(textFont)
  4610.             A1
  4611.  
  4612.     void RemFont(struct TextFont *);
  4613.  
  4614.    FUNCTION
  4615.     This function removes a font from the system, ensuring that
  4616.     access to it is restricted to those applications that
  4617.     currently have an active pointer to it: i.e. no new SetFont
  4618.     requests to this font are satisfied.
  4619.  
  4620.    INPUTS
  4621.     textFont - the TextFont structure to remove.
  4622.  
  4623.    RESULT
  4624.  
  4625.    BUGS
  4626.  
  4627.    SEE ALSO
  4628.     SetFont()  AddFont()  graphics/text.h
  4629.  
  4630. graphics.library/RemIBob                             graphics.library/RemIBob
  4631.  
  4632.    NAME
  4633.     RemIBob -- Immediately remove a Bob from the gel list and the RastPort.
  4634.  
  4635.    SYNOPSIS
  4636.     RemIBob(bob, rp, vp)
  4637.             A0   A1  A2
  4638.  
  4639.     void RemIBob(struct Bob *, struct RastPort *, struct ViewPort *);
  4640.  
  4641.    FUNCTION
  4642.     Removes a Bob immediately by uncoupling it from the gel list and
  4643.     erases it from the RastPort.
  4644.  
  4645.    INPUTS
  4646.     bob = pointer to the Bob to be removed
  4647.     rp  = pointer to the RastPort if the Bob is to be erased
  4648.     vp  = pointer to the ViewPort for beam-synchronizing
  4649.  
  4650.    RESULT
  4651.  
  4652.    BUGS
  4653.  
  4654.    SEE ALSO
  4655.     InitGels()  RemVSprite()  graphics/gels.h
  4656.  
  4657. graphics.library/RemVSprite                       graphics.library/RemVSprite
  4658.  
  4659.    NAME
  4660.     RemVSprite -- Remove a VSprite from the current gel list.
  4661.  
  4662.    SYNOPSIS
  4663.     RemVSprite(vs)
  4664.                A0
  4665.  
  4666.     void RemVSprite(struct VSprite *);
  4667.  
  4668.    FUNCTION
  4669.     Unlinks the VSprite from the current gel list.
  4670.  
  4671.    INPUTS
  4672.     vs = pointer to the VSprite structure to be removed from the gel list
  4673.  
  4674.    RESULT
  4675.  
  4676.    BUGS
  4677.  
  4678.    SEE ALSO
  4679.     InitGels()  RemIBob()  graphics/gels.h
  4680.  
  4681. graphics.library/ScalerDiv                         graphics.library/ScalerDiv
  4682.  
  4683.    NAME
  4684.     ScalerDiv -- Get the scaling result that BitMapScale would. (V36)
  4685.  
  4686.    SYNOPSIS
  4687.     result = ScalerDiv(factor, numerator, denominator)
  4688.     D0                 D0      D1         D2
  4689.  
  4690.     UWORD ScalerDiv(UWORD, UWORD, UWORD);
  4691.  
  4692.    FUNCTION
  4693.     Calculate the expression (factor*numerator/denominator) such
  4694.     that the result is the same as the width of the destination
  4695.     result of BitMapScale when the factor here is the width of
  4696.     the source, and the numerator and denominator are the
  4697.     XDestFactor and XSrcFactor for BitMapScale.
  4698.  
  4699.    INPUTS
  4700.     factor                 - a number in the range 0..16383
  4701.     numerator, denominator - numbers in the range 1..16383
  4702.  
  4703.    RESULT
  4704.     this returns factor*numerator/denominator
  4705.  
  4706. graphics.library/ScrollRaster                   graphics.library/ScrollRaster
  4707.  
  4708.    NAME
  4709.    ScrollRaster -- Push bits in rectangle in raster around by
  4710.                    dx,dy towards 0,0 inside rectangle.
  4711.    SYNOPSIS
  4712.    ScrollRaster(rp, dx, dy, xmin, ymin, xmax, ymax)
  4713.                 A1  D0  D1  D2    D3    D4    D5
  4714.  
  4715.    void ScrollRaster
  4716.         (struct RastPort *, WORD, WORD, WORD, WORD, WORD, WORD);
  4717.  
  4718.    FUNCTION
  4719.    Move the bits in the raster by (dx,dy) towards (0,0)
  4720.    The space vacated is RectFilled with BGPen.
  4721.    Limit the scroll operation to the rectangle defined
  4722.    by (xmin,ymin)(xmax,ymax). Bits outside will not be
  4723.    affected. If xmax,ymax is outside the rastport then use
  4724.    the lower right corner of the rastport.
  4725.    If you are dealing with a SimpleRefresh layered RastPort you
  4726.    should check rp->Layer->Flags & LAYERREFRESH to see if
  4727.    there is any damage in the damage list.  If there is you should
  4728.    call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
  4729.    routine sequence.
  4730.  
  4731.    INPUTS
  4732.    rp - pointer to a RastPort structure
  4733.    dx,dy are integers that may be positive, zero, or negative
  4734.    xmin,ymin - upper left of bounding rectangle
  4735.    xmax,ymax - lower right of bounding rectangle
  4736.  
  4737.    EXAMPLE
  4738.    ScrollRaster(rp,0,1,minx,miny,maxx,maxy) /* shift raster up by one row */
  4739.    ScrollRaster(rp,-1,-1,minx,miny,maxx,maxy)
  4740.           /* shift raster down and to the right by 1 pixel
  4741.  
  4742.    BUGS
  4743.    In 1.2/V1.3 if you ScrollRaster a SUPERBITMAP exactly left or 
  4744.    right, and there is no TmpRas attached to the RastPort, the system
  4745.    will allocate one for you, but will never free it or record its 
  4746.    location. This bug has been fixed for V36.  The workaround for
  4747.    1.2/1.3 is to attach a valid TmpRas of size at least 
  4748.    MAXBYTESPERROW to the RastPort before the call.
  4749.  
  4750.    Beginning with V36 ScrollRaster adds the shifted areas into the 
  4751.    damage list for SIMPLE_REFRESH windows. Due to unacceptable 
  4752.    system overhead, the decision was made NOT to propagate this 
  4753.    shifted area damage for SMART_REFRESH windows.
  4754.  
  4755.    SEE ALSO
  4756.    ScrollRasterBF() graphics/rastport.h
  4757.  
  4758. graphics.library/ScrollRasterBF               graphics.library/ScrollRasterBF
  4759.  
  4760.    NAME
  4761.    ScrollRasterBF -- Push bits in rectangle in raster around by
  4762.                    dx,dy towards 0,0 inside rectangle. Newly empty areas
  4763.            will be filled via EraseRect(). (V39)
  4764.  
  4765.    SYNOPSIS
  4766.    ScrollRasterBF(rp, dx, dy, xmin, ymin, xmax, ymax)
  4767.                 A1  D0  D1  D2    D3    D4    D5
  4768.  
  4769.    void ScrollRasterBF
  4770.         (struct RastPort *, WORD, WORD, WORD, WORD, WORD, WORD);
  4771.  
  4772.    FUNCTION
  4773.    Move the bits in the raster by (dx,dy) towards (0,0)
  4774.    The space vacated is filled by calling EraseRect().
  4775.    Limit the scroll operation to the rectangle defined
  4776.    by (xmin,ymin)(xmax,ymax). Bits outside will not be
  4777.    affected. If xmax,ymax is outside the rastport then use
  4778.    the lower right corner of the rastport.
  4779.    If you are dealing with a SimpleRefresh layered RastPort you
  4780.    should check rp->Layer->Flags & LAYERREFRESH to see if
  4781.    there is any damage in the damage list.  If there is you should
  4782.    call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
  4783.    routine sequence.
  4784.  
  4785.    INPUTS
  4786.    rp - pointer to a RastPort structure
  4787.    dx,dy are integers that may be positive, zero, or negative
  4788.    xmin,ymin - upper left of bounding rectangle
  4789.    xmax,ymax - lower right of bounding rectangle
  4790.  
  4791.    NOTES
  4792.  
  4793.    This call is exactly the same as ScrollRaster, except that it calls
  4794.    EraseRect() instead of RectFill() when clearing the newly exposed
  4795.    area. This allows use of a custom layer backfill hook.
  4796.  
  4797.    BUGS
  4798.  
  4799.    SEE ALSO
  4800.    ScrollRaster() EraseRect() intuition.library/ScrollWindowRaster() 
  4801.    graphics/rastport.h
  4802.  
  4803. graphics.library/ScrollVPort                     graphics.library/ScrollVPort
  4804.  
  4805.    NAME
  4806.     ScrollVPort -- Reinterpret RasInfo information in ViewPort to reflect
  4807.             the current Offset values.
  4808.  
  4809.    SYNOPSIS
  4810.     ScrollVPort( vp )
  4811.              a0
  4812.  
  4813.     void ScrollVPort(struct ViewPort *vp);
  4814.  
  4815.    FUNCTION
  4816.     After the programmer has adjusted the Offset values in
  4817.     the RasInfo structures of ViewPort, change the
  4818.     the copper lists to reflect the the Scroll positions.
  4819.     Changing the BitMap ptr in RasInfo and not changing the
  4820.     the Offsets will effect a double buffering affect.
  4821.  
  4822.    INPUTS
  4823.        vp - pointer to a ViewPort structure
  4824.          that is currently be displayed.
  4825.    RESULTS
  4826.     modifies hardware and intermediate copperlists to reflect
  4827.     new RasInfo
  4828.  
  4829.    BUGS
  4830.        pokes not fast enough to avoid some visible hashing of display (V37)
  4831.     This function was re-written in V39 and is ~10 times faster than
  4832.     before.
  4833.  
  4834.    SEE ALSO
  4835.     MakeVPort() MrgCop() LoadView()  graphics/view.h
  4836.  
  4837. graphics.library/SetABPenDrMd                   graphics.library/SetABPenDrMd
  4838.  
  4839.    NAME   
  4840.      SetABPenDrMd -- Set pen colors and draw mode for a RastPort.
  4841.  
  4842.    SYNOPSIS
  4843.     SetABPenDrMd( rp, apen, bpen, mode )
  4844.                    a1  d0     d1    d2
  4845.  
  4846.     void SetABPenDrMd( struct RastPort *, ULONG, ULONG, ULONG );
  4847.  
  4848.    FUNCTION
  4849.     Set the pen values and drawing mode for lines, fills and text.
  4850.     Get the bit definitions from rastport.h
  4851.  
  4852.    INPUTS
  4853.     rp - pointer to RastPort structure.
  4854.     apen - primary pen value
  4855.     bpen - secondary pen value
  4856.     mode - 0-255, some combinations may not make much sense.
  4857.  
  4858.    RESULT
  4859.     The mode set is dependent on the bits selected.
  4860.     Changes minterms to reflect new drawing mode and colors.
  4861.     Sets line drawer to restart pattern.
  4862.  
  4863.     NOTES
  4864.     This call is essentially the same as a sequence of
  4865.     SetAPen()/SetBPen()/SetDrMD() calls, except that it is
  4866.     significantly faster. The minterms will only be generated
  4867.     once, or not at all if nothing changed (warning to illegal
  4868.     RastPort pokers!).
  4869.  
  4870.    BUGS
  4871.  
  4872.    SEE ALSO
  4873.     SetAPen() SetBPen() SetDrMd() graphics/rastport.h
  4874.  
  4875. graphics.library/SetAPen                             graphics.library/SetAPen
  4876.  
  4877.    NAME   
  4878.     SetAPen -- Set the primary pen for a RastPort.
  4879.  
  4880.    SYNOPSIS
  4881.     SetAPen( rp, pen )
  4882.          a1  d0
  4883.  
  4884.     void SetAPen( struct RastPort *, UBYTE );
  4885.  
  4886.    FUNCTION
  4887.     Set the primary drawing pen for lines, fills, and text.
  4888.  
  4889.    INPUTS
  4890.     rp - pointer to RastPort structure.
  4891.     pen - (0-255)
  4892.  
  4893.    RESULT
  4894.     Changes the minterms in the RastPort to reflect new primary pen.
  4895.     Sets line drawer to restart pattern.
  4896.  
  4897.    BUGS
  4898.  
  4899.    SEE ALSO
  4900.     SetBPen() graphics/rastport.h
  4901.  
  4902. graphics.library/SetBPen                             graphics.library/SetBPen
  4903.  
  4904.    NAME   
  4905.     SetBPen -- Set secondary pen for a RastPort
  4906.  
  4907.    SYNOPSIS
  4908.     SetBPen( rp, pen )
  4909.          a1  d0
  4910.  
  4911.     void SetBPen( struct RastPort *, UBYTE );
  4912.  
  4913.    FUNCTION
  4914.     Set the secondary drawing pen for lines, fills, and text.
  4915.  
  4916.    INPUTS
  4917.     rp - pointer to RastPort structure.
  4918.     pen - (0-255)
  4919.  
  4920.    RESULT
  4921.     Changes the minterms in the RastPort to reflect new secondary pen.
  4922.     Sets line drawer to restart pattern.
  4923.  
  4924.    BUGS
  4925.  
  4926.     SEE ALSO
  4927.     SetAPen() graphics/rastport.h
  4928.  
  4929. graphics.library/SetChipRev                       graphics.library/SetChipRev
  4930.  
  4931.    NAME
  4932.     SetChipRev -- turns on the features of a Chip Set  (V39)
  4933.  
  4934.    SYNOPSIS
  4935.     chiprevbits = SetChipRev(ChipRev)
  4936.                                d0
  4937.  
  4938.     ULONG SetChipRev(ULONG);
  4939.  
  4940.    FUNCTION
  4941.     Enables the features of the requested Chip Set if available,
  4942.     and updates the graphics database accordingly.
  4943.  
  4944.    INPUTS
  4945.     ChipRev - Chip Rev that you would like to be enabled.
  4946.  
  4947.    RESULT
  4948.     chiprevbits - Actual bits set in GfxBase->ChipRevBits0.
  4949.  
  4950.    NOTES
  4951.     This routine should only be called once. It will be called by the system
  4952.     in the startup-sequence, but is included in the autodocs for authors
  4953.     of bootblock-games that wish to take advantage of post-ECS features.
  4954.  
  4955.    SEE ALSO
  4956.     <graphics/gfxbase.h>
  4957.  
  4958. graphics.library/SetCollision                   graphics.library/SetCollision
  4959.  
  4960.    NAME
  4961.     SetCollision -- Set a pointer to a user collision routine.
  4962.  
  4963.    SYNOPSIS
  4964.     SetCollision(num, routine, GInfo)
  4965.                  D0   A0       A1
  4966.  
  4967.     void SetCollision(ULONG, VOID (*)(), struct GelsInfo *);
  4968.  
  4969.    FUNCTION
  4970.     Sets a specified entry (num) in the user's collision vectors table
  4971.     equal to the address of the specified collision routine.
  4972.  
  4973.    INPUTS
  4974.     num     = collision vector number
  4975.     routine = pointer to the user's collision routine
  4976.     GInfo   = pointer to a GelsInfo structure
  4977.  
  4978.    RESULT
  4979.  
  4980.    BUGS
  4981.  
  4982.    SEE ALSO
  4983.     InitGels()  graphics/gels.h  graphics/rastport.h
  4984.  
  4985. graphics.library/SetDrMd                             graphics.library/SetDrMd
  4986.  
  4987.    NAME   
  4988.      SetDrMd -- Set drawing mode for a RastPort
  4989.  
  4990.    SYNOPSIS
  4991.     SetDrMd( rp, mode )
  4992.          a1  d0:8
  4993.  
  4994.     void SetDrMd( struct RastPort *, UBYTE );
  4995.  
  4996.    FUNCTION
  4997.     Set the drawing mode for lines, fills and text.
  4998.     Get the bit definitions from rastport.h
  4999.  
  5000.    INPUTS
  5001.     rp - pointer to RastPort structure.
  5002.     mode - 0-255, some combinations may not make much sense.
  5003.  
  5004.    RESULT
  5005.     The mode set is dependent on the bits selected.
  5006.     Changes minterms to reflect new drawing mode.
  5007.     Sets line drawer to restart pattern.
  5008.  
  5009.    BUGS
  5010.  
  5011.    SEE ALSO
  5012.     SetAPen() SetBPen() graphics/rastport.h
  5013.  
  5014. graphics.library/SetFont                             graphics.library/SetFont
  5015.  
  5016.    NAME
  5017.     SetFont -- Set the text font and attributes in a RastPort.
  5018.  
  5019.    SYNOPSIS
  5020.     SetFont(rp, font)
  5021.             A1   A0
  5022.  
  5023.     void SetFont(struct RastPort *, struct TextFont *);
  5024.  
  5025.    FUNCTION
  5026.     This function sets the font in the RastPort to that described
  5027.     by font, and updates the text attributes to reflect that
  5028.     change.  This function clears the effect of any previous
  5029.     soft styles.
  5030.  
  5031.    INPUTS
  5032.     rp   - the RastPort in which the text attributes are to be changed
  5033.     font - pointer to a TextFont structure returned from OpenFont()
  5034.            or OpenDiskFont()
  5035.  
  5036.    RESULT
  5037.  
  5038.    NOTES
  5039.     This function had previously been documented that it would
  5040.     accept a null font.  This practice is discouraged.
  5041.     o   Use of a RastPort with a null font with text routines has
  5042.         always been incorrect and risked the guru.
  5043.     o   Keeping an obsolete font pointer in the RastPort is no more
  5044.         dangerous than keeping a zero one there.
  5045.     o   SetFont(rp, 0) causes spurious low memory accesses under
  5046.         some system software releases.
  5047.  
  5048.     As of V36, the following Amiga font variants are no longer
  5049.     directly supported:
  5050.         fonts with NULL tf_CharSpace and non-NULL tf_CharKern.
  5051.         fonts with non-NULL tf_CharSpace and NULL tf_CharKern.
  5052.         fonts with NULL tf_CharSpace and NULL tf_CharKern with
  5053.         a tf_CharLoc size component greater than tf_XSize.
  5054.     Attempts to SetFont these one of these font variants will
  5055.     cause the system to modify your font to make it acceptable.
  5056.  
  5057.    BUGS
  5058.     Calling SetFont() on in-code TextFonts (ie fonts not
  5059.     OpenFont()ed) will result in a loss of 24 bytes from
  5060.     the system as of V36.
  5061.     This can be resolved by calling StripFont().
  5062.  
  5063.    SEE ALSO
  5064.     OpenFont()  StripFont()
  5065.     diskfont.library/OpenDiskFont()  graphics/text.h
  5066.  
  5067. graphics.library/SetMaxPen                         graphics.library/SetMaxPen
  5068.  
  5069.    NAME
  5070.        SetMaxPen -- set maximum pen value for a rastport (V39).
  5071.  
  5072.  
  5073.    SYNOPSIS
  5074.        SetMaxPen ( rp, maxpen)
  5075.                a0   d0
  5076.  
  5077.     void SetMaxPen(struct RastPort *,ULONG)
  5078.  
  5079.    FUNCTION
  5080.     This will instruct the graphics library that the owner of the rastport
  5081.     will not be rendering in any colors whose index is >maxpen. If there
  5082.     are any speed optimizations which the graphics device can make based
  5083.     on this fact (for instance, setting the pixel write mask), they will
  5084.     be done.
  5085.  
  5086.     Basically this call sets the rastport mask, if this would improve
  5087.     speed. On devices where masking would slow things down (like with
  5088.     chunky pixels), it will be a no-op.
  5089.  
  5090.    INPUTS
  5091.        rp  =  a pointer to a valid RastPort structure.
  5092.     maxpen =  a longword pen value. 
  5093.  
  5094.    BUGS
  5095.  
  5096.    NOTES
  5097.     The maximum pen value passed must take into account not only which
  5098.     colors you intend to render in the future, but what colors you will
  5099.     be rendering on top of.
  5100.     SetMaxPen(rp,0) doesn't make much sense.
  5101.  
  5102.    SEE ALSO
  5103.     SetWriteMask()
  5104.  
  5105. graphics.library/SetOPen                             graphics.library/SetOPen
  5106.  
  5107.    NAME
  5108.     SetOPen -- Change the Area OutLine pen and turn on Outline
  5109.             mode for areafills.
  5110.  
  5111.    SYNOPSIS
  5112.     SetOPen(rp, pen)
  5113.  
  5114.     void SetOPen( struct RastPort *, UBYTE );
  5115.  
  5116.    FUNCTION
  5117.     This is implemented as a c-macro.
  5118.     Pen is the pen number that will be used to draw a border
  5119.     around an areafill during AreaEnd().
  5120.  
  5121.    INPUTS
  5122.     rp = pointer to RastPort structure
  5123.     pen = number  between 0-255
  5124.  
  5125.    BUGS
  5126.  
  5127.    SEE ALSO
  5128.     AreaEnd() graphics/gfxmacros.h graphics/rastport.h
  5129.  
  5130. graphics.library/SetOutlinePen                 graphics.library/SetOutlinePen
  5131.  
  5132.    NAME
  5133.        SetOutlinePen -- Set the Outline Pen value for a RastPort (V39).
  5134.  
  5135.  
  5136.    SYNOPSIS
  5137.        old_pen=SetOutlinePen  ( rp, pen )
  5138.       d0                     a0   d0
  5139.  
  5140.     ULONG SetOutlinePen(struct RastPort *,ULONG)
  5141.  
  5142.    FUNCTION
  5143.     Set the current value of the O pen for the rastport and turn on area outline
  5144.     mode. This function should be used instead of poking the structure directly,
  5145.     because future graphics devices may store it differently, for instance,
  5146.     using more bits.
  5147.  
  5148.    INPUTS
  5149.        rp  =  a pointer to a valid RastPort structure.
  5150.     pen =  a longword pen number
  5151.  
  5152.     returns the previous outline pen
  5153.    BUGS
  5154.  
  5155.    NOTES
  5156.  
  5157.    SEE ALSO
  5158.     GetOPen() graphics/gfxmacros.h
  5159.  
  5160. graphics.library/SetRast                             graphics.library/SetRast
  5161.  
  5162.    NAME
  5163.        SetRast - Set an entire drawing area to a specified color.
  5164.  
  5165.    SYNOPSIS
  5166.        SetRast( rp, pen )
  5167.                 a1  d0
  5168.  
  5169.     void SetRast( struct RastPort *, UBYTE );
  5170.  
  5171.    FUNCTION
  5172.        Set the entire contents of the specified RastPort to the
  5173.        specified pen.
  5174.  
  5175.    INPUTS
  5176.        rp - pointer to RastPort structure
  5177.        pen - the pen number (0-255) to jam into bitmap
  5178.  
  5179.    RESULT
  5180.        All pixels within the drawing area are set to the
  5181.     selected pen number.
  5182.  
  5183.    BUGS
  5184.  
  5185.    SEE ALSO
  5186.     RectFill() graphics/rastport.h
  5187.  
  5188. graphics.library/SetRGB32                           graphics.library/SetRGB32
  5189.  
  5190.    NAME
  5191.     SetRGB32 -- Set one color register for this Viewport. (V39)
  5192.  
  5193.    SYNOPSIS
  5194.     SetRGB32(  vp,  n,   r,    g,    b)
  5195.                a0  d0   d1    d2    d3
  5196.  
  5197.     void SetRGB32( struct ViewPort *, ULONG, ULONG, ULONG, ULONG );
  5198.  
  5199.    INPUTS
  5200.     vp = viewport
  5201.     n = the number of the color register to set.
  5202.     r = red level   (32 bit left justified fraction)
  5203.     g = green level (32 bit left justified fraction)
  5204.     b = blue level  (32 bit left justified fraction)
  5205.  
  5206.    RESULT
  5207.     If there is a ColorMap for this viewport, then the value will
  5208.     be stored in the ColorMap.
  5209.     The selected color register is changed to match your specs.
  5210.     If the color value is unused then nothing will happen.
  5211.  
  5212.    BUGS
  5213.  
  5214.    NOTES
  5215.     Lower order bits of the palette specification will be discarded,
  5216.     depending on the color palette resolution of the target graphics
  5217.     device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
  5218.     etc. You can find out the palette range for your screen by
  5219.     querying the graphics data base.
  5220.  
  5221.    SEE ALSO
  5222.     GetColorMap() GetRGB32() SetRGB32CM() LoadRGB32() graphics/view.h
  5223. graphics.library/SetRGB32CM                       graphics.library/SetRGB32CM
  5224.  
  5225.    NAME
  5226.        SetRGB32CM -- Set one color register for this ColorMap. (V39)
  5227.  
  5228.    SYNOPSIS
  5229.        SetRGB32CM(  cm,  n,   r,    g,    b)
  5230.                     a0  d0   d1    d2    d3
  5231.  
  5232.        void SetRGB4CM( struct ColorMap *, ULONG, ULONG, ULONG , ULONG);
  5233.  
  5234.    INPUTS
  5235.     cm = colormap
  5236.        n = the number of the color register to set. Must not exceed the numbe
  5237. r of colors
  5238.         allocated for the colormap.
  5239.        r = red level (32 bit unsigned left justified fraction)
  5240.        g = green level
  5241.        b = blue level
  5242.  
  5243.    RESULT
  5244.     Store the (r,g,b) triplet at index n of the ColorMap structure.
  5245.        This function can be used to set up a ColorMap before before
  5246.     linking it into a viewport.
  5247.  
  5248.    BUGS
  5249.  
  5250.    SEE ALSO
  5251.        GetColorMap() GetRGB32() SetRGB32() SetRGB4CM() graphics/view.h
  5252. graphics.library/SetRGB4                             graphics.library/SetRGB4
  5253.  
  5254.     NAME
  5255.        SetRGB4 -- Set one color register for this viewport.
  5256.  
  5257.     SYNOPSIS
  5258.        SetRGB4(  vp, n,   r,    g,    b)
  5259.                  a0  d0  d1:4  d2:4  d3:4
  5260.  
  5261.     void SetRGB4( struct ViewPort *, SHORT, UBYTE, UBYTE, UBYTE );
  5262.  
  5263.     FUNCTION
  5264.     Change the color look up table so that this viewport displays
  5265.     the color (r,g,b) for pen number n.
  5266.  
  5267.     INPUTS
  5268.     vp - pointer to  viewport structure
  5269.        n - the color number (range from 0 to 31)
  5270.        r - red level (0-15)
  5271.        g - green level (0-15)
  5272.        b - blue level (0-15)
  5273.  
  5274.     RESULT
  5275.     If there is a ColorMap for this viewport, then the value will
  5276.     be stored in the ColorMap.
  5277.        The selected color register is changed to match your specs.
  5278.     If the color value is unused then nothing will happen.
  5279.  
  5280.     BUGS
  5281.  
  5282.     NOTE: Under V36 and up, it is not safe to call this function
  5283.     from an interrupt, due to semaphore protection of graphics
  5284.     copper lists.
  5285.  
  5286.     SEE ALSO
  5287.        LoadRGB4() GetRGB4() graphics/view.h
  5288. graphics.library/SetRGB4CM                         graphics.library/SetRGB4CM
  5289.  
  5290.    NAME
  5291.        SetRGB4CM -- Set one color register for this ColorMap.
  5292.  
  5293.    SYNOPSIS
  5294.        SetRGB4CM(  cm,  n,   r,    g,    b)
  5295.                    a0  d0  d1:4  d2:4  d3:4
  5296.  
  5297.        void SetRGB4CM( struct ColorMap *, SHORT, UBYTE, UBYTE, UBYTE );
  5298.  
  5299.    INPUTS
  5300.     cm = colormap
  5301.        n = the number of the color register to set. Ranges from 0 to 31
  5302.         on current Amiga displays.
  5303.        r = red level (0-15)
  5304.        g = green level (0-15)
  5305.        b = blue level (0-15)
  5306.  
  5307.    RESULT
  5308.     Store the (r,g,b) triplet at index n of the ColorMap structure.
  5309.        This function can be used to set up a ColorMap before before
  5310.     linking it into a viewport.
  5311.  
  5312.    BUGS
  5313.  
  5314.    SEE ALSO
  5315.        GetColorMap() GetRGB4() SetRGB4() graphics/view.h
  5316. graphics.library/SetRPAttrA                       graphics.library/SetRPAttrA
  5317.  
  5318.    NAME
  5319.        SetRPAttrA -- modify rastport settings via a tag list
  5320.     SetRPAttrs  -- varargs stub for SetRPAttrA
  5321.  
  5322.    SYNOPSIS
  5323.        SetRPAttrA(rp,tags)
  5324.                   a0   a1
  5325.  
  5326.     void SetRPAttrA(struct RastPort *, struct TagItem *);
  5327.  
  5328.     SetRPAttrs(rp,tag,...);
  5329.  
  5330.    FUNCTION
  5331.        Modify settings of a rastport, based on the taglist passed.
  5332.     currently available tags are:
  5333.  
  5334.         RPTAG_Font        Font for Text()
  5335.         RPTAG_SoftStyle        style for text (see graphics/text.h)
  5336.         RPTAG_APen        Primary rendering pen
  5337.         RPTAG_BPen        Secondary rendering pen
  5338.         RPTAG_DrMd         Drawing mode (see graphics/rastport.h)
  5339.         RPTAG_OutLinePen     Area Outline pen
  5340.         RPTAG_WriteMask     Bit Mask for writing.
  5341.         RPTAG_MaxPen         Maximum pen to render (see SetMaxPen())
  5342.  
  5343.    INPUTS
  5344.     rp - pointer to the RastPort to modify.
  5345.     tags - a standard tag list
  5346.  
  5347.    RESULT
  5348.  
  5349.    BUGS
  5350.  
  5351.    SEE ALSO
  5352.     SetFont() SetSoftStyle() SetAPen() SetBPen() SetDrMd() SetOutLinePen()
  5353.     SetWriteMask() SetMaxPen() GetRPAttrA() graphics/rpattr.h
  5354.  
  5355. graphics.library/SetSoftStyle                   graphics.library/SetSoftStyle
  5356.  
  5357.    NAME
  5358.     SetSoftStyle -- Set the soft style of the current font.
  5359.  
  5360.    SYNOPSIS
  5361.     newStyle = SetSoftStyle(rp, style, enable)
  5362.     D0                      A1  D0     D1
  5363.  
  5364.     ULONG SetSoftStyle(struct RastPort *, ULONG, ULONG);
  5365.  
  5366.    FUNCTION
  5367.     This function alters the soft style of the current font.  Only
  5368.     those bits that are also set in enable are affected.  The
  5369.     resulting style is returned, since some style request changes
  5370.     will not be honored when the implicit style of the font
  5371.     precludes changing them.
  5372.  
  5373.    INPUTS
  5374.     rp     - the RastPort from which the font and style
  5375.              are extracted.
  5376.     style  - the new font style to set, subject to enable.
  5377.     enable - those bits in style to be changed.  Any set bits here
  5378.              that would not be set as a result of AskSoftStyle will
  5379.              be ignored, and the newStyle result will not be as
  5380.              expected. 
  5381.  
  5382.    RESULTS
  5383.     newStyle - the resulting style, both as a result of previous
  5384.                soft style selection, the effect of this function,
  5385.                and the style inherent in the set font.
  5386.  
  5387.    BUGS
  5388.  
  5389.    SEE ALSO
  5390.     AskSoftStyle()  graphics/text.h
  5391.  
  5392. graphics.library/SetWriteMask                   graphics.library/SetWriteMask
  5393.  
  5394.    NAME
  5395.        SetWriteMask -- Set the pixel write mask value for a RastPort (V39).
  5396.  
  5397.  
  5398.    SYNOPSIS
  5399.        success=SetWriteMask ( rp, msk )
  5400.       d0                   a0   d0
  5401.  
  5402.     ULONG SetWriteMask(struct RastPort *,ULONG)
  5403.  
  5404.    FUNCTION
  5405.     Set the current value of the bit write mask for the rastport.
  5406.     bits of the pixel with zeros in their mask will not be modified by
  5407.     subsequent drawing operations.
  5408.  
  5409.    INPUTS
  5410.        rp  =  a pointer to a valid RastPort structure.
  5411.     msk =  a longword mask value. 
  5412.  
  5413.     Graphics devices which do not support per-bit masking will
  5414.     return 0 (failure).
  5415.    BUGS
  5416.  
  5417.    NOTES
  5418.  
  5419.    SEE ALSO
  5420.     graphics/gfxmacros.h
  5421.  
  5422. graphics.library/SortGList                         graphics.library/SortGList
  5423.  
  5424.    NAME
  5425.     SortGList -- Sort the current gel list, ordering its y,x coordinates.
  5426.  
  5427.    SYNOPSIS
  5428.     SortGList(rp)
  5429.               A1
  5430.  
  5431.     void SortGList(struct RastPort *);
  5432.  
  5433.    FUNCTION
  5434.     Sorts the current gel list according to the gels' y,x coordinates.
  5435.     This sorting is essential before calls to DrawGList or DoCollision.
  5436.  
  5437.    INPUTS
  5438.     rp = pointer to the RastPort structure containing the GelsInfo
  5439.  
  5440.    RESULT
  5441.  
  5442.    BUGS
  5443.  
  5444.    SEE ALSO
  5445.     InitGels()  DoCollision()  DrawGList()  graphics/rastport.h
  5446.  
  5447. graphics.library/StripFont                         graphics.library/StripFont
  5448.  
  5449.    NAME
  5450.     StripFont -- remove the tf_Extension from a font (V36)
  5451.  
  5452.    SYNOPSIS
  5453.     StripFont(font)
  5454.               A0
  5455.  
  5456.     VOID StripFont(struct TextFont *);
  5457.  
  5458. graphics.library/SyncSBitMap                     graphics.library/SyncSBitMap
  5459.  
  5460.    NAME
  5461.        SyncSBitMap --    Syncronize Super BitMap with whatever is
  5462.             in the standard Layer bounds.
  5463.  
  5464.    SYNOPSIS
  5465.        SyncSBitMap( layer )
  5466.                       a0
  5467.  
  5468.     void SyncSBitMap( struct Layer * );
  5469.  
  5470.    FUNCTION
  5471.        Copy all bits from ClipRects in Layer into Super BitMap
  5472.     BitMap.  This is used for those functions that do not
  5473.     want to deal with the ClipRect structures but do want
  5474.     to be able to work with a SuperBitMap Layer.
  5475.  
  5476.    INPUTS
  5477.     layer - pointer to a Layer that has a SuperBitMap
  5478.         The Layer should already be locked by the caller.
  5479.  
  5480.    RESULT
  5481.     After calling this function, the programmer can manipulate
  5482.     the bits in the superbitmap associated with the layer.
  5483.     Afterwards, the programmer should call CopySBitMap to
  5484.     copy the bits back into the onscreen layer.
  5485.  
  5486.    BUGS
  5487.  
  5488.    SEE ALSO
  5489.     CopySBitMap() graphics/clip.h
  5490.  
  5491. graphics.library/Text                                   graphics.library/Text
  5492.  
  5493.    NAME
  5494.     Text -- Write text characters (no formatting).
  5495.  
  5496.    SYNOPSIS
  5497.     Text(rp, string, length)
  5498.          A1  A0      D0-0:16
  5499.  
  5500.     void Text(struct RastPort *, STRPTR, WORD);
  5501.  
  5502.    FUNCTION
  5503.     This graphics function writes printable text characters to the
  5504.     specified RastPort at the current position.  No control meaning
  5505.     is applied to any of the characters, thus only text on the
  5506.     current line is output.
  5507.  
  5508.     The current position in the RastPort is updated to the next
  5509.     character position.
  5510.     If the characters displayed run past the RastPort boundary,
  5511.     the current position is truncated to the boundary, and
  5512.     thus does not equal the old position plus the text length.
  5513.  
  5514.    INPUTS
  5515.     rp     - a pointer to the RastPort which describes where the
  5516.              text is to be output
  5517.     string - the address of string to output
  5518.     length - the number of characters in the string.
  5519.              If zero, there are no characters to be output.
  5520.  
  5521.    NOTES
  5522.     o   This function may use the blitter.
  5523.     o   Changing the text direction with RastPort->TxSpacing is
  5524.         not supported.
  5525.  
  5526.    BUGS
  5527.     For V34 and earlier:
  5528.     o   The maximum string length (in pixels) is limited to
  5529.         (1024 - 16 = 1008) pixels wide.
  5530.     o   A text string whose last character(s) have a
  5531.         tf_CharLoc size component that extends to the right of
  5532.         the rightmost of the initial and final CP positions
  5533.         will be (inappropriately) clipped.
  5534.  
  5535.    SEE ALSO
  5536.     Move()  TextLength()  graphics/text.h  graphics/rastport.h
  5537.  
  5538. graphics.library/TextExtent                       graphics.library/TextExtent
  5539.  
  5540.    NAME
  5541.     TextExtent -- Determine raster extent of text data. (V36)
  5542.  
  5543.    SYNOPSIS
  5544.     TextExtent(rp, string, count, textExtent)
  5545.                A1  A0      D0:16  A2
  5546.  
  5547.     void textExtent(struct RastPort *, STRPTR, WORD,
  5548.          struct TextExtent *);
  5549.  
  5550.    FUNCTION
  5551.     This function determines a more complete metric of the space
  5552.     that a text string would render into than the TextLength()
  5553.     function.
  5554.  
  5555.    INPUTS
  5556.     rp     - a pointer to the RastPort which describes where the
  5557.              text attributes reside.
  5558.     string - the address of the string to determine the length of.
  5559.     count  - the number of characters in the string.
  5560.                 If zero, there are no characters in the string.
  5561.     textExtent - a structure to hold the result.
  5562.  
  5563.    RESULTS
  5564.     textExtent is filled in as follows:
  5565.         te_Width  - same as TextLength() result: the rp_cp_x
  5566.                     advance that rendering this text would cause.
  5567.         te_Height - same as tf_YSize.  The height of the
  5568.                     font.
  5569.         te_Extent.MinX - the offset to the left side of the
  5570.                     rectangle this would render into.  Often zero.
  5571.         te_Extent.MinY - same as -tf_Baseline.  The offset
  5572.                     from the baseline to the top of the rectangle
  5573.                     this would render into.
  5574.         te_Extent.MaxX - the offset of the left side of the
  5575.                     rectangle this would render into.  Often the
  5576.                     same as te_Width-1.
  5577.         te_Extent.MaxY - same as tf_YSize-tf_Baseline-1.
  5578.                     The offset from the baseline to the bottom of
  5579.                     the rectangle this would render into.
  5580.  
  5581.    SEE ALSO
  5582.     TextLength()  Text()  TextFit()
  5583.     graphics/text.h  graphics/rastport.h
  5584.  
  5585. graphics.library/TextFit                             graphics.library/TextFit
  5586.  
  5587.    NAME
  5588.     TextFit - count characters that will fit in a given extent (V36)
  5589.  
  5590.    SYNOPSIS
  5591.     chars = TextFit(rastport, string, strLen, textExtent,
  5592.     D0              A1        A0      D0      A2
  5593.             constrainingExtent, strDirection,
  5594.             A3                  D1
  5595.             constrainingBitWidth, constrainingBitHeight)
  5596.             D2                    D3
  5597.  
  5598.     ULONG TextFit(struct RastPort *, STRPTR, UWORD,
  5599.         struct TextExtent *, struct TextExtent *, WORD, UWORD, UWORD);
  5600.  
  5601.    FUNCTION
  5602.     This function determines how many of the characters of the
  5603.     provided string will fit into the space described by the
  5604.     constraining parameters.  It also returns the extent of
  5605.     that number of characters.
  5606.  
  5607.    INPUTS
  5608.     rp     - a pointer to the RastPort which describes where the
  5609.              text attributes reside.
  5610.     string - the address of string to determine the constraint of
  5611.     strLen - The number of characters in the string.
  5612.              If zero, there are no characters in the string.
  5613.     textExtent - a structure to hold the extent result.
  5614.     constrainingExtent - the extent that the text must fit in.
  5615.         This can be NULL, indicating only the constrainingBit
  5616.         dimensions will describe the constraint.
  5617.     strDirection - the offset to add to the string pointer to
  5618.         get to the next character in the string.  Usually 1.
  5619.         Set to -1 and the string to the end of the string to
  5620.         perform a TextFit() anchored at the end.  No other value
  5621.         is valid.
  5622.     constrainingBitWidth - an alternative way to specify the
  5623.         rendering box constraint width that is independent of
  5624.         the rendering origin.  Range 0..32767.
  5625.     constrainingBitHeight - an alternative way to specify the
  5626.         rendering box constraint height that is independent of
  5627.         the rendering origin.  Range 0..32767.
  5628.  
  5629.    RESULTS
  5630.     chars - the number of characters from the origin of the
  5631.             given string that will fit in both the constraining
  5632.             extent (which specifies a CP bound and a rendering
  5633.             box relative to the origin) and in the rendering width
  5634.             and height specified.
  5635.  
  5636.    NOTES
  5637.     The result is zero chars and an empty textExtent when the fit
  5638.     cannot be performed.  This occurs not only when no text will
  5639.     fit in the provided constraints, but also when:
  5640.     -   the RastPort rp's rp_TxSpacing sign and magnitude is so
  5641.         great it reverses the path of the text. 
  5642.     -   the constrainingExtent does not include x = 0.
  5643.  
  5644.  
  5645.    BUGS
  5646.     Under V37, TextFit() would return one too few characters if the
  5647.     font was proportional. This can be worked around by passing
  5648.     (constrainingBitWidth + 1) for proportional fonts. This is fixed
  5649.     for V39.
  5650.  
  5651.    SEE ALSO
  5652.     TextExtent()  TextLength()  Text()
  5653.     graphics/text.h  graphics/rastport.h
  5654.  
  5655. graphics.library/TextLength                       graphics.library/TextLength
  5656.  
  5657.    NAME
  5658.     TextLength -- Determine raster length of text data.
  5659.  
  5660.    SYNOPSIS
  5661.     length = TextLength(rp, string, count)
  5662.     D0                  A1  A0      D0:16
  5663.  
  5664.     WORD TextLength(struct RastPort *, STRPTR, WORD);
  5665.  
  5666.    FUNCTION
  5667.     This graphics function determines the length that text data
  5668.     would occupy if output to the specified RastPort with the
  5669.     current attributes.  The length is specified as the number of
  5670.     raster dots: to determine what the current position would be
  5671.     after a Text() using this string, add the length to cp_x
  5672.     (cp_y is unchanged by Text()).  Use the newer TextExtent() to
  5673.     get more information.
  5674.  
  5675.    INPUTS
  5676.     rp     - a pointer to the RastPort which describes where the
  5677.              text attributes reside.
  5678.     string - the address of string to determine the length of
  5679.     count  - the string length.  If zero, there are no characters
  5680.              in the string.
  5681.  
  5682.    RESULTS
  5683.     length - the number of pixels in x this text would occupy, not
  5684.              including any negative kerning that may take place at
  5685.              the beginning of the text string, nor taking into
  5686.              account the effects of any clipping that may take
  5687.              place.
  5688.  
  5689.    NOTES
  5690.     Prior to V36, the result length occupied only the low word of
  5691.     d0 and was not sign extended into the high word.
  5692.  
  5693.    BUGS
  5694.     A length that would overflow single word arithmetic is not
  5695.     calculated correctly.
  5696.  
  5697.    SEE ALSO
  5698.     TextExtent()  Text()  TextFit()
  5699.     graphics/text.h  graphics/rastport.h
  5700.  
  5701. graphics.library/UnlockLayerRom               graphics.library/UnlockLayerRom
  5702.  
  5703.    NAME
  5704.     UnlockLayerRom -- Unlock Layer structure by ROM(gfx lib) code.
  5705.  
  5706.    SYNOPSIS
  5707.     UnlockLayerRom( layer )
  5708.              a5
  5709.  
  5710.     void UnlockLayerRom( struct Layer * );
  5711.  
  5712.    FUNCTION
  5713.     Release the lock on this layer. If the same task has called
  5714.     LockLayerRom more than once than the same number of calls to
  5715.     UnlockLayerRom must happen before the layer is actually freed
  5716.     so that other tasks may use it.
  5717.     This call does destroy scratch registers.
  5718.     This call is identical to UnlockLayer (layers.library).
  5719.  
  5720.    INPUTS
  5721.     layer - pointer to Layer structure
  5722.  
  5723.    BUGS
  5724.  
  5725.    SEE ALSO
  5726.     LockLayerRom() layers.library/UnlockLayer() graphics/clip.h
  5727.  
  5728. graphics.library/VBeamPos                           graphics.library/VBeamPos
  5729.  
  5730.    NAME   
  5731.     VBeamPos -- Get vertical beam position at this instant.
  5732.  
  5733.    SYNOPSIS
  5734.     pos = VBeamPos()
  5735.      d0
  5736.  
  5737.     LONG VBeamPos( void );
  5738.  
  5739.    FUNCTION
  5740.     Get the vertical beam position from the hardware.
  5741.  
  5742.    INPUTS
  5743.     none
  5744.  
  5745.    RESULT
  5746.     interrogates hardware for beam position and returns value.
  5747.     valid results in are the range of 0-511.
  5748.     Because of multitasking, the actual value returned may have
  5749.     no use. If you are the highest priority task then the value
  5750.     returned should be close, within 1 line.
  5751.  
  5752.    BUGS
  5753.  
  5754.    SEE ALSO
  5755.  
  5756.  
  5757. graphics.library/VideoControl                   graphics.library/VideoControl
  5758.  
  5759.    NAME
  5760.     VideoControl -- Modify the operation of a ViewPort's ColorMap (V36)
  5761.     VideoControlTags -- varargs stub for VideoControl (V36)
  5762.    SYNOPSIS
  5763.     error = VideoControl( cm , tags )
  5764.     d0                    a0   a1
  5765.  
  5766.     ULONG VideoControl( struct ColorMap *, struct TagItem * );
  5767.  
  5768.     error= VideoControlTags(cm, tags,...);
  5769.  
  5770.  
  5771.    FUNCTION
  5772.     Process the commands in the VideoControl command TagItem buffer 
  5773.     using cm as the target, with respect to its "attached" ViewPort.
  5774.  
  5775.     viewport commands:
  5776.  
  5777.     VTAG_ATTACH_CM     [_SET        | _GET] -- set/get attached viewport
  5778.     VTAG_VIEWPORTEXTRA [_SET        | _GET] -- set/get attached vp_extra 
  5779.     VTAG_NORMAL_DISP   [_SET        | _GET] -- set/get DisplayInfoHandle
  5780.                                                (natural mode)
  5781.     VTAG_COERCE_DISP   [_SET        | _GET] -- set/get DisplayInfoHandle 
  5782.                                                (coerced mode)
  5783.     VTAG_PF1_BASE      [_SET        | _GET] -- set/get color base for
  5784.                                                first playfield. (V39)
  5785.     VTAG_PF2_BASE      [_SET        | _GET] -- set/get color base for
  5786.                                                second playfield. (V39)
  5787.     VTAG_SPODD_BASE    [_SET        | _GET] -- set/get color base for odd
  5788.                                                sprites. (V39)
  5789.     VTAG_SPEVEN_BASE   [_SET        | _GET] -- set/get color base for even
  5790.                                                sprites. (V39)
  5791.     VTAG_BORDERSPRITE  [_SET        | _GET] -- on/off/inquire sprites in 
  5792.                                                borders. (V39)
  5793.     VTAG_SPRITERESN    [_SET        | _GET] -- set/get sprite resolution
  5794.                   (legal values are SPRITERESN_ECS/_140NS/_70NS/_35NS.
  5795.                    see graphics/view.h) (V39)
  5796.     VTAG_PF1_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield1 priority
  5797.                                                   with respect to sprites (V3
  5798. 9)
  5799.     VTAG_PF2_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield2 priority
  5800.                                                   with respect to sprites (V3
  5801. 9)
  5802.     (These two require that the ColorMap is attached to a ViewPort to be
  5803.      effective).
  5804.  
  5805.     genlock commands:
  5806.  
  5807.     VTAG_BORDERBLANK   [_SET | _CLR | _GET] -- on/off/inquire blanking
  5808.     VTAG_BORDERNOTRANS [_SET | _CLR | _GET] -- on/off/inquire notransparency
  5809.     VTAG_CHROMAKEY     [_SET | _CLR | _GET] -- on/off/inquire chroma mode
  5810.     VTAG_BITPLANEKEY   [_SET | _CLR | _GET] -- on/off/inquire bitplane mode
  5811.     VTAG_CHROMA_PEN    [_SET | _CLR | _GET] -- set/clr/get chromakey pen #
  5812.     VTAG_CHROMA_PLANE  [_SET |      | _GET] -- set/get bitplanekey plane #
  5813.  
  5814.     control commands:
  5815.  
  5816.     VTAG_IMMEDIATE    - normally, VideoControl changes do not occur until the
  5817.             next MakeVPort. Using this tag, some changes can be made to
  5818.             happen immediately. The tag data is a pointer to a longword
  5819.             flag variable which will be cleared if all changes happened
  5820.             immediately. See the example. (V39)
  5821.  
  5822.     VTAG_FULLPALETTE   [_SET | _CLR | _GET] -- enable/disable loading of all
  5823.             colors in the copper list.
  5824.             Normally, graphics will only load the color which are necessary
  5825.             for the viewport, based upon the screen depth and mode. In order
  5826.             to use the color palette banking features, you may need to use
  5827.             this tag to tell graphics to load ALL colors, regardless of
  5828.             screen depth. (V39)
  5829.  
  5830.     VC_IntermediateCLUpdate
  5831.     VC_IntermediateCLUpdate_Query
  5832.              When set, graphics will update the intermediate copper
  5833.          lists on colour changes. When FALSE, graphics won't update
  5834.              the intermediate copperlists, so ScrollVPort(), 
  5835.              ChangeVPBitMap() and colour loading functions will be faster.
  5836.              This value is TRUE by default. (V40)
  5837.  
  5838.     VC_NoColorPaletteLoad
  5839.     VC_NoColorPaletteLoad_Query
  5840.              When set, only colour 0 will be loaded for this ViewPort,
  5841.              hence the inter-ViewPort gap will be smaller. The colours for
  5842.              this ViewPort are inherited from the next higher ViewPort. The
  5843.          results are undefined if this is the first or only ViewPort in
  5844.              the display, and undefined when used in conjunction with
  5845.              VTAG_FULLPALETTE (!?!).
  5846.              This value is FALSE by default. (V40)
  5847.  
  5848.     VC_DUALPF_Disable
  5849.     VC_DUALPF_Disable_Query
  5850.         When set, disables the setting of the dual-playfield
  5851.         bit in bplcon0. When used with a dual-playfield mode
  5852.         screen, this allows using separate scroll and bitmaps
  5853.         for the odd and even bitplanes, without going through
  5854.         the normal dual-playfield priority and palette selection.
  5855.         With appropriate palette setup, this can be used for
  5856.         transparency effects, etc.
  5857.  
  5858.     copper commands
  5859.  
  5860.     VTAG_USERCLIP      [_SET | _CLR | _GET] -- on/off/inquire clipping of
  5861.                                                UserCopperList at bottom
  5862.                                                edge of ColorMap->cm_vp 
  5863.                                                (defaults to off)
  5864.  
  5865.     buffer commands:
  5866.  
  5867.     VTAG_NEXTBUF_CM                         -- link to more VTAG commands
  5868.     VTAG_END_CM                             -- terminate command buffer
  5869.  
  5870.     batch mode commands:
  5871.  
  5872.     (if you want your videocontrol taglist to be processed in "batch"
  5873.      mode, that is, at the next MakeVPort() for the ColorMap->cm_vp;
  5874.      you may install a static list of videocontrol TagItems into the 
  5875.      ColorMap with the BATCH_ITEMS_SET command; and then enable/disable
  5876.      batch mode processing of those items via the BATCH_CM control
  5877.      command)
  5878.                 
  5879.     VTAG_BATCH_CM      [_SET | _CLR | _GET] -- on/off/inquire batch mode
  5880.     VTAG_BATCH_ITEMS   [_SET | _ADD | _GET] -- set/add/get batched TagLists
  5881.  
  5882.     private commands (used internally by intuition -- do not call):
  5883.  
  5884.     VTAG_VPMODEID      [_SET | _CLR | _GET] -- force GetVPModeID() return
  5885.     
  5886.  
  5887.    INPUTS
  5888.     cm   = pointer to struct ColorMap obtained via GetColorMap().
  5889.     tags = pointer to a table of videocontrol tagitems.
  5890.  
  5891.    RESULT
  5892.     error = NULL if no error occurred in the control operation.
  5893.     (non-NULL if bad colormap pointer, no tagitems or bad tag) 
  5894.  
  5895.     The operating characteristics of the ColorMap and its attached 
  5896.     ViewPort are modified. The result will be incorporated into the 
  5897.     ViewPort when its copper lists are reassembled via MakeVPort().
  5898.  
  5899.     Note that you must NOT change colors in the viewport (via SetRGB4(),
  5900.     LoadRGB4(), SetRGB4(), etc.) after changing any of the color palette
  5901.     offsets (VTAG_PF1_BASE, etc), without first remaking the ViewPort.
  5902.  
  5903.    NOTES
  5904.     Sprite resolutions is controlled by two sets of tags, SPRITERESN
  5905.     and DEFSPRITERESN. If you don't set the sprite resolution, it will
  5906.     follow the intuition-controlled "default" sprite resolution. Setting
  5907.     the sprite resolution to one of the SPRITERESN_ values will allow the
  5908.     application to override intuition's control of it.
  5909.  
  5910.     This function will modify the contents of the TagList you pass to it by
  5911.     changing _GET tags to the corresponding _SET or _CLR tag. The
  5912.     exceptions to this rule are documented as such above (such as
  5913.     VTAG_IMMEDIATE).
  5914.  
  5915.     The new tags added for V40 have the prefix VC_ instead of VTAG_. These
  5916.     tags work in the same manner as all other tags in the system, and will
  5917.     not be modified by VideoControl().
  5918.  
  5919.    EXAMPLE
  5920.     must_remake=-1;
  5921.     error=VideoControl(myvp->ColorMap,VTAG_BORDERBLANK_SET,-1,
  5922.                        (GFXBase->lib_Version>=39)?VTAG_IMMEDIATE:TAG_IGNORE,
  5923.                         &must_remake);
  5924.     if (must_remake) { MakeVPort(myview,myvp); MrgCop(myview); }
  5925.  
  5926.    EXAMPLE
  5927.     struct TagItem VCTags[] =
  5928.     {
  5929.         {VTAG_BORDERBLANK_GET, NULL},
  5930.         {VTAG_SPRITERESN_SET, SPRITERESN_35NS},
  5931.         {TAG_DONE, NULL},
  5932.     };
  5933.     BOOL bblank = FALSE;
  5934.  
  5935.     if (VideoControl(cm, VCTags) == NULL)
  5936.     {
  5937.         bblank = (VCTags[0].ti_Tag == VTAG_BORDERBLANK_SET);
  5938.     }
  5939.  
  5940.    EXAMPLE
  5941.     struct TagItem VCTags[] =
  5942.     {
  5943.         {VC_NoColorPaletteLoad_Query, NULL},
  5944.         {TAG_DONE},
  5945.     };
  5946.     ULONG query;
  5947.  
  5948.     VCTags[0].ti_Data = (ULONG)&query;
  5949.     if (VideoControl(cm, VCTags) == NULL)
  5950.     {
  5951.         printf("Palette loading is %s\n", (query ? "off" : "on"));
  5952.     }
  5953.  
  5954.    BUGS
  5955.  
  5956.    SEE ALSO
  5957.     graphics/videocontrol.h, GetColorMap(), FreeColorMap()
  5958.  
  5959. graphics.library/WaitBlit                           graphics.library/WaitBlit
  5960.  
  5961.    NAME
  5962.        WaitBlit -- Wait for the blitter to be finished before proceeding
  5963.                    with anything else.
  5964.  
  5965.    SYNOPSIS
  5966.        WaitBlit()
  5967.  
  5968.     void WaitBlit( void );
  5969.  
  5970.    FUNCTION
  5971.     WaitBlit returns when the blitter is idle. This function should
  5972.     normally only be used when dealing with the blitter in a
  5973.     synchronous manner, such as when using OwnBlitter and DisownBlitter.
  5974.     WaitBlit does not wait for all blits queued up using QBlit or
  5975.     QBSBlit. You should call WaitBlit if you are just about to modify or
  5976.     free some memory that the blitter may be using.
  5977.  
  5978.    INPUTS
  5979.        none
  5980.  
  5981.    RESULT
  5982.        Your program waits until the blitter is finished.
  5983.     This routine does not use any the CPU registers.
  5984.     do/d1/a0/a1 are preserved by this routine.
  5985.     It may change the condition codes though.
  5986.  
  5987.    BUGS
  5988.     When examining bits with the CPU right after a blit, or when freeing
  5989.     temporary memory used by the blitter, a WaitBlit() may be required.
  5990.  
  5991.     Note that many graphics calls fire up the blitter, and let it run.
  5992.     The CPU does not need to wait for the blitter to finish before 
  5993.     returning.
  5994.  
  5995.     Because of a bug in Agnus (prior to all revisions of fat Agnus)
  5996.      this code may return too soon when the blitter has, in fact, not 
  5997.     started the blit yet, even though BltSize has been written.  
  5998.  
  5999.     This most often occurs in a heavily loaded system with extended memory,
  6000.     HIRES, and 4 bitplanes.
  6001.  
  6002.     WaitBlit currently tries to avoid this Agnus problem by testing
  6003.     the BUSY bit multiple times to make sure the blitter has started.
  6004.     If the blitter is BUSY at first check, this function busy waits.
  6005.  
  6006.     This initial hardware bug was fixed as of the first "Fat Agnus" chip, 
  6007.     as used in all A500 and A2000 computers.
  6008.  
  6009.     Because of a different bug in Agnus (currently all revisions thru ECS)
  6010.      this code may return too soon when the blitter has, in fact, not 
  6011.     stopped the blit yet, even though blitter busy has been cleared.  
  6012.  
  6013.     This most often occurs in a heavily loaded system with extended memory,
  6014.     in PRODUCTIVITY mode, and 2 bitplanes.
  6015.  
  6016.     WaitBlit currently tries to avoid this Agnus problem by testing
  6017.     the BUSY bit multiple times to make sure the blitter has really
  6018.     written its final word of destination data.
  6019.  
  6020.    SEE ALSO
  6021.     OwnBlitter() DisownBlitter() hardware/blit.h
  6022.  
  6023. graphics.library/WaitBOVP                           graphics.library/WaitBOVP
  6024.                                                       
  6025.    NAME
  6026.     WaitBOVP -- Wait till vertical beam reached bottom of
  6027.             this viewport.
  6028.  
  6029.    SYNOPSIS
  6030.     WaitBOVP( vp )
  6031.           a0
  6032.  
  6033.     void WaitBOVP( struct ViewPort * );
  6034.  
  6035.    FUNCTION
  6036.     Returns when the vertical beam has reached the bottom of this viewport
  6037.  
  6038.    INPUTS
  6039.     vp - pointer to ViewPort structure
  6040.  
  6041.    RESULT
  6042.     This function will return sometime after the beam gets beyond
  6043.     the bottom of the viewport.  Depending on the multitasking load
  6044.     of the system, the actual beam position may be different than
  6045.     what would be expected in a lightly loaded system.
  6046.  
  6047.    BUGS
  6048.     Horrors! This function currently busy waits waiting for the
  6049.     beam to get to the right place.  It should use the copper
  6050.     interrupt to trigger and send signals like WaitTOF does.
  6051.  
  6052.    SEE ALSO
  6053.     WaitTOF() VBeamPos()
  6054.  
  6055. graphics.library/WaitTOF                             graphics.library/WaitTOF
  6056.  
  6057.    NAME
  6058.        WaitTOF -- Wait for the top of the next video frame.
  6059.  
  6060.    SYNOPSIS
  6061.        WaitTOF()
  6062.  
  6063.     void WaitTOF( void );
  6064.  
  6065.    FUNCTION
  6066.        Wait  for vertical blank to occur and all vertical blank
  6067.        interrupt routines to complete before returning to caller.
  6068.  
  6069.    INPUTS
  6070.        none
  6071.  
  6072.    RESULT
  6073.     Places this task on the TOF wait queue. When the vertical blank
  6074.     interrupt comes around, the interrupt service routine will fire off
  6075.     signals to all the tasks doing WaitTOF. The highest priority task
  6076.     ready will get to run then.
  6077.  
  6078.    BUGS
  6079.  
  6080.    SEE ALSO
  6081.     exec.library/Wait() exec.library/Signal()
  6082.  
  6083. graphics.library/WriteChunkyPixels         graphics.library/WriteChunkyPixels
  6084.  
  6085.    NAME
  6086.     WriteChunkyPixels -- write the pen number value of a rectangular array
  6087.     of pixels starting at a specified x,y location and continuing
  6088.     through to another x,y location within a certain RastPort. (V40)
  6089.  
  6090.    SYNOPSIS
  6091.     WriteChunkyPixels(rp,xstart,ystart,xstop,ystop,array,bytesperrow)
  6092.                       A0 D0     D1     D2    D3    A2     D4
  6093.  
  6094.     VOID WriteChunkyPixels(struct  RastPort *, LONG, LONG,
  6095.          LONG, LONG, UBYTE *, LONG);
  6096.  
  6097.    FUNCTION
  6098.     For each pixel in a rectangular region, decode the pen number selector
  6099.     from a linear array of pen numbers into the bit-planes used to describe
  6100.     a particular rastport.
  6101.  
  6102.    INPUTS
  6103.     rp     -  pointer to a RastPort structure
  6104.     (xstart,ystart) -  starting point in the RastPort
  6105.     (xstop,ystop)   -  stopping point in the RastPort
  6106.     array  - pointer to an array of UBYTEs from which to fetch the
  6107.              pixel data.
  6108.     bytesperrow - The number of bytes per row in the source array.
  6109.         This should be at least as large as the number of pixels
  6110.         being written per line.
  6111.  
  6112.    RESULT
  6113.  
  6114.    NOTE
  6115.     xstop must be >= xstart
  6116.     ystop must be >= ystart
  6117.     The source array can be in fast RAM.
  6118.  
  6119.    ===chunky-to-planar conversion HW:
  6120.  
  6121.    GfxBase->ChunkyToPlanarPtr is either NULL, or a pointer to a HW
  6122.    register used to aid in the process of converting 8-bit chunky 
  6123.    pixel data into the bit-plane format used by the Amiga custom
  6124.    display chips. If NULL, then such hardware is not present.
  6125.  
  6126.    If an expansion device provides hardware which operates compatibly,
  6127.    than it can install the HW address into this pointer at boot time,
  6128.    and the system will use it.
  6129.  
  6130.    This pointer may be used for direct access to the chunky-to-planar
  6131.    conversion HW, if more is desired than the straight chunky-pixel
  6132.    copy that is performed by WriteChunkyPixels().
  6133.  
  6134.    If using the hardware directly, it should only be accessed when
  6135.    the task using it has control of the blitter (via OwnBlitter()),
  6136.    since this is the locking used to arbitrate usage of this device.
  6137.  
  6138.    The hardware may be viewed as a device which accepts 32 8-bit
  6139.    chunky pixels and outputs 8 longwords of bitplane data.
  6140.  
  6141.    For proper operation, exactly 8 longwords (containing 32 pixels)
  6142.    of chunky data should be written to *(GfxBase->ChunkyToPlanarPtr).
  6143.    After the data is written, bitplane data (starting with plane 0)
  6144.    can be read back a longword at a time. There is no need to read
  6145.    back all 8 longwords if the high-order bitplanes are not needed.
  6146.  
  6147.    Since WriteChunkyPixels is not (currently) particularly fast on 
  6148.    systems without the chunky-to-planar hardware, time critical
  6149.    applications (games, etc) may want to use their own custom conversion
  6150.    routine if GfxBase->ChunkyToPlanarPtr is NULL, and call
  6151.    WriteChunkyPixels() otherwise.
  6152.  
  6153.    This pointer is only present in GfxBase in versions of graphics.library
  6154.    >= 40, so this should be checked before the pointer is read.
  6155.  
  6156.    BUGS
  6157.     Not very fast on systems without chunky-to-planar conversion
  6158.     hardware.
  6159.  
  6160.    SEE ALSO
  6161.     WritePixel()  graphics/rastport.h
  6162.  
  6163. graphics.library/WritePixel                       graphics.library/WritePixel
  6164.  
  6165.    NAME
  6166.        WritePixel -- Change the pen num of one specific pixel in a
  6167.                      specified RastPort.
  6168.  
  6169.    SYNOPSIS
  6170.        error = WritePixel(  rp, x,  y)
  6171.          d0                 a1 D0  D1
  6172.  
  6173.     LONG WritePixel( struct RastPort *, SHORT, SHORT );
  6174.  
  6175.    FUNCTION
  6176.        Changes the pen number of the selected pixel in the specified
  6177.        RastPort to that currently specified by PenA, the primary
  6178.        drawing pen. Obeys minterms in RastPort.
  6179.  
  6180.    INPUTS
  6181.        rp - a pointer to the RastPort structure
  6182.        (x,y) - point within the RastPort at which the selected
  6183.            pixel is located.
  6184.  
  6185.    RESULT
  6186.        error = 0 if pixel succesfully changed
  6187.           = -1 if (x,y) is outside the RastPort
  6188.  
  6189.    BUGS
  6190.  
  6191.    SEE ALSO
  6192.        ReadPixel() graphics/rastport.h
  6193.  
  6194. graphics.library/WritePixelArray8           graphics.library/WritePixelArray8
  6195.  
  6196.    NAME
  6197.     WritePixelArray8 -- write the pen number value of a rectangular array
  6198.     of pixels starting at a specified x,y location and continuing
  6199.     through to another x,y location within a certain RastPort. (V36)
  6200.  
  6201.    SYNOPSIS
  6202.     count = WritePixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
  6203.     D0                       A0 D0:16  D1:16  D2:16 D3:16  A2   A1
  6204.  
  6205.     LONG WritePixelArray8(struct  RastPort *, UWORD, UWORD,
  6206.          UWORD, UWORD, UBYTE *, struct  RastPort *);
  6207.  
  6208.    FUNCTION
  6209.     For each pixel in a rectangular region, decode the pen number selector
  6210.     from a linear array of pen numbers into the bit-planes used to describe
  6211.     a particular rastport.
  6212.  
  6213.    INPUTS
  6214.     rp     -  pointer to a RastPort structure
  6215.     (xstart,ystart) -  starting point in the RastPort
  6216.     (xstop,ystop)   -  stopping point in the RastPort
  6217.     array  - pointer to an array of UBYTEs from which to fetch the
  6218.              pixel data. Allocate at least
  6219.              ((((width+15)>>4)<<4)*(ystop-ystart+1)) bytes.
  6220.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  6221.              temporary memory allocated for
  6222.              temprp->BitMap with Rows set == 1,
  6223.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  6224.              and temporary memory allocated for
  6225.              temprp->BitMap->Planes[])
  6226.  
  6227.    RESULT
  6228.     count will be set to the number of pixels plotted.
  6229.  
  6230.    NOTE
  6231.     xstop must be >= xstart
  6232.     ystop must be >= ystart
  6233.  
  6234.    BUGS
  6235.  
  6236.    SEE ALSO
  6237.     WritePixel()  graphics/rastport.h
  6238.  
  6239. graphics.library/WritePixelLine8             graphics.library/WritePixelLine8
  6240.  
  6241.    NAME
  6242.     WritePixelLine8 -- write the pen number value of a horizontal line
  6243.     of pixels starting at a specified x,y location and continuing
  6244.     right for count pixels. (V36)
  6245.  
  6246.    SYNOPSIS
  6247.     count = WritePixelLine8(rp,xstart,ystart,width,array,temprp)
  6248.     D0                      A0 D0:16  D1:16  D2    A2    A1
  6249.  
  6250.     LONG WritePixelLine8(struct RastPort *, UWORD, UWORD,
  6251.          UWORD, UBYTE *, struct RastPort *);
  6252.  
  6253.    FUNCTION
  6254.     For each pixel in a horizontal region, decode the pen number selector
  6255.     from a linear array of pen numbers into the bit-planes used to describe
  6256.     a particular rastport.
  6257.  
  6258.    INPUTS
  6259.     rp    -  pointer to a RastPort structure
  6260.     (x,y) - a point in the RastPort
  6261.     width - count of horizontal pixels to write
  6262.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  6263.             allocate at least (((width+15)>>4)<<4) bytes.
  6264.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  6265.              temporary memory allocated for
  6266.              temprp->BitMap with Rows set == 1,
  6267.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  6268.              and temporary memory allocated for
  6269.              temprp->BitMap->Planes[])
  6270.  
  6271.    RESULT
  6272.     Count will be set to the number of pixels plotted
  6273.  
  6274.    NOTE
  6275.     width must be non negative
  6276.  
  6277.    BUGS
  6278.  
  6279.    SEE ALSO
  6280.     WritePixel()  graphics/rastport.h
  6281.  
  6282. graphics.library/XorRectRegion                 graphics.library/XorRectRegion
  6283.  
  6284.    NAME
  6285.        XorRectRegion -- Perform 2d XOR operation of rectangle
  6286.                        with region, leaving result in region
  6287.  
  6288.    SYNOPSIS
  6289.        status = XorRectRegion(region,rectangle)
  6290.          d0                     a0      a1
  6291.  
  6292.     BOOL XorRectRegion( struct Region *, struct Rectangle * );
  6293.  
  6294.    FUNCTION
  6295.     Add portions of rectangle to region if they are not in
  6296.     the region.
  6297.     Remove portions of rectangle from region if they are
  6298.     in the region.
  6299.  
  6300.    INPUTS
  6301.        region - pointer to Region structure
  6302.        rectangle - pointer to Rectangle structure
  6303.  
  6304.    RESULTS
  6305.     status - return TRUE if successful operation
  6306.          return FALSE if ran out of memory
  6307.  
  6308.    BUGS
  6309.  
  6310.    SEE ALSO
  6311.     OrRegionRegion() AndRegionRegion() graphics/regions.h
  6312.  
  6313. graphics.library/XorRegionRegion             graphics.library/XorRegionRegion
  6314.  
  6315.    NAME 
  6316.        XorRegionRegion -- Perform 2d XOR operation of one region
  6317.                        with second region, leaving result in second region 
  6318.  
  6319.    SYNOPSIS 
  6320.        status = XorRegionRegion(region1,region2) 
  6321.          d0                        a0      a1 
  6322.  
  6323.     BOOL XorRegionRegion( struct Region *, struct Region * );
  6324.  
  6325.    FUNCTION 
  6326.     Join the regions together. If any part of region1 overlaps
  6327.     region2 then remove that from the new region.
  6328.  
  6329.    INPUTS 
  6330.        region1      = pointer to Region structure
  6331.        region2      = pointer to Region structure
  6332.  
  6333.    RESULTS
  6334.     status - return TRUE if successful operation
  6335.          return FALSE if ran out of memory
  6336.  
  6337.    BUGS 
  6338.  
  6339.  
  6340.