home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Documentation / Autodocs / graphics.doc < prev    next >
Encoding:
Text File  |  1999-09-02  |  182.8 KB  |  6,346 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 macro
  2114.     graphics/gfxmacros.h
  2115.     graphics/rastport.h
  2116.  
  2117. graphics.library/DrawGList                         graphics.library/DrawGList
  2118.  
  2119.    NAME
  2120.     DrawGList -- Process the gel list, queueing VSprites, drawing Bobs.
  2121.  
  2122.    SYNOPSIS
  2123.     DrawGList(rp, vp)
  2124.               A1  A0
  2125.  
  2126.     void DrawGList(struct RastPort *, struct ViewPort *);
  2127.  
  2128.    FUNCTION
  2129.     Performs one pass of the current gel list.
  2130.        - If nextLine and lastColor are defined, these are
  2131.          initialized for each gel.
  2132.           - If it's a VSprite, build it into the copper list.
  2133.           - If it's a Bob, draw it into the current raster.
  2134.           - Copy the save values into the "old" variables,
  2135.          double-buffering if required.
  2136.  
  2137.    INPUTS
  2138.     rp = pointer to the RastPort where Bobs will be drawn
  2139.     vp = pointer to the ViewPort for which VSprites will be created
  2140.  
  2141.    RESULT
  2142.  
  2143.    BUGS
  2144.     MUSTDRAW isn't implemented yet.
  2145.  
  2146.    SEE ALSO
  2147.     InitGels()  graphics/gels.h graphics/rastport.h  graphics/view.h
  2148.  
  2149. graphics.library/EraseRect                         graphics.library/EraseRect
  2150.  
  2151.    NAME
  2152.  
  2153.        EraseRect -- Fill a defined rectangular area using the current
  2154.                  BackFill hook. (V36)
  2155.  
  2156.    SYNOPSIS
  2157.     EraseRect( rp, xmin, ymin, xmax, ymax)
  2158.                   a1  d0:16 d1:16 d2:16 d3:16
  2159.  
  2160.     void EraseRect(struct RastPort *, SHORT, SHORT, SHORT, SHORT);
  2161.  
  2162.    FUNCTION
  2163.     Fill the rectangular region specified by the parameters with the
  2164.     BackFill hook. If non-layered, the rectangular region specified by
  2165.     the parameters is cleared. If layered the Layer->BackFill Hook is used.
  2166.  
  2167.    INPUTS
  2168.     rp    - pointer to a RastPort structure
  2169.     xmin    - x coordinate of the upper left corner of the region to fill.
  2170.     ymin    - y coordinate of the upper left corner of the region to fill.
  2171.     xmax    - x coordinate of the lower right corner of the region to fill.
  2172.     ymax    - y coordinate of the lower right corner of the region to fill.
  2173.  
  2174.    BUGS
  2175.  
  2176.    NOTES
  2177.     The following relation MUST be true:
  2178.     (xmax >= xmin) and (ymax >= ymin)
  2179.  
  2180.    SEE ALSO
  2181.     graphics/rastport.h graphics/clip.h
  2182.  
  2183. graphics.library/ExtendFont                       graphics.library/ExtendFont
  2184.  
  2185.    NAME
  2186.     ExtendFont -- ensure tf_Extension has been built for a font (V36)
  2187.  
  2188.    SYNOPSIS
  2189.     success = ExtendFont(font, fontTags)
  2190.     D0                   A0    A1
  2191.  
  2192.     ULONG ExtendFont(struct TextFont *, struct TagItem *);
  2193.  
  2194.     success = ExtendFontTags(font, Tag1, ...)  (V39)
  2195.  
  2196.     ULONG ExtendFontTags(struct TextFont *, ULONG, ...);
  2197.  
  2198.    FUNCTION
  2199.     To extend a TextFont structure.
  2200.  
  2201.    INPUTS
  2202.     font - The font to extend.
  2203.     fontTags - An optional taglist.  If NULL, then a default is used.
  2204.                Currently, the only tag defined is TA_DeviceDPI.
  2205.  
  2206.    RESULT
  2207.     success - 1 if the TextFont was properly extended, else 0.
  2208.  
  2209.    NOTES
  2210.     The varargs stub was missing from amiga.lib until V39.
  2211.  
  2212.    SEE ALSO
  2213.     graphics/text.h
  2214.  
  2215. graphics.library/FindColor                         graphics.library/FindColor
  2216.  
  2217.    NAME
  2218.     FindColor -- Find the closest matching color in a colormap. (V39)
  2219.  
  2220.    SYNOPSIS
  2221.     color = FindColor(  cm,  R,   G,    B , maxpen)
  2222.                        a3   d1   d2    d3   d4
  2223.  
  2224.     ULONG FindColor( struct ColorMap *, ULONG, ULONG, ULONG,LONG);
  2225.  
  2226.    INPUTS
  2227.     cm = colormap
  2228.     R = red level   (32 bit left justified fraction)
  2229.     G = green level (32 bit left justified fraction)
  2230.     B = blue level  (32 bit left justified fraction)
  2231.     MaxPen = the maximum entry in the color table to search. A value of
  2232.             -1 will limt the search to only those pens which could be
  2233.             rendered in (for instance, it will not examine the sprite
  2234.             colors on a 4 color screen).
  2235.  
  2236.  
  2237.    RESULT
  2238.     The system will attempt to find the color in the passed colormap
  2239.     which most closely matches the RGB values passed. No new pens will
  2240.     be allocated, and you should not ReleasePen() the returned pen.
  2241.     This function is not sensitive to palette sharing issues. Its
  2242.     intended use is for:
  2243.  
  2244.             (a) programs which pop up on public screens when those
  2245.                 screens are not using palette sharing. You might
  2246.                 use this function as a fallback when ObtainBestPenA()
  2247.                 says that there are no sharable pens.
  2248.  
  2249.             (b) Internal color matching by an application which is
  2250.                 either running on a non-public screen, or which
  2251.                 wants to match colors to an internal color table
  2252.                 which may not be associated with any displayed screen.
  2253.  
  2254.    BUGS
  2255.  
  2256.    NOTES
  2257.     In order to use the MaxPen=-1 feature, you must have initialized
  2258.     palette sharing via AttachPalExtra() (all intuition screens do this).
  2259.     Otherwise, MaxPen=-1 will search all colors in the colormap.
  2260.  
  2261.  
  2262.    SEE ALSO
  2263.     ObtainBestPenA() GetColorMap() ObtainPen() ReleasePen()
  2264. graphics.library/FindDisplayInfo             graphics.library/FindDisplayInfo
  2265.  
  2266.    NAME
  2267.     FindDisplayInfo -- search for a record identified by a specific key (V36)
  2268.  
  2269.    SYNOPSIS
  2270.     handle = FindDisplayInfo(ID)
  2271.     D0                       D0
  2272.  
  2273.     DisplayInfoHandle FindDisplayInfo(ULONG);
  2274.  
  2275.    FUNCTION
  2276.     Given a 32-bit Mode Key, return a handle to a valid DisplayInfoRecord
  2277.     found in the graphics database.  Using this handle, you can obtain
  2278.     information about this Mode, including its default dimensions,
  2279.     properties, and whether it is currently available for use.
  2280.  
  2281.    INPUTS
  2282.     ID     - unsigned long identifier
  2283.  
  2284.    RESULT
  2285.     handle - handle to a displayinfo Record with that key
  2286.              or NULL if no match.
  2287.  
  2288.    BUGS
  2289.  
  2290.    SEE ALSO
  2291.     graphics/displayinfo.h
  2292.  
  2293. graphics.library/Flood                                 graphics.library/Flood
  2294.  
  2295.    NAME
  2296.     Flood -- Flood rastport like areafill.
  2297.  
  2298.    SYNOPSIS
  2299.     error = Flood( rp, mode, x, y)
  2300.         d0            a1   d2  d0  d1
  2301.  
  2302.     BOOL Flood(struct RastPort *, ULONG, SHORT, SHORT);
  2303.  
  2304.    FUNCTION
  2305.     Search the BitMap starting at (x,y).
  2306.     Fill all adjacent pixels if they are:
  2307.         Mode 0: not the same color as AOLPen
  2308.         Mode 1: the same color as the pixel at (x,y)
  2309.  
  2310.     When actually doing the fill use the modes that apply to
  2311.     standard areafill routine such as drawmodes and patterns.
  2312.  
  2313.    INPUTS
  2314.     rp - pointer to RastPort
  2315.     (x,y) - coordinate in BitMap to start the flood fill at.
  2316.     mode -  0 fill all adjacent pixels searching for border.
  2317.         1 fill all adjacent pixels that have same pen number
  2318.         as the one at (x,y).
  2319.  
  2320.    NOTES
  2321.     In order to use Flood, the destination RastPort must 
  2322.     have a valid TmpRas raster whose size is as large as 
  2323.     that of the RastPort.
  2324.  
  2325.    SEE ALSO
  2326.     AreaEnd() InitTmpRas() graphics/rastport.h
  2327.  
  2328. graphics.library/FontExtent                       graphics.library/FontExtent
  2329.  
  2330.    NAME
  2331.     FontExtent -- get the font attributes of the current font (V36)
  2332.  
  2333.    SYNOPSIS
  2334.     FontExtent(font, fontExtent)
  2335.                A0    A1
  2336.  
  2337.     void FontExtent(struct TextFont *, struct TextExtent *);
  2338.  
  2339.    FUNCTION
  2340.     This function fills the text extent structure with a bounding
  2341.     (i.e. maximum) extent for the characters in the specified font.
  2342.  
  2343.    INPUTS
  2344.     font       - the TextFont from which the font metrics are extracted.
  2345.     fontExtent - the TextExtent structure to be filled.
  2346.  
  2347.    RESULT
  2348.     fontExtent is filled.
  2349.  
  2350.    NOTES
  2351.     The TextFont, not the RastPort, is specified -- unlike
  2352.     TextExtent(), effect of algorithmic enhancements is not
  2353.     included, nor does te_Width include any effect of
  2354.     rp_TxSpacing.  The returned te_Width will be negative only
  2355.     when FPF_REVPATH is set in the tf_Flags of the font -- the
  2356.     effect of left-moving characters is ignored for the width of
  2357.     a normal font, and the effect of right-moving characters is
  2358.     ignored if a REVPATH font.  These characters will, however,
  2359.     be reflected in the bounding extent.
  2360.  
  2361.    SEE ALSO
  2362.     TextExtent()  graphics/text.h
  2363.  
  2364. graphics.library/FreeBitMap                       graphics.library/FreeBitMap
  2365.  
  2366.    NAME
  2367.     FreeBitMap -- free a bitmap created by AllocBitMap (V39)
  2368.  
  2369.    SYNOPSIS
  2370.     FreeBitMap(bm)
  2371.                a0
  2372.  
  2373.     VOID FreeBitMap(struct BitMap *)
  2374.  
  2375.    FUNCTION
  2376.     Frees bitmap and all associated bitplanes
  2377.  
  2378.    INPUTS
  2379.     bm  =  A pointer to a BitMap structure. Passing a NULL-pointer
  2380.            (meaning "do nothing") is OK.
  2381.  
  2382.    BUGS
  2383.  
  2384.    NOTES
  2385.     Be careful to insure that any rendering done to the bitmap has
  2386.     completed (by calling WaitBlit()) before you call this function.
  2387.  
  2388.    SEE ALSO
  2389.     AllocBitMap()
  2390.  
  2391. graphics.library/FreeColorMap                   graphics.library/FreeColorMap
  2392.  
  2393.    NAME
  2394.        FreeColorMap -- Free the ColorMap structure and return memory
  2395.                         to free memory pool.
  2396.  
  2397.    SYNOPSIS
  2398.        FreeColorMap( colormap )
  2399.                        a0
  2400.  
  2401.     void FreeColorMap(struct ColorMap *);
  2402.  
  2403.    FUNCTION
  2404.     Return the memory to the free memory pool that was allocated
  2405.     with GetColorMap.
  2406.  
  2407.    INPUTS
  2408.     colormap - pointer to ColorMap allocated with GetColorMap.
  2409.         
  2410.           Passing a NULL pointer (meaning "do nothing") is 
  2411.           acceptable (V39).
  2412.  
  2413.    RESULT
  2414.     The space is made available for others to use.
  2415.  
  2416.    BUGS
  2417.  
  2418.    SEE ALSO
  2419.        SetRGB4() GetColorMap() graphics/view.h
  2420. graphics.library/FreeCopList                     graphics.library/FreeCopList
  2421.  
  2422.    NAME
  2423.     FreeCopList -- deallocate intermediate copper list
  2424.  
  2425.    SYNOPSIS
  2426.        FreeCopList(coplist)
  2427.               a0
  2428.  
  2429.     void FreeCopList( struct CopList *);
  2430.  
  2431.    FUNCTION
  2432.     Deallocate all memory associated with this copper list.
  2433.  
  2434.    INPUTS
  2435.        coplist    - pointer to structure CopList
  2436.  
  2437.    RESULTS
  2438.     memory returned to memory manager
  2439.  
  2440.    BUGS
  2441.  
  2442.    SEE ALSO
  2443.     graphics/copper.h
  2444.  
  2445. graphics.library/FreeCprList                     graphics.library/FreeCprList
  2446.  
  2447.    NAME
  2448.        FreeCprList -- deallocate hardware copper list
  2449.  
  2450.    SYNOPSIS
  2451.        FreeCprList(cprlist)
  2452.               a0
  2453.  
  2454.     void FreeCprList(struct cprlist *);
  2455.  
  2456.    FUNCTION
  2457.        return cprlist to free memory pool
  2458.  
  2459.    INPUTS
  2460.        cprlist - pointer to cprlist structure
  2461.  
  2462.    RESULTS
  2463.     memory returned and made available to other tasks
  2464.  
  2465.    BUGS
  2466.  
  2467.    SEE ALSO
  2468.     graphics/copper.h
  2469.  
  2470. graphics.library/FreeDBufInfo                   graphics.library/FreeDBufInfo
  2471.  
  2472.    NAME
  2473.        FreeDBufInfo -- free information for multi-buffered animation (V39)
  2474.  
  2475.    SYNOPSIS
  2476.        FreeDBufInfo(db)
  2477.                  a1
  2478.  
  2479.     void FreeDBufInfo(struct DBufInfo *)
  2480.  
  2481.    FUNCTION
  2482.     Frees a structure obtained from AllocDBufInfo
  2483.  
  2484.    INPUTS
  2485.        db  =  A pointer to a DBufInfo.
  2486.  
  2487.    BUGS
  2488.  
  2489.    NOTES
  2490.     FreeDBufInfo(NULL) is a no-op.
  2491.  
  2492.    SEE ALSO
  2493.     AllocDBufInfo() ChangeVPBitMap()
  2494.  
  2495. graphics.library/FreeGBuffers                   graphics.library/FreeGBuffers
  2496.  
  2497.    NAME
  2498.     FreeGBuffers -- Deallocate memory obtained by GetGBufers.
  2499.  
  2500.    SYNOPSIS
  2501.     FreeGBuffers(anOb, rp, db)
  2502.                  A0    A1  D0
  2503.  
  2504.     void FreeGBuffers(struct AnimOb *, struct RastPort *, BOOL);
  2505.  
  2506.    FUNCTION
  2507.     For each sequence of each component of the AnimOb,
  2508.     deallocate memory for:
  2509.         SaveBuffer
  2510.         BorderLine
  2511.         CollMask and ImageShadow (point to same buffer)
  2512.         if db is set (user had used double-buffering) deallocate:
  2513.             DBufPacket
  2514.             BufBuffer
  2515.  
  2516.    INPUTS
  2517.     anOb = pointer to the AnimOb structure
  2518.     rp   = pointer to the current RastPort
  2519.     db   = double-buffer indicator (set TRUE for double-buffering)
  2520.  
  2521.    RESULT
  2522.  
  2523.    BUGS
  2524.  
  2525.    SEE ALSO
  2526.     GetGBuffers()  graphics/gels.h  graphics/rastport.h
  2527.  
  2528. graphics.library/FreeRaster                       graphics.library/FreeRaster
  2529.  
  2530.    NAME
  2531.        FreeRaster -- Release an allocated area to the system free memory pool
  2532. .
  2533.  
  2534.  
  2535.    SYNOPSIS
  2536.        FreeRaster( p, width, height)
  2537.            a0   d0:16  d1:16
  2538.  
  2539.     void FreeRaster( PLANEPTR, USHORT, USHORT);
  2540.  
  2541.    FUNCTION
  2542.     Return the memory associated with this PLANEPTR of size
  2543.     width and height to the MEMF_CHIP memory pool.
  2544.  
  2545.    INPUTS
  2546.        p  =  a pointer to a memory space  returned  as  a
  2547.              result of a call to AllocRaster.
  2548.  
  2549.     width - the width in bits of the bitplane.
  2550.     height - number of rows in bitplane.
  2551.  
  2552.    BUGS
  2553.  
  2554.    NOTES
  2555.        Width and height should be the same values with which you
  2556.        called AllocRaster in the first place.
  2557.  
  2558.    SEE ALSO
  2559.     AllocRaster() graphics/gfx.h
  2560.  
  2561. graphics.library/FreeSprite                       graphics.library/FreeSprite
  2562.  
  2563.    NAME
  2564.        FreeSprite -- Return sprite for use by others and virtual
  2565.                       sprite machine.
  2566.  
  2567.    SYNOPSIS
  2568.        FreeSprite( pick )
  2569.                     d0
  2570.  
  2571.     void FreeSprite( WORD );
  2572.  
  2573.    FUNCTION
  2574.     Mark sprite as available for others to use.
  2575.        These sprite routines are provided to ease sharing of sprite
  2576.     hardware and to handle simple cases of sprite usage and
  2577.     movement.  It is assumed the programs that use these routines
  2578.     do want to be good citizens in their hearts. ie: they will
  2579.     not FreeSprite unless they actually own the sprite.
  2580.     The Virtual Sprite machine may ignore the simple sprite machine.
  2581.  
  2582.    INPUTS
  2583.        pick - number in range of 0-7
  2584.  
  2585.    RESULTS
  2586.     sprite made available for subsequent callers of GetSprite
  2587.     as well as use by Virtual Sprite Machine.
  2588.  
  2589.    BUGS
  2590.  
  2591.    SEE ALSO
  2592.        GetSprite() ChangeSprite() MoveSprite() graphics/sprite.h
  2593.  
  2594. graphics.library/FreeSpriteData               graphics.library/FreeSpriteData
  2595.  
  2596.    NAME
  2597.     FreeSpriteData -- free sprite data allocated by AllocSpriteData() (V39)
  2598.  
  2599.    SYNOPSIS
  2600.     FreeSpriteData(extsp)
  2601.             a2
  2602.  
  2603.     void FreeSpriteData(struct ExtSprite *);
  2604.  
  2605.  
  2606.    FUNCTION
  2607.  
  2608.    INPUTS
  2609.     extsp - The extended sprite structure to be freed. Passing NULL is a
  2610.     NO-OP.
  2611.  
  2612.    SEE ALSO
  2613.     FreeSpriteData() FreeSprite() ChangeSprite() MoveSprite() GetExtSprite()
  2614.     AllocBitMap() graphics/sprite.h
  2615.  
  2616. graphics.library/FreeVPortCopLists         graphics.library/FreeVPortCopLists
  2617.  
  2618.    NAME
  2619.        FreeVPortCopLists -- deallocate all intermediate copper lists and
  2620.        their headers from a viewport
  2621.  
  2622.    SYNOPSIS
  2623.        FreeVPortCopLists(vp)
  2624.                          a0
  2625.  
  2626.     void FreeVPortCopLists(struct ViewPort *);
  2627.  
  2628.    FUNCTION
  2629.        Search display, color, sprite, and user copper
  2630.        lists and call FreeMem() to deallocate them from memory
  2631.  
  2632.    INPUTS
  2633.        vp - pointer to ViewPort structure
  2634.  
  2635.    RESULTS
  2636.        The memory allocated to the various copper lists will be returned
  2637.     to the system's free memory pool, and the following fields in
  2638.     the viewport structure will be set to NULL:
  2639.         
  2640.         DspIns, Sprins, ClrIns, UCopIns
  2641.  
  2642.    BUGS
  2643.        none known
  2644.  
  2645.    SEE ALSO
  2646.     graphics/view.h
  2647.  
  2648. graphics.library/GetAPen                             graphics.library/GetAPen
  2649.  
  2650.    NAME
  2651.        GetAPen -- Get the A Pen value for a RastPort (V39).
  2652.  
  2653.  
  2654.    SYNOPSIS
  2655.        pen = GetAPen  ( rp )
  2656.      d0         a0
  2657.  
  2658.     ULONG GetAPen(struct RastPort *)
  2659.  
  2660.    FUNCTION
  2661.     Return the current value of the A pen for the rastport. This function 
  2662.     should be used instead of peeking the structure directly, because future
  2663.     graphics devices may store it differently, for instance, using more bits.
  2664.  
  2665.    INPUTS
  2666.        rp  =  a pointer to a valid RastPort structure.
  2667.  
  2668.    BUGS
  2669.  
  2670.    NOTES
  2671.  
  2672.    SEE ALSO
  2673.     SetAPen() graphics/gfx.h
  2674.  
  2675. graphics.library/GetBitMapAttr                 graphics.library/GetBitMapAttr
  2676.  
  2677.    NAME
  2678.     GetBitMapAttr -- Returns information about a bitmap (V39)
  2679.  
  2680.  
  2681.    SYNOPSIS
  2682.     value=GetBitMapAttr(bitmap,attribute_number);
  2683.       d0                     a0       d1
  2684.  
  2685.     ULONG GetBitMapAttr(struct BitMap *,ULONG);
  2686.  
  2687.    FUNCTION
  2688.     Determines information about a bitmap. This function should be used
  2689.     instead of reading the bitmap structure fields directly. This will
  2690.     provide future compatibility.
  2691.  
  2692.    INPUTS
  2693.     bm  =  A pointer to a BitMap structure.
  2694.  
  2695.     attribute_number = A number telling graphics which attribute
  2696.                        of the bitmap should be returned:
  2697.  
  2698.                     BMA_HEIGHT returns the height in pixels
  2699.                     BMA_WIDTH  returns the width in pixels.
  2700.                     BMA_DEPTH  returns the depth. This is the number of
  2701.                             bits which are required to store the information
  2702.                             for one pixel in the bitmap.
  2703.                     BMA_FLAGS  returns a longword bitfield describing
  2704.                             various attributes which the bitmap may have.
  2705.                             Currently defined flags are BMF_DISPLAYABLE,
  2706.                             BMF_INTERLEAVED (see AllocBitMap()). The flag
  2707.                             BMF_STANDARD returns will be set if the
  2708.                             bitmap is represented as planar data in Amiga
  2709.                             Chip RAM.
  2710.  
  2711.    BUGS
  2712.  
  2713.    NOTES
  2714.  
  2715.     Unknown attributes are reserved for future use, and return zero.
  2716.  
  2717.     BMF_DISPLAYABLE will only be set if the source bitmap meets all of the
  2718.     required alignment restrictions. A bitmap which does not meet these
  2719.     restrictions may still be displayable at some loss of efficiency.
  2720.  
  2721.     Size values returned by this function may not exactly match the values
  2722.     which were passed to AllocBitMap(), due to alignment restrictions.
  2723.  
  2724.    SEE ALSO
  2725.     AllocBitMap()
  2726.  
  2727. graphics.library/GetBPen                             graphics.library/GetBPen
  2728.  
  2729.    NAME
  2730.        GetBPen -- Get the B Pen value for a RastPort (V39).
  2731.  
  2732.  
  2733.    SYNOPSIS
  2734.        pen = GetBPen  ( rp )
  2735.     d0            a0
  2736.  
  2737.     ULONG GetBPen(struct RastPort *)
  2738.  
  2739.    FUNCTION
  2740.     Return the current value of the B pen for the rastport. This function 
  2741.     should be used instead of peeking the structure directly, because future
  2742.     graphics devices may store it differently, using more bits.
  2743.  
  2744.    INPUTS
  2745.        rp  =  a pointer to a valid RastPort structure.
  2746.  
  2747.    BUGS
  2748.  
  2749.    NOTES
  2750.  
  2751.    SEE ALSO
  2752.     SetBPen() graphics/gfx.h
  2753.  
  2754. graphics.library/GetColorMap                     graphics.library/GetColorMap
  2755.  
  2756.    NAME
  2757.        GetColorMap -- allocate and initialize Colormap
  2758.  
  2759.  
  2760.    SYNOPSIS
  2761.        cm = GetColorMap( entries )
  2762.        d0            d0
  2763.  
  2764.     struct ColorMap *GetColorMap( ULONG);
  2765.  
  2766.    FUNCTION
  2767.        Allocates, initializes and returns a pointer to a ColorMap
  2768.        data structure, later enabling calls to SetRGB4/SetRGB32
  2769.        and LoadRGB4/LoadRGB32 to load colors for a view port. The
  2770.        ColorTable pointer in the ColorMap structure points to a
  2771.        hardware specific colormap data structure. You should not
  2772.        count on it being anything you can understand. Use
  2773.        GetRGB4()/GetRGB32() to query it or SetRGB4CM/SetRGB32CM
  2774.        to set it directly.
  2775.  
  2776.    INPUTS
  2777.     entries - number of entries for this colormap 
  2778.  
  2779.     RESULT
  2780.     The pointer value returned by this routine, if nonzero,
  2781.        may be stored into the ViewPort.ColorMap pointer.
  2782.        If a value of 0 is returned, the system was unable
  2783.        to allocate enough memory space for the required
  2784.        data structures.
  2785.  
  2786.    BUGS
  2787.  
  2788.    SEE ALSO
  2789.        SetRGB4() FreeColorMap()
  2790. graphics.library/GetDisplayInfoData       graphics.library/GetDisplayInfoData
  2791.  
  2792.    NAME
  2793.     GetDisplayInfoData -- query DisplayInfo Record parameters (V36)
  2794.  
  2795.    SYNOPSIS
  2796.     result = GetDisplayInfoData(handle, buf, size, tagID, [ID])
  2797.     D0                          A0      A1   D0    D1     [D2]
  2798.  
  2799.     ULONG GetDisplayInfoData(DisplayInfoHandle, UBYTE *, ULONG, ULONG, ULONG);
  2800.  
  2801.    FUNCTION
  2802.     GetDisplayInfoData() fills a buffer with data meaningful to the
  2803.     DisplayInfoRecord pointed at by your valid handle. The data type
  2804.     that you are interested in is indicated by a tagID for that chunk.
  2805.     The types of tagged information that may be available include:
  2806.  
  2807.     DTAG_DISP: (DisplayInfo)   - properties and availability information.
  2808.     DTAG_DIMS: (DimensionInfo) - default dimensions and overscan info.
  2809.     DTAG_MNTR: (MonitorInfo)   - type, position, scanrate, and compatibility
  2810.     DTAG_NAME: (NameInfo)      - a user friendly way to refer to this mode.
  2811.  
  2812.    INPUTS
  2813.     handle - displayinfo handle
  2814.     buf    - pointer to destination buffer
  2815.     size   - buffer size in bytes
  2816.     tagID  - data chunk type
  2817.     ID     - displayinfo identifier, optionally used if handle is NULL
  2818.  
  2819.    RESULT
  2820.     result - if positive, number of bytes actually transferred
  2821.              if zero, no information for ID was available
  2822.  
  2823.    BUGS
  2824.  
  2825.    SEE ALSO
  2826.     FindDisplayInfo(), NextDisplayInfo()
  2827.     graphics/displayinfo.h
  2828.  
  2829. graphics.library/GetDrMd                             graphics.library/GetDrMd
  2830.  
  2831.    NAME
  2832.        GetDrMd -- Get the draw mode value for a RastPort (V39).
  2833.  
  2834.  
  2835.    SYNOPSIS
  2836.        mode = GetDrMd  ( rp )
  2837.     d0                a0
  2838.  
  2839.     ULONG GetDrMd(struct RastPort *)
  2840.  
  2841.    FUNCTION
  2842.     Return the current value of the draw mode for the rastport. This function 
  2843.     should be used instead of peeking the structure directly, because future
  2844.     graphics devices may store it differently.
  2845.  
  2846.    INPUTS
  2847.        rp  =  a pointer to a valid RastPort structure.
  2848.  
  2849.    BUGS
  2850.  
  2851.    NOTES
  2852.  
  2853.    SEE ALSO
  2854.     SetDrMd() graphics/gfx.h
  2855.  
  2856. graphics.library/GetExtSpriteA                 graphics.library/GetExtSpriteA
  2857.  
  2858.    NAME
  2859.     GetExtSpriteA -- Attempt to get a sprite for the extended sprite
  2860.                      manager. (V39)
  2861.     GetExtSprite -- varargs stub for GetExtSpriteA. (V39)
  2862.  
  2863.    SYNOPSIS
  2864.     Sprite_Number = GetExtSpriteA( sprite, tags )  (V39)
  2865.         d0                    a2      a1
  2866.  
  2867.     LONG GetExtSpriteA( struct ExtSprite *, struct TagItem * );
  2868.  
  2869.     spritenum=GetExtSprite(sprite,tags,...);
  2870.  
  2871.    FUNCTION
  2872.     Attempt to allocate one of the eight sprites for private use
  2873.     with the extended sprite manager. 
  2874.  
  2875.    INPUTS
  2876.     sprite - ptr to programmer's ExtSprite (from AllocSpriteData()).
  2877.     tags - a standard tag list:
  2878.  
  2879.         GSTAG_SPRITE_NUM    specifies a specific sprite to get by number.
  2880.         
  2881.         GSTAG_ATTACHED specifies that you wish to get a sprite pair.
  2882.             the tag data field points to a ExtSprite structure
  2883.             for the second sprite. You must free both sprites.
  2884.  
  2885.  
  2886.    RESULTS
  2887.     Sprite_number = a sprite number or -1 for an error.
  2888.         This call will fail if no sprites could be allocated, or
  2889.         if you try to allocate a sprite which would require
  2890.         a mode change when there are other sprites of incompatible
  2891.         modes in use.
  2892.  
  2893.    BUGS
  2894.  
  2895.     GSTAG_ATTACHED does not work in version 39. When running under V39,
  2896.     you should attach the second sprite with a separate GetExtSprite call.
  2897.  
  2898.    SEE ALSO
  2899.     FreeSprite() ChangeSprite() MoveSprite() GetSprite() graphics/sprite.h
  2900.  
  2901. graphics.library/GetGBuffers                     graphics.library/GetGBuffers
  2902.  
  2903.    NAME
  2904.     GetGBuffers -- Attempt to allocate ALL buffers of an entire AnimOb.
  2905.  
  2906.    SYNOPSIS
  2907.     status = GetGBuffers(anOb, rp, db)
  2908.     D0                   A0    A1  D0
  2909.  
  2910.     BOOL GetGBuffers(struct AnimOb *, struct RastPort *, BOOL);
  2911.  
  2912.    FUNCTION
  2913.     For each sequence of each component of the AnimOb, allocate memory for:
  2914.         SaveBuffer
  2915.         BorderLine
  2916.         CollMask and ImageShadow (point to same buffer)
  2917.         if db is set TRUE (user wants double-buffering) allocate:
  2918.             DBufPacket
  2919.             BufBuffer
  2920.  
  2921.    INPUTS
  2922.     anOb = pointer to the AnimOb structure
  2923.     rp   = pointer to the current RastPort
  2924.     db   = double-buffer indicator (set TRUE for double-buffering)
  2925.  
  2926.    RESULT
  2927.     status = TRUE if the memory allocations were all successful, else FALSE
  2928.  
  2929.    BUGS
  2930.     If any of the memory allocations fail it does not free the partial
  2931.     allocations that did succeed.
  2932.  
  2933.    SEE ALSO
  2934.     FreeGBuffers() graphics/gels.h
  2935.  
  2936. graphics.library/GetOPen                             graphics.library/GetOPen
  2937.  
  2938.    NAME
  2939.        GetOPen -- Get the O Pen value for a RastPort (V39).
  2940.  
  2941.  
  2942.    SYNOPSIS
  2943.        pen = GetOPen  ( rp )
  2944.     d0         a0
  2945.  
  2946.     ULONG GetOPen(struct RastPort *)
  2947.  
  2948.    FUNCTION
  2949.     Return the current value of the O pen for the rastport. This function 
  2950.     should be used instead of peeking the structure directly, because future
  2951.     graphics devices may store it differently, for instance, using more bits.
  2952.  
  2953.    INPUTS
  2954.        rp  =  a pointer to a valid RastPort structure.
  2955.  
  2956.    BUGS
  2957.  
  2958.    NOTES
  2959.  
  2960.    SEE ALSO
  2961.     SetOutlinePen() graphics/gfx.h
  2962.  
  2963. graphics.library/GetRGB32                           graphics.library/GetRGB32
  2964.  
  2965.    NAME
  2966.     GetRGB32 -- Set a series of color registers for this Viewport. (V39)
  2967.  
  2968.    SYNOPSIS
  2969.     GetRGB32(  cm,  firstcolor, ncolors, table )
  2970.                a0   d0           d1    a1
  2971.  
  2972.        void GetRGB32( struct ColorMap *, ULONG, ULONG, ULONG *);
  2973.  
  2974.    INPUTS
  2975.     cm = colormap
  2976.     firstcolor = the first color register to get
  2977.     ncolors = the number of color registers to set.
  2978.     table=a pointer to a series of 32-bit RGB triplets.
  2979.  
  2980.    RESULT
  2981.     The ULONG data pointed to by 'table' will be filled with the 32 bit
  2982.     fractional RGB values from the colormap.
  2983.    BUGS
  2984.  
  2985.    NOTES
  2986.     'Table' should point to at least ncolors*3 longwords.
  2987.  
  2988.    SEE ALSO
  2989.     LoadRGB4() GetColorMap() LoadRGB32() SetRGB32CM() graphics/view.h
  2990. graphics.library/GetRGB4                             graphics.library/GetRGB4
  2991.  
  2992.    NAME
  2993.        GetRGB4 -- Inquire value of entry in ColorMap.
  2994.  
  2995.    SYNOPSIS
  2996.        value = GetRGB4( colormap, entry )
  2997.           d0              a0       d0
  2998.  
  2999.     ULONG GetRGB4(struct ColorMap *, LONG);
  3000.  
  3001.    FUNCTION
  3002.     Read and format a value from the ColorMap.
  3003.  
  3004.    INPUTS
  3005.     colormap - pointer to ColorMap structure
  3006.     entry - index into colormap
  3007.  
  3008.    RESULT
  3009.     returns -1 if no valid entry
  3010.     return UWORD RGB value 4 bits per gun right justified
  3011.  
  3012.    NOTE
  3013.     Intuition's DisplayBeep() changes color 0. Reading Color 0 during a
  3014.     DisplayBeep() will lead to incorrect results.
  3015.  
  3016.    BUGS
  3017.  
  3018.    SEE ALSO
  3019.        SetRGB4() LoadRGB4() GetColorMap() FreeColorMap() graphics/view.h
  3020. graphics.library/GetRPAttrA                       graphics.library/GetRPAttrA
  3021.  
  3022.    NAME
  3023.        GetRPAttrA -- examine rastport settings via a tag list
  3024.     GetRPAttrs  -- varargs stub for GetRPAttrA
  3025.  
  3026.    SYNOPSIS
  3027.        GetRPAttrA(rp,tags)
  3028.                   a0   a1
  3029.  
  3030.     void GetRPAttrA(struct RastPort *, struct TagItem *);
  3031.  
  3032.     GetRPAttrs(rp,attr1,&result1,...);
  3033.  
  3034.    FUNCTION
  3035.        Read the settings of a rastport into variables. The
  3036.     ti_Tag field of the TagItem specifies which attribute
  3037.     should be read, and the ti_Data field points at the
  3038.     location where the result hsould be stored. All current
  3039.     tags store the return data as LONGs (32 bits).
  3040.  
  3041.     currently available tags are:
  3042.  
  3043.         RPTAG_Font        Font for Text()
  3044.         RPTAG_SoftStyle        style for text (see graphics/text.h)
  3045.         RPTAG_APen        Primary rendering pen
  3046.         RPTAG_BPen        Secondary rendering pen
  3047.         RPTAG_DrMd         Drawing mode (see graphics/rastport.h)
  3048.         RPTAG_OutLinePen     Area Outline pen
  3049.         RPTAG_WriteMask     Bit Mask for writing.
  3050.         RPTAG_MaxPen         Maximum pen to render (see SetMaxPen())
  3051.         RPTAG_DrawBounds    Determine the area that will be rendered
  3052.                     into by rendering commands. Can be used
  3053.                     to optimize window refresh. Pass a pointer
  3054.                     to a rectangle in the tag data. On return,
  3055.                     the rectangle's MinX will be greater than
  3056.                     its MaxX if there are no active cliprects.
  3057.  
  3058.    INPUTS
  3059.     rp - pointer to the RastPort to examine.
  3060.     tags - a standard tag list specifying the attributes to be read,
  3061.         and where to store their values.
  3062.  
  3063.    RESULT
  3064.  
  3065.    BUGS
  3066.  
  3067.    SEE ALSO
  3068.     GetAPen() GetBPen() GetDrMd() GetOutLinePen()
  3069.     SetRPAttrA() graphics/rpattr.h
  3070.  
  3071. graphics.library/GetSprite                         graphics.library/GetSprite
  3072.  
  3073.    NAME
  3074.     GetSprite -- Attempt to get a sprite for the simple sprite manager.
  3075.  
  3076.    SYNOPSIS
  3077.     Sprite_Number = GetSprite( sprite, pick )
  3078.         d0                a0      d0
  3079.  
  3080.     WORD GetSprite( struct SimpleSprite *, WORD );
  3081.  
  3082.    FUNCTION
  3083.     Attempt to allocate one of the eight sprites for private use
  3084.     with the simple sprite manager. This must be done before using
  3085.     further calls to the simple sprite machine. If the programmer
  3086.     wants to use 15 color sprites, they must allocate both sprites
  3087.     and set the 'SPRITE_ATTACHED' bit in the odd sprite's posctldata
  3088.     array. 
  3089.  
  3090.    INPUTS
  3091.     sprite - ptr to programmers SimpleSprite structure.
  3092.     pick - number in the range of 0-7 or
  3093.       -1 if programmer just wants the next one.
  3094.  
  3095.    RESULTS
  3096.     If pick is 0-7 attempt to allocate the sprite. If the sprite
  3097.     is already allocated then return -1.
  3098.     If pick -1 allocate the next sprite starting search at 0.
  3099.     If no sprites are available return -1 and fill -1 in num entry
  3100.     of SimpleSprite structure.
  3101.     If the sprite is available for allocation, mark it allocated
  3102.     and fill in the 'num' entry of the SimpleSprite structure.
  3103.     If successful return the sprite number.
  3104.  
  3105.    BUGS
  3106.  
  3107.    SEE ALSO
  3108.     FreeSprite() ChangeSprite() MoveSprite() GetSprite() graphics/sprite.h
  3109.  
  3110. graphics.library/GetVPModeID                     graphics.library/GetVPModeID
  3111.  
  3112.    NAME
  3113.     GetVPModeID -- get the 32 bit DisplayID from a ViewPort. (V36)
  3114.  
  3115.    SYNOPSIS
  3116.     modeID =  GetVPModeID( vp )
  3117.     d0               a0
  3118.  
  3119.     ULONG GetVPModeID( struct ViewPort *);
  3120.  
  3121.    FUNCTION
  3122.     returns the normal display modeID, if one is currently  associated 
  3123.     with this ViewPort.
  3124.  
  3125.    INPUTS
  3126.     vp -- pointer to a ViewPort structure.
  3127.  
  3128.    RESULT
  3129.     
  3130.     modeID -- a 32 bit DisplayInfoRecord identifier associated with 
  3131.           this ViewPort, or INVALID_ID.
  3132.  
  3133.    NOTES
  3134.     Test the return value of this function against INVALID_ID, not NULL.
  3135.     (INVALID_ID is defined in graphics/displayinfo.h).
  3136.  
  3137.    BUGS
  3138.  
  3139.    SEE ALSO
  3140.     graphics/displayinfo.h, ModeNotAvailable()
  3141.  
  3142. graphics.library/GfxAssociate                   graphics.library/GfxAssociate
  3143.  
  3144.    NAME
  3145.     GfxAssociate -- associate a graphics extended node with a given pointer
  3146.                     (V36)
  3147.  
  3148.    SYNOPSIS
  3149.        GfxAssociate(pointer, node);
  3150.                     A0       A1
  3151.  
  3152.     void GfxAssociate(VOID *, struct ExtendedNode *);
  3153.  
  3154.    FUNCTION
  3155.     Associate a special graphics extended data structure (each of which
  3156.     begins with an ExtendedNode structure)  with another structure via
  3157.     the other structure's pointer. Later, when you call GfxLookUp()
  3158.     with the other structure's pointer you may retrieve a pointer
  3159.     to this special graphics extended data structure, if it is
  3160.     available.
  3161.  
  3162.    INPUTS
  3163.     pointer = a pointer to a data structure.
  3164.     node = an ExtendedNode structure to associate with the pointer
  3165.     
  3166.    RESULT
  3167.     an association is created between the pointer and the node such
  3168.     that given the pointer the node can be retrieved via GfxLookUp().
  3169.  
  3170.    BUGS
  3171.  
  3172.    SEE ALSO
  3173.     graphics/gfxnodes.h GfxNew() GfxFree() GfxLookUp()
  3174.  
  3175. graphics.library/GfxFree                             graphics.library/GfxFree
  3176.  
  3177.    NAME
  3178.        GfxFree -- free a graphics extended data structure (V36)
  3179.  
  3180.    SYNOPSIS
  3181.        GfxFree( node );
  3182.                  a0
  3183.     
  3184.     void GfxFree(struct ExtendedNode *);
  3185.  
  3186.    FUNCTION
  3187.     Free a special graphics extended data structure (each of which
  3188.     begins with an ExtendedNode structure).
  3189.  
  3190.    INPUTS
  3191.     node = pointer to a graphics extended data structure obtained via
  3192.            GfxNew().
  3193.  
  3194.    RESULT
  3195.     the node is deallocated from memory. graphics will disassociate
  3196.     this special graphics extended node from any associated data
  3197.     structures, if necessary, before freeing it (see GfxAssociate()).
  3198.  
  3199.    BUGS
  3200.     an Alert() will be called if you attempt to free any structure 
  3201.     other than a graphics extended data structure obtained via GfxFree().
  3202.  
  3203.    SEE ALSO
  3204.     graphics/gfxnodes.h GfxNew() GfxAssociate() GfxLookUp()
  3205.  
  3206. graphics.library/GfxLookUP                         graphics.library/GfxLookUP
  3207.  
  3208.    NAME
  3209.         GfxLookUp -- find a graphics extended node associated with a 
  3210.              given pointer (V36)
  3211.  
  3212.    SYNOPSIS
  3213.        result = GfxLookUp( pointer );
  3214.        d0            a0
  3215.  
  3216.     struct ExtendedNode *GfxLookUp( void *);
  3217.  
  3218.    FUNCTION
  3219.     Finds a special graphics extended data structure (if any) associated
  3220.     with the pointer to a data structure (eg: ViewExtra associated with
  3221.     a View structure).
  3222.  
  3223.    INPUTS
  3224.     pointer = a pointer to a data structure which may have an 
  3225.           ExtendedNode associated with it (typically a View ).
  3226.  
  3227.    RESULT
  3228.     result = a pointer to the ExtendedNode that has previously been
  3229.          associated with the pointer.
  3230.         
  3231.    BUGS
  3232.  
  3233.    SEE ALSO
  3234.     graphics/gfxnodes.h GfxNew() GfxFree() GfxAssociate()
  3235.  
  3236. graphics.library/GfxNew                               graphics.library/GfxNew
  3237.  
  3238.    NAME
  3239.        GfxNew -- allocate a graphics extended data structure (V36)
  3240.  
  3241.    SYNOPSIS
  3242.      result = GfxNew( node_type );    
  3243.     d0         d0
  3244.  
  3245.     struct ExtendedNode *GfxNew( ULONG);
  3246.  
  3247.    FUNCTION
  3248.     Allocate a special graphics extended data structure (each of which
  3249.     begins with an ExtendedNode structure).  The type of structure to
  3250.     be allocated is specified by the node_type identifier.
  3251.  
  3252.    INPUTS
  3253.     node_type = which type of graphics extended data structure to allocate. 
  3254.             (see gfxnodes.h for identifier definitions.)
  3255.  
  3256.    RESULT
  3257.     result = a pointer to the allocated graphics node or NULL if the 
  3258.          allocation failed.
  3259.  
  3260.    BUGS
  3261.  
  3262.    SEE ALSO
  3263.     graphics/gfxnodes.h GfxFree() GfxAssociate() GfxLookUp()
  3264.  
  3265. graphics.library/InitArea                           graphics.library/InitArea
  3266.  
  3267.    NAME   
  3268.  
  3269.     InitArea -- Initialize vector collection matrix
  3270.  
  3271.    SYNOPSIS
  3272.  
  3273.        InitArea( areainfo, buffer, maxvectors )
  3274.             a0          a1      d0
  3275.  
  3276.     void InitArea(struct AreaInfo *, void *, SHORT);
  3277.     
  3278.    FUNCTION
  3279.     This function provides initialization for the vector collection matrix
  3280.     such that it has a size of (max vectors ).  The size of the region
  3281.     pointed to by buffer (short pointer) should be five (5) times as large
  3282.     as maxvectors. This size is in bytes.  Areafills done by using AreaMove,
  3283.     AreaDraw, and AreaEnd must have enough space allocated in this table to
  3284.     store all the points of the largest fill. AreaEllipse takes up two
  3285.     vectors for every call. If AreaMove/Draw/Ellipse detect too many
  3286.     vectors going into the buffer they will return -1.
  3287.  
  3288.    INPUTS
  3289.     areainfo - pointer to AreaInfo structure
  3290.     buffer - pointer to chunk of memory to collect vertices
  3291.     maxvectors - max number of vectors this buffer can hold
  3292.  
  3293.    RESULT
  3294.     Pointers are set up to begin storage of vectors done by
  3295.     AreaMove, AreaDraw, and AreaEllipse.
  3296.  
  3297.    BUGS
  3298.  
  3299.    SEE ALSO
  3300.     AreaEnd() AreaMove() AreaDraw() AreaEllipse() graphics/rastport.h
  3301.  
  3302. graphics.library/InitBitMap                       graphics.library/InitBitMap
  3303.  
  3304.    NAME   
  3305.  
  3306.        InitBitMap -- Initialize bit map structure with input values.
  3307.  
  3308.    SYNOPSIS
  3309.     InitBitMap( bm, depth, width, height )
  3310.             a0   d0     d1      d2
  3311.  
  3312.     void InitBitMap( struct BitMap *, BYTE, UWORD, UWORD );
  3313.     
  3314.    FUNCTION
  3315.     Initialize various elements in the BitMap structure to
  3316.     correctly reflect depth, width, and height.
  3317.     Must be used before use of BitMap in other graphics calls.
  3318.     The Planes[8] are not initialized and need to be set up
  3319.     by the caller.  The Planes table was put at the end of the
  3320.     structure so that it may be truncated to conserve space,
  3321.     as well as extended. All routines that use BitMap should
  3322.     only depend on existence of depth number of bitplanes.
  3323.     The Flagsh and pad fields are reserved for future use and
  3324.     should not be used by application programs.
  3325.  
  3326.    INPUTS
  3327.     bm - pointer to a BitMap structure (gfx.h)
  3328.     depth - number of bitplanes that this bitmap will have
  3329.     width - number of bits (columns) wide for this BitMap
  3330.     height- number of bits (rows) tall for this BitMap
  3331.  
  3332.    BUGS
  3333.  
  3334.    SEE ALSO
  3335.     graphics/gfx.h
  3336.  
  3337. graphics.library/InitGels                           graphics.library/InitGels
  3338.  
  3339.    NAME
  3340.     InitGels -- initialize a gel list; must be called before using gels.
  3341.  
  3342.    SYNOPSIS
  3343.     InitGels(head, tail, GInfo)
  3344.              A0    A1    A2
  3345.  
  3346.     void InitGels(struct VSprite *, struct VSprite *, struct GelsInfo *);
  3347.  
  3348.    FUNCTION
  3349.     Assigns the VSprites as the head and tail of the gel list in GfxBase.
  3350.     Links these two gels together as the keystones of the list.
  3351.     If the collHandler vector points to some memory array, sets
  3352.     the BORDERHIT vector to NULL.
  3353.  
  3354.    INPUTS
  3355.     head  = pointer to the VSprite structure to be used as the gel list head
  3356.     tail  = pointer to the VSprite structure to be used as the gel list tail
  3357.     GInfo = pointer to the GelsInfo structure to be initialized
  3358.  
  3359.    RESULT
  3360.  
  3361.    BUGS
  3362.  
  3363.    SEE ALSO
  3364.     graphics/gels.h  graphics/rastport.h
  3365.  
  3366. graphics.library/InitGMasks                       graphics.library/InitGMasks
  3367.  
  3368.    NAME
  3369.     InitGMasks -- Initialize all of the masks of an AnimOb.
  3370.  
  3371.    SYNOPSIS
  3372.     InitGMasks(anOb)
  3373.                A0
  3374.  
  3375.     void InitGMasks(struct AnimOb *);
  3376.  
  3377.    FUNCTION
  3378.     For every sequence of every component call InitMasks.
  3379.  
  3380.    INPUTS
  3381.     anOb = pointer to the AnimOb
  3382.  
  3383.    BUGS
  3384.  
  3385.    SEE ALSO
  3386.     InitMasks() graphics/gels.h
  3387.  
  3388. graphics.library/InitMasks                         graphics.library/InitMasks
  3389.  
  3390.    NAME
  3391.     InitMasks -- Initialize the BorderLine and CollMask masks of a VSprite.
  3392.  
  3393.    SYNOPSIS
  3394.     InitMasks(vs)
  3395.               A0
  3396.  
  3397.     void InitMasks(struct VSprite *);
  3398.  
  3399.    FUNCTION
  3400.     Creates the appropriate BorderLine and CollMask masks of the VSprite.
  3401.     Correctly detects if the VSprite is actually a Bob definition, handles
  3402.     the image data accordingly.
  3403.  
  3404.    INPUTS
  3405.     vs = pointer to the VSprite structure
  3406.  
  3407.    RESULT
  3408.  
  3409.    BUGS
  3410.  
  3411.    SEE ALSO
  3412.     InitGels()  graphics/gels.h
  3413.  
  3414. graphics.library/InitRastPort                   graphics.library/InitRastPort
  3415.  
  3416.    NAME
  3417.     InitRastPort -- Initialize raster port structure
  3418.  
  3419.    SYNOPSIS
  3420.        InitRastPort( rp )
  3421.               a1
  3422.  
  3423.     void InitRastPort(struct RastPort *rp);
  3424.  
  3425.    FUNCTION
  3426.        Initialize a RastPort structure to standard values.
  3427.  
  3428.    INPUTS
  3429.     rp    = pointer to a RastPort structure.
  3430.  
  3431.    RESULT
  3432.     all entries in RastPort get zeroed out, with the following exceptions:
  3433.  
  3434.         Mask, FgPen, AOLPen, and LinePtrn are set to -1.
  3435.         The DrawMode is set to JAM2
  3436.         The font is set to the standard system font
  3437.  
  3438.    NOTES
  3439.     The struct Rastport describes a control structure
  3440.        for a write-able raster. The RastPort structure
  3441.        describes how a complete single playfield display
  3442.        will be written into. A RastPort structure is
  3443.        referenced whenever any drawing or filling
  3444.        operations are to be performed on a section of
  3445.        memory.
  3446.  
  3447.        The section of memory which is being used in this
  3448.        way may or may not be presently a part of the
  3449.        current actual onscreen display memory. The name
  3450.        of the actual memory section which is linked to
  3451.        the RastPort is referred to here as a "raster" or
  3452.        as a bitmap.
  3453.  
  3454.        NOTE: Calling the routine InitRastPort only
  3455.        establishes various defaults. It does NOT
  3456.        establish where, in memory, the rasters are
  3457.        located. To do graphics with this RastPort the user
  3458.     must set up the BitMap pointer in the RastPort.
  3459.  
  3460.    BUGS
  3461.  
  3462.    SEE ALSO
  3463.        graphics/rastport.h
  3464.  
  3465. graphics.library/InitTmpRas                       graphics.library/InitTmpRas
  3466.  
  3467.    NAME
  3468.     InitTmpRas -- Initialize area of local memory for usage by
  3469.             areafill, floodfill, text.
  3470.  
  3471.    SYNOPSIS
  3472.        InitTmpRas(tmpras, buffer, size)
  3473.                       a0         a1     d0
  3474.  
  3475.     void InitTmpRas( struct TmpRas *, void *, ULONG );
  3476.  
  3477.    FUNCTION
  3478.     The area of memory pointed to by buffer is set up to be used
  3479.     by RastPort routines that may need to get some memory for
  3480.     intermediate operations in preparation to putting the graphics
  3481.     into the final BitMap.
  3482.     Tmpras is used to control the usage of buffer.
  3483.  
  3484.    INPUTS
  3485.     tmpras - pointer to a TmpRas structure to be linked into
  3486.         a RastPort
  3487.     buffer - pointer to a contiguous piece of chip memory.
  3488.     size - size in bytes of buffer
  3489.  
  3490.    RESULT
  3491.     makes buffer available for users of RastPort
  3492.  
  3493.    BUGS
  3494.     Would be nice if RastPorts could share one TmpRas.
  3495.  
  3496.    SEE ALSO
  3497.     AreaEnd() Flood() Text() graphics/rastport.h
  3498.  
  3499. graphics.library/InitView                           graphics.library/InitView
  3500.  
  3501.    NAME   
  3502.    InitView - Initialize View structure.
  3503.  
  3504.    SYNOPSIS
  3505.     InitView( view )
  3506.            a1
  3507.  
  3508.     void InitView( struct View * );
  3509.  
  3510.    FUNCTION
  3511.     Initialize View structure to default values.
  3512.  
  3513.    INPUTS
  3514.     view - pointer to a View structure
  3515.  
  3516.    RESULT
  3517.     View structure set to all 0's. (1.0,1.1.1.2)
  3518.     Then values are put in DxOffset,DyOffset to properly position
  3519.     default display about .5 inches from top and left on monitor.
  3520.     InitView pays no attention to previous contents of view.
  3521.  
  3522.    BUGS
  3523.  
  3524.    SEE ALSO
  3525.      MakeVPort graphics/view.h
  3526.  
  3527. graphics.library/InitVPort                         graphics.library/InitVPort
  3528.  
  3529.    NAME   
  3530.     InitVPort - Initialize ViewPort structure.
  3531.  
  3532.    SYNOPSIS
  3533.     InitVPort( vp )
  3534.            a0
  3535.  
  3536.     void InitViewPort( struct ViewPort * );
  3537.  
  3538.    FUNCTION
  3539.     Initialize ViewPort structure to default values.
  3540.  
  3541.    INPUTS
  3542.     vp - pointer to a ViewPort structure
  3543.  
  3544.    RESULT
  3545.     ViewPort structure set to all 0's. (1.0,1.1)
  3546.        New field added SpritePriorities, initialized to 0x24 (1.2)
  3547.  
  3548.    BUGS
  3549.  
  3550.    SEE ALSO
  3551.     MakeVPort() graphics/view.h
  3552.  
  3553. graphics.library/LoadRGB32                         graphics.library/LoadRGB32
  3554.  
  3555.    NAME
  3556.     LoadRGB32 -- Set a series of color registers for this Viewport. (V39)
  3557.  
  3558.    SYNOPSIS
  3559.     LoadRGB32(  vp,  table )
  3560.                 a0   a1
  3561.  
  3562.     void LoadRGB32( struct ViewPort *, ULONG *);
  3563.  
  3564.    INPUTS
  3565.     vp = viewport
  3566.     table = a pointer to a series of records which describe which colors to
  3567.             modify.
  3568.    RESULT
  3569.     The selected color registers are changed to match your specs.
  3570.    BUGS
  3571.  
  3572.    NOTES
  3573.  
  3574.     Passing a NULL "table" is ignored.
  3575.     The format of the table passed to this function is a series of records,
  3576.     each with the following format:
  3577.  
  3578.             1 Word with the number of colors to load
  3579.             1 Word with the first color to be loaded.
  3580.             3 longwords representing a left justified 32 bit rgb triplet.
  3581.             The list is terminated by a count value of 0.
  3582.  
  3583.        examples:
  3584.             ULONG table[]={1l<<16+0,0xffffffff,0,0,0} loads color register
  3585.                     0 with 100% red.
  3586.             ULONG table[]={256l<<16+0,r1,g1,b1,r2,g2,b2,.....0} can be used
  3587.                     to load an entire 256 color palette.
  3588.  
  3589.     Lower order bits of the palette specification will be discarded,
  3590.     depending on the color palette resolution of the target graphics
  3591.     device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
  3592.     etc. You can find out the palette range for your screen by
  3593.     querying the graphics data base.
  3594.  
  3595.     LoadRGB32 is faster than SetRGB32, even for one color.
  3596.  
  3597.    SEE ALSO
  3598.     LoadRGB4() GetColorMap() GetRGB32() SetRGB32CM() graphics/view.h
  3599. graphics.library/LoadRGB4                           graphics.library/LoadRGB4
  3600.  
  3601.    NAME
  3602.     LoadRGB4 -- Load RGB color values from table.
  3603.  
  3604.    SYNOPSIS
  3605.     LoadRGB4( vp, colors , count )
  3606.                  a0      a1     d0:16
  3607.  
  3608.     void LoadRGB4( struct ViewPort *, UWORD *, WORD);
  3609.  
  3610.    FUNCTION
  3611.        load the count words of the colormap from table starting at
  3612.     entry 0.
  3613.  
  3614.    INPUTS
  3615.     vp - pointer to ViewPort, whose colors you wish to change
  3616.     colors - pointer to table of RGB values set up as an array
  3617.              of USHORTS
  3618.              background--  0x0RGB
  3619.             color1      --  0x0RGB
  3620.             color2    --  0x0RGB
  3621.              etc.         UWORD per value.
  3622.         The colors are interpreted as 15 = maximum intensity.
  3623.                                       0 = minimum intensity.
  3624.     count    = number of UWORDs in the table to load into the
  3625.       colormap starting at color 0(background) and proceeding
  3626.       to the next higher color number
  3627.  
  3628.    RESULTS
  3629.     The ViewPort should have a pointer to a valid ColorMap to store
  3630.     the colors in.
  3631.     Updates the hardware copperlist to reflect the new colors.
  3632.     Updates the intermediate copperlist with the new colors.
  3633.  
  3634.    BUGS
  3635.  
  3636.     NOTE: Under V36 and up, it is not safe to call this function
  3637.     from an interrupt, due to semaphore protection of graphics
  3638.     copper lists.
  3639.  
  3640.    SEE ALSO
  3641.     SetRGB4() GetRGB4() GetColorMap() graphics/view.h
  3642.  
  3643. graphics.library/LoadView                           graphics.library/LoadView
  3644.  
  3645.    NAME
  3646.        LoadView -- Use a (possibly freshly created) coprocessor instruction
  3647.                    list to create the current display.
  3648.  
  3649.    SYNOPSIS
  3650.        LoadView( View )
  3651.                   A1
  3652.  
  3653.     void LoadView( struct View * );
  3654.  
  3655.    FUNCTION
  3656.     Install a new view to be displayed during the next display
  3657.     refresh pass.
  3658.        Coprocessor instruction list has been created by
  3659.        InitVPort(), MakeVPort(), and MrgCop().
  3660.  
  3661.    INPUTS
  3662.        View - a pointer to the View structure which contains the
  3663.        pointer to the constructed coprocessor instructions list, or NULL.
  3664.  
  3665.    RESULT
  3666.     If the View pointer is non-NULL, the new View is displayed, 
  3667.     according to your instructions.  The vertical blank routine 
  3668.     will pick this pointer up and direct the copper to start 
  3669.     displaying this View.
  3670.  
  3671.     If the View pointer is NULL, no View is displayed. 
  3672.  
  3673.    NOTE
  3674.     Even though a LoadView(NULL) is performed, display DMA will still be 
  3675.     active.  Sprites will continue to be displayed after a LoadView(NULL)
  3676.     unless an OFF_SPRITE is subsequently performed. 
  3677.  
  3678.    BUGS
  3679.  
  3680.    SEE ALSO
  3681.        InitVPort() MakeVPort() MrgCop() intuition/RethinkDisplay()
  3682.     graphics/view.h
  3683.  
  3684. graphics.library/LockLayerRom                   graphics.library/LockLayerRom
  3685.  
  3686.    NAME
  3687.     LockLayerRom -- Lock Layer structure by ROM(gfx lib) code.
  3688.  
  3689.    SYNOPSIS
  3690.     LockLayerRom( layer )
  3691.                a5
  3692.  
  3693.     void LockLayerRom( struct Layer * );
  3694.  
  3695.    FUNCTION
  3696.     Return when the layer is locked and no other task may
  3697.     alter the ClipRect structure in the Layer structure.
  3698.     This call does not destroy any registers.
  3699.     This call nests so that callers in this chain will not lock
  3700.     themselves out.
  3701.     Do not have the Layer locked during a call to intuition.
  3702.     There is a potential deadlock problem here, if intuition
  3703.     needs to get other locks as well.
  3704.     Having the layer locked prevents other tasks from using the
  3705.     layer library functions, most notably intuition itself. So
  3706.     be brief.
  3707.     layers.library's LockLayer is identical to LockLayerRom.
  3708.  
  3709.    INPUTS
  3710.     layer - pointer to Layer structure
  3711.  
  3712.    RESULTS
  3713.     The layer is locked and the task can render assuming the
  3714.     ClipRects will not change out from underneath it until
  3715.     an UnlockLayerRom is called.
  3716.  
  3717.    SEE ALSO
  3718.     UnlockLayerRom() layers.library/LockLayer() graphics/clip.h
  3719.  
  3720. graphics.library/MakeVPort                         graphics.library/MakeVPort
  3721.  
  3722.    NAME
  3723.     MakeVPort -- generate display copper list for a viewport.
  3724.  
  3725.    SYNOPSIS
  3726.     error =  MakeVPort( view, viewport )
  3727.      d0                   a0     a1
  3728.  
  3729.     ULONG MakeVPort( struct View *, struct ViewPort * );
  3730.  
  3731.    FUNCTION
  3732.     Uses information in the View, ViewPort, ViewPort->RasInfo to
  3733.     construct and intermediate copper list for this ViewPort.
  3734.  
  3735.    INPUTS
  3736.     view - pointer to a View structure
  3737.     viewport - pointer to a ViewPort structure
  3738.          The viewport must have valid pointer to a RasInfo.
  3739.  
  3740.    RESULTS
  3741.     constructs intermediate copper list and puts pointers in
  3742.     viewport.DspIns
  3743.     If the ColorMap ptr in ViewPort is NULL then it uses colors
  3744.     from the default color table.
  3745.     If DUALPF in Modes then there must be a second RasInfo pointed
  3746.     to by the first RasInfo
  3747.  
  3748.     From V39, MakeVPort can return a ULONG error value (previous versions
  3749.     returned void), to indicate that either not enough memory could be
  3750.     allocated for MakeVPort's use, or that the ViewPort mode
  3751.     and bitplane alignments are incorrect for the bitplane's depth.
  3752.  
  3753.     You should check for these error values - they are defined in
  3754.     <graphics/view.h>.
  3755.  
  3756.  
  3757.    BUGS
  3758.     In V37 and earlier, narrow Viewports (whose righthand edge is 
  3759.     less than 3/4 of the way across the display) do not work properly.
  3760.  
  3761.    SEE ALSO
  3762.     InitVPort() MrgCop() graphics/view.h intuition.library/MakeScreen()
  3763.     intuition.library/RemakeDisplay() intuition.library/RethinkDisplay()
  3764.  
  3765. graphics.library/ModeNotAvailable           graphics.library/ModeNotAvailable
  3766.  
  3767.    NAME
  3768.     ModeNotAvailable -- check to see if a DisplayID isn't available. (V36)
  3769.  
  3770.    SYNOPSIS
  3771.     error =  ModeNotAvailable( modeID )
  3772.     d0                   d0
  3773.  
  3774.     ULONG    ModeNotAvailable( ULONG);
  3775.  
  3776.    FUNCTION
  3777.     returns an error code, indicating why this modeID is not available, 
  3778.     or NULL if there is no reason known why this mode should not be there.
  3779.  
  3780.    INPUTS
  3781.     modeID -- a 32 bit DisplayInfoRecord identifier.
  3782.  
  3783.    RESULT
  3784.     error -- a general indication of why this modeID is not available,
  3785.          or NULL if there is no reason why it shouldn't be available.
  3786.  
  3787.    NOTE
  3788.     ULONG return values from this function are a proper superset of the
  3789.     DisplayInfo.NotAvailable field (defined in graphics/displayinfo.h).
  3790.  
  3791.     ModeNotAvailable() will return INVALID_ID when given a non-existant
  3792.     moe ID.
  3793.  
  3794.    BUGS
  3795.  
  3796.    SEE ALSO
  3797.     graphics/displayinfo.h, GetVPModeID()
  3798.  
  3799. graphics.library/Move                                   graphics.library/Move
  3800.  
  3801.    NAME
  3802.     Move -- Move graphics pen position.
  3803.  
  3804.    SYNOPSIS
  3805.     Move( rp,   x,    y)
  3806.           a1  d0:16 d1:16
  3807.  
  3808.     void Move( struct RastPort *, SHORT, SHORT );
  3809.  
  3810.    FUNCTION
  3811.     Move graphics pen position to (x,y) relative to upper left (0,0)
  3812.     of RastPort. This sets the starting point for subsequent Draw()
  3813.     and Text() calls.
  3814.  
  3815.    INPUTS
  3816.     rp - pointer to a RastPort structure
  3817.     x,y - point in the RastPort
  3818.  
  3819.    RESULTS
  3820.  
  3821.    BUGS
  3822.  
  3823.    SEE ALSO
  3824.     Draw() graphics/rastport.h
  3825.  
  3826. graphics.library/MoveSprite                       graphics.library/MoveSprite
  3827.  
  3828.    NAME
  3829.     MoveSprite -- Move sprite to a point relative to top of viewport.
  3830.  
  3831.    SYNOPSIS
  3832.     MoveSprite(vp, sprite, x, y)
  3833.                A0  A1      D0 D1
  3834.  
  3835.     void MoveSprite(struct ViewPort *,struct SimpleSprite *, WORD, WORD);
  3836.  
  3837.    FUNCTION
  3838.     Move sprite image to new place on display.
  3839.  
  3840.    INPUTS
  3841.     vp - pointer to ViewPort structure
  3842.          if vp = 0, sprite is positioned relative to View.
  3843.     sprite - pointer to SimpleSprite structure
  3844.     (x,y)  - new position relative to top of viewport or view.
  3845.  
  3846.    RESULTS
  3847.     Calculate the hardware information for the sprite and
  3848.     place it in the posctldata array. During next video display
  3849.     the sprite will appear in new position.
  3850.  
  3851.    BUGS
  3852.     Sprites really appear one pixel to the left of the position you specify.
  3853.     This bug affects the apparent display position of the sprite on the
  3854.     screen,    but does not affect the numeric position relative to the
  3855.     viewport or view. This behaviour only applies to SimpleSprites,
  3856.     not to ExtSprites.
  3857.  
  3858.  
  3859.    SEE ALSO
  3860.     FreeSprite()  ChangeSprite()  GetSprite()  graphics/sprite.h
  3861.  
  3862. graphics.library/MrgCop                               graphics.library/MrgCop
  3863.  
  3864.    NAME
  3865.        MrgCop -- Merge together coprocessor instructions.
  3866.  
  3867.    SYNOPSIS
  3868.        error = MrgCop( View )
  3869.        d0              A1
  3870.  
  3871.     ULONG MrgCop( struct View * );
  3872.  
  3873.    FUNCTION
  3874.        Merge together the display, color, sprite and user coprocessor
  3875.        instructions into a single coprocessor instruction stream.  This
  3876.        essentially creates a per-display-frame program for the coprocessor.
  3877.        This function MrgCop is used, for example, by the graphics animation
  3878.        routines which effectively add information into an essentially
  3879.        static background display.  This changes some of the user
  3880.        or sprite instructions, but not those which have formed the
  3881.        basic display in the first place.  When all forms of coprocessor
  3882.        instructions are merged together, you will have a complete per-
  3883.        frame instruction list for the coprocessor.
  3884.  
  3885.        Restrictions:  Each of the coprocessor instruction lists MUST be
  3886.        internally sorted in min to max Y-X order.  The merge routines
  3887.        depend on this! Each list must be terminated using CEND(copperlist).
  3888.  
  3889.    INPUTS
  3890.        View - a pointer to the view structure whose coprocessor
  3891.               instructions are to be merged.
  3892.  
  3893.    RESULT
  3894.        The view structure will now contain a complete, sorted/merged
  3895.        list of instructions for the coprocessor, ready to be used by
  3896.        the display processor.  The display processor is told to use
  3897.        this new instruction stream through the instruction LoadView().
  3898.  
  3899.     From V39, MrgCop() can return a ULONG error value (previous versions
  3900.     returned void), to indicate that either there was insufficient memory
  3901.     to build the system copper lists, or that MrgCop() had no work to do
  3902.     if, for example, there were no ViewPorts in the list.
  3903.  
  3904.     You should check for these error values - they are defined in
  3905.     <graphics/view.h>.
  3906.  
  3907.    BUGS
  3908.  
  3909.    SEE ALSO
  3910.        InitVPort() MakeVPort() LoadView() graphics/view.h
  3911.     intuition.library/RethinkDisplay()
  3912.  
  3913. graphics.library/NewRegion                         graphics.library/NewRegion
  3914.  
  3915.    NAME 
  3916.        NewRegion -- Get an empty region.
  3917.  
  3918.    SYNOPSIS 
  3919.        region = NewRegion()
  3920.     d0
  3921.  
  3922.     struct Region *NewRegion();
  3923.  
  3924.    FUNCTION 
  3925.     Create a Region structure, initialize it to empty, and return
  3926.     a pointer it.
  3927.  
  3928.    RESULTS
  3929.     region - pointer to initialized region. If it could not allocate
  3930.         required memory region = NULL.
  3931.  
  3932.    INPUTS 
  3933.     none
  3934.  
  3935.    BUGS 
  3936.  
  3937.    SEE ALSO
  3938.     graphics/regions.h
  3939.  
  3940. graphics.library/NextDisplayInfo             graphics.library/NextDisplayInfo
  3941.  
  3942.    NAME
  3943.     NextDisplayInfo -- iterate current displayinfo identifiers (V36)
  3944.  
  3945.    SYNOPSIS
  3946.     next_ID = NextDisplayInfo(last_ID)
  3947.     D0                        D0
  3948.  
  3949.     ULONG NextDisplayInfo(ULONG);
  3950.  
  3951.    FUNCTION
  3952.     The basic iteration function with which to find all records in the
  3953.     graphics database.  Using each ID in succession, you can then call
  3954.     FindDisplayInfo() to obtain the handle associated with each ID.
  3955.     Each ID is a 32-bit Key which uniquely identifies one record.
  3956.     The INVALID_ID is special, and indicates the end-of-list.
  3957.  
  3958.    INPUTS
  3959.     last_ID - previous displayinfo identifier
  3960.               or INVALID_ID if beginning iteration.
  3961.  
  3962.    RESULT
  3963.     next_ID - subsequent displayinfo identifier
  3964.               or INVALID_ID if no more records.
  3965.  
  3966.    BUGS
  3967.  
  3968.    SEE ALSO
  3969.     FindDisplayInfo(), GetDisplayInfoData()
  3970.     graphics/displayinfo.h
  3971.  
  3972. graphics.library/ObtainBestPenA               graphics.library/ObtainBestPenA
  3973.  
  3974.    NAME
  3975.     ObtainBestPenA --- Search for the closest color match, or allocate a
  3976.                        new one. (V39)
  3977.     ObtainBestPen  --- varargs stub for ObtainBestPenA
  3978.  
  3979.    SYNOPSIS
  3980.     color | -1 =ObtainBestPenA(  cm,  R,   G,    B,    taglist)
  3981.                                  a0   d1   d2    d3       a1
  3982.  
  3983.     LONG ObtainBestPenA( struct ColorMap *, ULONG, ULONG, 
  3984.             ULONG, struct TagItem *);
  3985.  
  3986.     color = ObtainBestPen(cm,r,g,b,tags....);
  3987.  
  3988.    INPUTS
  3989.     cm = colormap
  3990.     R = red level   (32 bit left justified fraction)
  3991.     G = green level (32 bit left justified fraction)
  3992.     B = blue level  (32 bit left justified fraction)
  3993.     taglist = a pointer to a standard tag list specifying the color
  3994.               matching settings desired:
  3995.  
  3996.             OBP_Precision - specifies the desired precision for the
  3997.                     match. Should be PRECISION_GUI, PRECISION_ICON, or
  3998.                     PRECISION_IMAGE or PRECISION_EXACT.
  3999.                     Defaults to PRECISION_IMAGE.
  4000.  
  4001.             OBP_FailIfBad - specifies that you want ObtainBestPen to return
  4002.                     a failure value if there is not a color within the
  4003.                     given tolerance, instead of returning the closest color.
  4004.                     With OBP_FailIfBad==FALSE, ObtainBestPen will only fail
  4005.                     if the ViewPort contains no sharable colors.
  4006.                     Defaults to FALSE.
  4007.  
  4008.  
  4009.    FUNCTION
  4010.     This function can be used by applications to figure out
  4011.     what pen to use to represent a given color.
  4012.  
  4013.     The system will attempt to find the color in your viewport closest
  4014.     to the specified color. If there is no color within your tolerance,
  4015.     then a new one will be allocated, if available. If none is available,
  4016.     then the closest one found will be returned. 
  4017.     
  4018.    RESULT
  4019.     The correct pen value, or -1 if no sharable palette entries are available.
  4020.  
  4021.  
  4022.    BUGS
  4023.  
  4024.    NOTES
  4025.     If this call succceeds, then you must call ReleasePen() when you are
  4026.     done with the color.
  4027.  
  4028.     The error metric used for ObtainBestPen() is based on the magnitude
  4029.     squared between the two RGB values, scaled by the percentage of free
  4030.     entries.
  4031.  
  4032.    SEE ALSO
  4033.     GetColorMap() ObtainPen() ReleasePen() 
  4034. graphics.library/ObtainPen                         graphics.library/ObtainPen
  4035.  
  4036.    NAME
  4037.     ObtainPen -- Obtain a free palette entry for use by your program. (V39)
  4038.  
  4039.  
  4040.    SYNOPSIS
  4041.     n = ObtainPen( cm, n, r, g, b, flags)
  4042.     d0           a0 d0  d1 d2 d3  d4
  4043.  
  4044.     LONG ObtainPen(struct ColorMap *,ULONG,ULONG,ULONG,ULONG,ULONG);
  4045.  
  4046.    FUNCTION
  4047.     Attempt to allocate an entry in the colormap for use by the application.
  4048.     If successful, you should ReleasePen() this entry after you have finished
  4049.     with it.
  4050.     
  4051.     Applications needing exclusive use of a color register (say for color
  4052.     cycling) will typically call this function with n=-1. Applications needing
  4053.     only the shared use of a color will typically use ObtainBestPenA() instead.
  4054.     Other uses of this function are rare.
  4055.  
  4056.    INPUTS
  4057.     cm  =  A pointer to a color map created by GetColorMap().
  4058.     n   =  The index of the desired entry, or -1 if any one is acceptable
  4059.     rgb =  The RGB values (32 bit left justified fractions) to set the new
  4060.            palette entry to.
  4061.     flags= PEN_EXCLUSIVE - tells the system that you want exclusive
  4062.            (non-shared) use of this pen value. Default is shared access.
  4063.  
  4064.            PEN_NO_SETCOLOR - tells the system to not change the rgb values
  4065.            for the selected pen. Really only makes sense for exclusive pens.
  4066.  
  4067.  
  4068.    RESULTS
  4069.  
  4070.     n   =  The allocated pen. -1 will be returned if there is no pen available
  4071.            for you.
  4072.  
  4073.    BUGS
  4074.  
  4075.    NOTES
  4076.     When you allocate a palette entry in non-exclusive mode, you
  4077.     should not change it (via SetRGB32), because other programs on the
  4078.     same screen may be using it. With PEN_EXCLUSIVE mode, you can
  4079.     change the returned entry at will.
  4080.  
  4081.     To avoid visual artifacts, you should not free up a palette
  4082.     entry until you are sure that your application is not displaying
  4083.     any pixels in that color at the time you free it. Otherwise, another
  4084.     task could allocate and set that color index, thus changing the colors
  4085.     of your pixels.
  4086.  
  4087.     Generally, for shared access, you should use ObtainBestPenA()
  4088.     instead, since it will not allocate a new color if there is one
  4089.     "close enough" to the one you want already.
  4090.     If there is no Palextra attached to the colormap, then this
  4091.     routine will always fail. 
  4092.  
  4093.    SEE ALSO
  4094.     GetColorMap() ReleasePen() AttachPalExtra() ObtainBestPenA()
  4095.  
  4096. graphics.library/OpenFont                           graphics.library/OpenFont
  4097.  
  4098.    NAME
  4099.     OpenFont -- Get a pointer to a system font.
  4100.  
  4101.    SYNOPSIS
  4102.     font = OpenFont(textAttr)
  4103.     D0              A0
  4104.  
  4105.     struct TextFont *OpenFont(struct TextAttr *);
  4106.  
  4107.    FUNCTION
  4108.     This function searches the system font space for the graphics
  4109.     text font that best matches the attributes specified.  The
  4110.     pointer to the font returned can be used in subsequent
  4111.     SetFont and CloseFont calls.  It is important to match this
  4112.     call with a corresponding CloseFont call for effective
  4113.     management of ram fonts.
  4114.  
  4115.    INPUTS
  4116.     textAttr - a TextAttr or TTextAttr structure that describes the
  4117.                text font attributes desired.
  4118.  
  4119.    RESULT
  4120.     font is zero if the desired font cannot be found.  If the named
  4121.     font is found, but the size and style specified are not
  4122.     available, a font with the nearest attributes is returned.
  4123.  
  4124.    BUGS
  4125.     Prior to V39 this function would return a TextFont pointer
  4126.     for any font which matched exactly in Y size, regardless of
  4127.     differences in DPI, or DotSize.
  4128.  
  4129.     As part of fixing this bug it is REQUIRED that you use pass the
  4130.     same TextAttr (or TTextAttr) to this function that was used when
  4131.     OpenDiskFont() was called.
  4132.  
  4133.     OpenFont(), and OpenDiskFont() use WeighTAMatch() to measure
  4134.     how well two fonts match.  WeightTAMatch() was a public function
  4135.     in graphics.library V36-V37; it is now a system PRIVATE function
  4136.     as of V39.
  4137.  
  4138.    SEE ALSO
  4139.     CloseFont()  SetFont()
  4140.     diskfont.library/OpenDiskFont  graphics/text.h
  4141.     intuition/intuition.h
  4142.  
  4143. graphics.library/OpenMonitor                     graphics.library/OpenMonitor
  4144.  
  4145.    NAME
  4146.        OpenMonitor -- open a named MonitorSpec (V36)
  4147.  
  4148.    SYNOPSIS
  4149.        mspc = OpenMonitor( monitor_name , display_id)
  4150.        d0                  a1           d0
  4151.  
  4152.        struct MonitorSpec *OpenMonitor( char *, ULONG );
  4153.  
  4154.    FUNCTION
  4155.        Locate and open a named MonitorSpec.
  4156.  
  4157.    INPUTS
  4158.        monitor_name - a pointer to a null terminated string.
  4159.        display_id - an optional 32 bit monitor/mode identifier 
  4160.  
  4161.    RESULTS
  4162.        mspc - a pointer to an open MonitorSpec structure.
  4163.               NULL if MonitorSpec could not  be opened.
  4164.  
  4165.    NOTE
  4166.     if monitor_name is non-NULL, the monitor will be opened by name.
  4167.     if monitor_name is NULL the monitor will be opened by optional ID.
  4168.     if both monitor_name and display_id are NULL returns default monitor.
  4169.  
  4170.    BUGS
  4171.  
  4172.    SEE ALSO
  4173.        CloseMonitor() graphics/monitor.h
  4174.  
  4175. graphics.library/OrRectRegion                   graphics.library/OrRectRegion
  4176.  
  4177.    NAME 
  4178.        OrRectRegion -- Perform 2d OR operation of rectangle
  4179.                        with region, leaving result in region.
  4180.  
  4181.    SYNOPSIS 
  4182.        status = OrRectRegion(region,rectangle) 
  4183.          d0                    a0      a1 
  4184.  
  4185.     BOOL OrRectRegion( struct Region *, struct Rectangle * );
  4186.  
  4187.    FUNCTION 
  4188.        If any portion of rectangle is not in the region then add
  4189.        that portion to the region.
  4190.  
  4191.    INPUTS 
  4192.        region - pointer to Region structure
  4193.        rectangle - pointer to Rectangle structure 
  4194.  
  4195.    RESULTS
  4196.     status - return TRUE if successful operation
  4197.          return FALSE if ran out of memory
  4198.  
  4199.    BUGS 
  4200.  
  4201.    SEE ALSO
  4202.     AndRectRegion() OrRegionRegion() graphics/regions.h
  4203.  
  4204. graphics.library/OrRegionRegion               graphics.library/OrRegionRegion
  4205.  
  4206.    NAME 
  4207.        OrRegionRegion -- Perform 2d OR operation of one region
  4208.                        with second region, leaving result in second region 
  4209.  
  4210.    SYNOPSIS 
  4211.        status = OrRegionRegion(region1,region2) 
  4212.          d0                       a0      a1 
  4213.  
  4214.     BOOL OrRegionRegion( struct Region *, struct Region * );
  4215.  
  4216.    FUNCTION 
  4217.        If any portion of region1  is not in the region then add
  4218.        that portion to the region2
  4219.  
  4220.    INPUTS 
  4221.        region1 - pointer to Region structure
  4222.        region2 - pointer to Region structure
  4223.  
  4224.    RESULTS
  4225.     status - return TRUE if successful operation
  4226.          return FALSE if ran out of memory
  4227.  
  4228.    BUGS 
  4229.  
  4230.    SEE ALSO
  4231.      OrRectRegion() graphics/regions.h
  4232.  
  4233. graphics.library/OwnBlitter                       graphics.library/OwnBlitter
  4234.  
  4235.    NAME
  4236.        OwnBlitter -- get the blitter for private usage
  4237.  
  4238.    SYNOPSIS
  4239.        OwnBlitter()
  4240.  
  4241.     void OwnBlitter( void );
  4242.  
  4243.    FUNCTION
  4244.     If blitter is available return immediately with the blitter
  4245.     locked for your exclusive use. If the blitter is not available
  4246.     put task to sleep. It will be awakened as soon as the blitter
  4247.     is available. When the task first owns the blitter the blitter
  4248.     may still be finishing up a blit for the previous owner. You
  4249.     must do a WaitBlit before actually using the blitter registers.
  4250.  
  4251.     Calls to OwnBlitter() do not nest. If a task that owns the
  4252.     blitter calls OwnBlitter() again, a lockup will result. 
  4253.     (Same situation if the task calls a system function
  4254.     that tries to own the blitter).
  4255.  
  4256.    INPUTS
  4257.     NONE
  4258.  
  4259.    RETURNS
  4260.     NONE
  4261.  
  4262.    SEE ALSO
  4263.     DisownBlitter() WaitBlit()
  4264. graphics.library/PolyDraw                           graphics.library/PolyDraw
  4265.  
  4266.    NAME
  4267.     PolyDraw -- Draw lines from table of (x,y) values.
  4268.  
  4269.    SYNOPSIS
  4270.     PolyDraw( rp, count , array )
  4271.           a1   d0      a0
  4272.  
  4273.     void PolyDraw( struct RastPort *, WORD, WORD * );
  4274.  
  4275.    FUNCTION
  4276.     starting with the first pair in the array, draw connected lines to
  4277.     it and every successive pair.
  4278.  
  4279.    INPUTS
  4280.     rp - pointer to RastPort structure
  4281.     count -  number of (x,y) pairs in the array
  4282.     array - pointer to first (x,y) pair
  4283.  
  4284.    BUGS
  4285.  
  4286.    SEE ALSO
  4287.     Draw() Move() graphics/rastport.h
  4288.  
  4289. graphics.library/QBlit                                 graphics.library/QBlit
  4290.  
  4291.    NAME
  4292.  
  4293.     QBlit -- Queue up a request for blitter usage
  4294.  
  4295.    SYNOPSIS
  4296.     QBlit( bp )
  4297.            a1
  4298.  
  4299.     void QBlit( struct bltnode * );
  4300.  
  4301.    FUNCTION
  4302.     Link a request for the use of the blitter to the end of the
  4303.        current blitter queue.  The pointer bp points to a blit structure
  4304.        containing, among other things, the link information, and the
  4305.        address of your routine which is to be called when the blitter
  4306.        queue finally gets around to this specific request.  When your
  4307.        routine is called, you are in control of the blitter ... it is
  4308.        not busy with anyone else's requests.  This means that you can
  4309.        directly specify the register contents and start the blitter.
  4310.        See the description of the blit structure and the uses of QBlit
  4311.        in the section titled Graphics Support in the OS Kernel Manual.
  4312.        Your code must be written to run either in supervisor or user
  4313.        mode on the 68000.
  4314.  
  4315.    INPUTS
  4316.     bp - pointer to a blit structure
  4317.  
  4318.    RESULT
  4319.     Your routine is called when the blitter is ready for you.
  4320.     In general requests for blitter usage through this channel are
  4321.     put in front of those who use the blitter via OwnBlitter and
  4322.     DisownBlitter. However for small blits there is more overhead
  4323.     using the queuer than Own/Disown Blitter.
  4324.  
  4325.    NOTES
  4326.     Code which uses QBlit(), or QBSBlit() should make use of
  4327.     the pointer to a cleanup routine in the bltnode structure.
  4328.     The cleanup routine may be called on the context of an
  4329.     interrupt, therefore the routine may set a flag, and signal
  4330.     a task, but it may not call FreeMem() directly.  Use of
  4331.     the cleanup routine is the only safe way to signal that
  4332.     your bltnode has completed.
  4333.  
  4334.    BUGS
  4335.     QBlit(), and QBSBlit() have been rewritten for V39 due to
  4336.     various long standing bugs in earlier versions of this code.
  4337.  
  4338.    SEE ALSO
  4339.     QBSBlit() hardware/blit.h
  4340.  
  4341. graphics.library/QBSBlit                             graphics.library/QBSBlit
  4342.  
  4343.    NAME
  4344.  
  4345.     QBSBlit -- Synchronize the blitter request with the video beam.
  4346.  
  4347.    SYNOPSIS
  4348.  
  4349.     QBSBlit( bsp )
  4350.          a1
  4351.  
  4352.     void QBSBlit( struct bltnode * );
  4353.  
  4354.    FUNCTION
  4355.     Call a user routine for use of the blitter, enqueued separately from
  4356.        the QBlit queue.  Calls the user routine contained in the blit
  4357.        structure when the video beam is located at a specified position
  4358.        onscreen.   Useful when you are trying to blit into a visible part
  4359.        of the screen and wish to perform the data move while the beam is
  4360.        not trying to display that same area.  (prevents showing part of
  4361.        an old display and part of a new display simultaneously).  Blitter
  4362.        requests on the QBSBlit queue take precedence over those on the
  4363.        regular blitter queue. The beam position is specified in the blitnode.
  4364.  
  4365.    INPUTS
  4366.     bsp - pointer to a blit structure.  See description in the
  4367.              Graphics Support section of the manual for more info.
  4368.  
  4369.    RESULT
  4370.        User routine is called when the QBSBlit queue reaches this
  4371.        request AND the video beam is in the specified position.
  4372.        If there are lots of blits going on and the video beam
  4373.        has wrapped around back to the top it will call all the
  4374.        remaining bltnodes as fast as it can to try and catch up.
  4375.  
  4376.    NOTES
  4377.        QBlit(), and QBSBlit() have been rewritten for V39.  Queued
  4378.        blits are now handled in FIFO order.  Tasks trying to
  4379.        OwnBlitter() are now given a fair share of the total
  4380.        blitter time available.  QBSBlit() is no longer queued
  4381.        separately from nodes added by QBlit().  This fixes the
  4382.        ordering dependencies listed under BUGS in prior autodoc
  4383.        notes. 
  4384.  
  4385.    BUGS
  4386.  
  4387.    SEE ALSO
  4388.     QBlit() hardware/blit.h
  4389.  
  4390. graphics.library/ReadPixel                         graphics.library/ReadPixel
  4391.  
  4392.    NAME
  4393.        ReadPixel -- read the pen number value of the pixel at a
  4394.                     specified x,y location within a certain RastPort.
  4395.  
  4396.    SYNOPSIS
  4397.        penno = ReadPixel( rp,    x,    y )
  4398.          d0               a1  d0:16 d1:16
  4399.  
  4400.     LONG ReadPixel( struct RastPort *, SHORT, SHORT );
  4401.  
  4402.    FUNCTION
  4403.        Combine the bits from each of the bit-planes used to describe
  4404.        a particular RastPort into the pen number selector which that
  4405.        bit combination normally forms for the system hardware selection
  4406.        of pixel color.
  4407.  
  4408.    INPUTS
  4409.        rp -  pointer to a RastPort structure
  4410.        (x,y) a point in the RastPort
  4411.  
  4412.    RESULT
  4413.        penno - the pen number of the pixel at (x,y) is returned.
  4414.         -1 is returned if the pixel cannot be read for some reason.
  4415.  
  4416.    BUGS
  4417.  
  4418.    SEE ALSO
  4419.        WritePixel()    graphics/rastport.h
  4420.  
  4421. graphics.library/ReadPixelArray8             graphics.library/ReadPixelArray8
  4422.  
  4423.    NAME
  4424.     ReadPixelArray8 -- read the pen number value of a rectangular array
  4425.     of pixels starting at a specified x,y location and continuing 
  4426.     through to another x,y location within a certain RastPort. (V36)
  4427.  
  4428.    SYNOPSIS
  4429.     count = ReadPixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
  4430.     D0                      A0 D0:16  D1:16  D2:16 D3:16 A2    A1
  4431.  
  4432.      LONG ReadPixelArray8(struct  RastPort *, UWORD, UWORD, UWORD, UWORD,
  4433.        UBYTE *, struct RastPort *);
  4434.  
  4435.    FUNCTION
  4436.     For each pixel in a rectangular region, combine the bits from each
  4437.     of the bit-planes used to describe a particular RastPort into the pen
  4438.     number selector which that bit combination normally forms for the
  4439.     system hardware selection of pixel color.
  4440.  
  4441.    INPUTS
  4442.     rp    -  pointer to a RastPort structure
  4443.     (xstart,ystart) - starting point in the RastPort
  4444.     (xstop,ystop)   - stopping point in the RastPort
  4445.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  4446.             allocate at least ((((width+15)>>4)<<4)*(ystop-ystart+1)) bytes.
  4447.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  4448.              temporary memory allocated for
  4449.              temprp->BitMap with Rows set == 1,
  4450.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  4451.              and temporary memory allocated for 
  4452.              temprp->BitMap->Planes[])
  4453.  
  4454.    RESULT
  4455.     For each pixel in the array:
  4456.         Pen - (0..255) number at that position is returned
  4457.     count   - the number of pixels read.
  4458.  
  4459.    NOTE
  4460.     xstop must be >= xstart
  4461.     ystop must be >= ystart
  4462.  
  4463.    BUGS
  4464.  
  4465.    SEE ALSO
  4466.     ReadPixel()  ReadPixelLine8()  graphics/rastport.h
  4467.  
  4468. graphics.library/ReadPixelLine8               graphics.library/ReadPixelLine8
  4469.  
  4470.    NAME
  4471.     ReadPixelLine8 -- read the pen number value of a horizontal line
  4472.     of pixels starting at a specified x,y location and continuing
  4473.     right for count pixels. (V36)
  4474.  
  4475.    SYNOPSIS
  4476.     count = ReadPixelLine8(rp,xstart,ystart,width,array,temprp)
  4477.     D0                     A0 D0:16  D1:16  D2    A2    A1
  4478.  
  4479.     LONG ReadPixelLine8(struct RastPort *, UWORD, UWORD, UWORD,
  4480.          UBYTE *, struct RastPort * );
  4481.  
  4482.    FUNCTION
  4483.     For each pixel in a rectangular region, combine the bits from each
  4484.     of the bit-planes used to describe a particular RastPort into the pen
  4485.     number selector which that bit combination normally forms for the
  4486.     system hardware selection of pixel color.
  4487.  
  4488.    INPUTS
  4489.     rp    - pointer to a RastPort structure
  4490.     (x,y) - a point in the RastPort
  4491.     width - count of horizontal pixels to read
  4492.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  4493.             allocate at least (((width+15)>>4)<<4) bytes.
  4494.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  4495.              temporary memory allocated for
  4496.              temprp->BitMap with Rows set == 1,
  4497.              temprp->BytesPerRow == (((width+15)>>4)<<1),
  4498.              and temporary memory allocated for 
  4499.              temprp->BitMap->Planes[])
  4500.  
  4501.    RESULT
  4502.     For each pixel in the array:
  4503.         Pen - (0..255) number at that position is returned
  4504.     count   - the number of pixels read.
  4505.  
  4506.    NOTE
  4507.     width must be non negative
  4508.  
  4509.    BUGS
  4510.  
  4511.    SEE ALSO
  4512.     ReadPixel()  graphics/rastport.h
  4513.  
  4514. graphics.library/RectFill                           graphics.library/RectFill
  4515.  
  4516.    NAME
  4517.        RectFill -- Fill a rectangular region in a RastPort.
  4518.  
  4519.    SYNOPSIS
  4520.  
  4521.     RectFill( rp, xmin, ymin, xmax, ymax)
  4522.                  a1  d0:16 d1:16 d2:16 d3:16
  4523.  
  4524.     void RectFill( struct RastPort *, SHORT, SHORT, SHORT, SHORT );
  4525.  
  4526.    FUNCTION
  4527.     Fills  the  rectangular  region  specified  by  the
  4528.     parameters  with the chosen pen  colors,  areafill
  4529.     pattern, and drawing mode. If no areafill pattern is
  4530.     specified, fill the rectangular region with the FgPen
  4531.     color, taking into account the drawing mode.
  4532.  
  4533.    INPUTS
  4534.     rp - pointer to a RastPort structure
  4535.     (xmin,ymin) (xmax,ymax) are the coordinates of the upper
  4536.         left corner and the lower right corner, respectively, of the
  4537.             rectangle.
  4538.    NOTE
  4539.  
  4540.     The following relation MUST be true:
  4541.         (xmax >= xmin) and (ymax >= ymin)  
  4542.  
  4543.    BUGS
  4544.     Complement mode with FgPen complements all bitplanes.
  4545.  
  4546.    SEE ALSO
  4547.     AreaEnd() graphics/rastport.h
  4548.  
  4549. graphics.library/ReleasePen                       graphics.library/ReleasePen
  4550.  
  4551.    NAME
  4552.     ReleasePen -- Release an allocated palette entry to the free pool. (V39)
  4553.  
  4554.  
  4555.    SYNOPSIS
  4556.     ReleasePen( cm, n)
  4557.                 a0 d0
  4558.  
  4559.     void ReleasePen( Struct ColorMap *, ULONG);
  4560.  
  4561.    FUNCTION
  4562.     Return the palette entry for use by other applications.
  4563.     If the reference count for this palette entry goes to zero,
  4564.     then it may be reset to another RGB value.
  4565.  
  4566.    INPUTS
  4567.        cm  =  A pointer to a color map created by GetColorMap().
  4568.  
  4569.     n   =  A palette index obtained via any of the palette allocation
  4570.            functions. Passing a -1 will result in this call doing
  4571.            nothing.
  4572.  
  4573.    BUGS
  4574.  
  4575.    NOTES
  4576.     This function works for both shared and exclusive palette entries.
  4577.  
  4578.    SEE ALSO
  4579.     GetColorMap() ObtainPen() ObtainBestPenA()
  4580.  
  4581. graphics.library/RemBob                               graphics.library/RemBob
  4582.  
  4583.    NAME
  4584.     RemBob -- Macro to remove a Bob from the gel list.
  4585.  
  4586.    SYNOPSIS
  4587.     RemBob(bob)
  4588.  
  4589.     RemBob(struct Bob *);
  4590.  
  4591.    FUNCTION
  4592.     Marks a Bob as no-longer-required.  The gels internal code then
  4593.     removes the Bob from the list of active gels the next time
  4594.     DrawGList is executed. This is implemented as a macro.
  4595.     If the user is double-buffering the Bob, it could take two
  4596.     calls to DrawGList before the Bob actually disappears from
  4597.     the RastPort.
  4598.  
  4599.    INPUTS
  4600.     Bob = pointer to the Bob to be removed
  4601.  
  4602.    RESULT
  4603.  
  4604.    BUGS
  4605.  
  4606.    SEE ALSO
  4607.     RemIBob()  DrawGList()  graphics/gels.h  graphics/gfxmacros.h
  4608.  
  4609. graphics.library/RemFont                             graphics.library/RemFont
  4610.  
  4611.    NAME
  4612.     RemFont -- Remove a font from the system list.
  4613.  
  4614.    SYNOPSIS
  4615.     RemFont(textFont)
  4616.             A1
  4617.  
  4618.     void RemFont(struct TextFont *);
  4619.  
  4620.    FUNCTION
  4621.     This function removes a font from the system, ensuring that
  4622.     access to it is restricted to those applications that
  4623.     currently have an active pointer to it: i.e. no new SetFont
  4624.     requests to this font are satisfied.
  4625.  
  4626.    INPUTS
  4627.     textFont - the TextFont structure to remove.
  4628.  
  4629.    RESULT
  4630.  
  4631.    BUGS
  4632.  
  4633.    SEE ALSO
  4634.     SetFont()  AddFont()  graphics/text.h
  4635.  
  4636. graphics.library/RemIBob                             graphics.library/RemIBob
  4637.  
  4638.    NAME
  4639.     RemIBob -- Immediately remove a Bob from the gel list and the RastPort.
  4640.  
  4641.    SYNOPSIS
  4642.     RemIBob(bob, rp, vp)
  4643.             A0   A1  A2
  4644.  
  4645.     void RemIBob(struct Bob *, struct RastPort *, struct ViewPort *);
  4646.  
  4647.    FUNCTION
  4648.     Removes a Bob immediately by uncoupling it from the gel list and
  4649.     erases it from the RastPort.
  4650.  
  4651.    INPUTS
  4652.     bob = pointer to the Bob to be removed
  4653.     rp  = pointer to the RastPort if the Bob is to be erased
  4654.     vp  = pointer to the ViewPort for beam-synchronizing
  4655.  
  4656.    RESULT
  4657.  
  4658.    BUGS
  4659.  
  4660.    SEE ALSO
  4661.     InitGels()  RemVSprite()  graphics/gels.h
  4662.  
  4663. graphics.library/RemVSprite                       graphics.library/RemVSprite
  4664.  
  4665.    NAME
  4666.     RemVSprite -- Remove a VSprite from the current gel list.
  4667.  
  4668.    SYNOPSIS
  4669.     RemVSprite(vs)
  4670.                A0
  4671.  
  4672.     void RemVSprite(struct VSprite *);
  4673.  
  4674.    FUNCTION
  4675.     Unlinks the VSprite from the current gel list.
  4676.  
  4677.    INPUTS
  4678.     vs = pointer to the VSprite structure to be removed from the gel list
  4679.  
  4680.    RESULT
  4681.  
  4682.    BUGS
  4683.  
  4684.    SEE ALSO
  4685.     InitGels()  RemIBob()  graphics/gels.h
  4686.  
  4687. graphics.library/ScalerDiv                         graphics.library/ScalerDiv
  4688.  
  4689.    NAME
  4690.     ScalerDiv -- Get the scaling result that BitMapScale would. (V36)
  4691.  
  4692.    SYNOPSIS
  4693.     result = ScalerDiv(factor, numerator, denominator)
  4694.     D0                 D0      D1         D2
  4695.  
  4696.     UWORD ScalerDiv(UWORD, UWORD, UWORD);
  4697.  
  4698.    FUNCTION
  4699.     Calculate the expression (factor*numerator/denominator) such
  4700.     that the result is the same as the width of the destination
  4701.     result of BitMapScale when the factor here is the width of
  4702.     the source, and the numerator and denominator are the
  4703.     XDestFactor and XSrcFactor for BitMapScale.
  4704.  
  4705.    INPUTS
  4706.     factor                 - a number in the range 0..16383
  4707.     numerator, denominator - numbers in the range 1..16383
  4708.  
  4709.    RESULT
  4710.     this returns factor*numerator/denominator
  4711.  
  4712. graphics.library/ScrollRaster                   graphics.library/ScrollRaster
  4713.  
  4714.    NAME
  4715.    ScrollRaster -- Push bits in rectangle in raster around by
  4716.                    dx,dy towards 0,0 inside rectangle.
  4717.    SYNOPSIS
  4718.    ScrollRaster(rp, dx, dy, xmin, ymin, xmax, ymax)
  4719.                 A1  D0  D1  D2    D3    D4    D5
  4720.  
  4721.    void ScrollRaster
  4722.         (struct RastPort *, WORD, WORD, WORD, WORD, WORD, WORD);
  4723.  
  4724.    FUNCTION
  4725.    Move the bits in the raster by (dx,dy) towards (0,0)
  4726.    The space vacated is RectFilled with BGPen.
  4727.    Limit the scroll operation to the rectangle defined
  4728.    by (xmin,ymin)(xmax,ymax). Bits outside will not be
  4729.    affected. If xmax,ymax is outside the rastport then use
  4730.    the lower right corner of the rastport.
  4731.    If you are dealing with a SimpleRefresh layered RastPort you
  4732.    should check rp->Layer->Flags & LAYERREFRESH to see if
  4733.    there is any damage in the damage list.  If there is you should
  4734.    call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
  4735.    routine sequence.
  4736.  
  4737.    INPUTS
  4738.    rp - pointer to a RastPort structure
  4739.    dx,dy are integers that may be positive, zero, or negative
  4740.    xmin,ymin - upper left of bounding rectangle
  4741.    xmax,ymax - lower right of bounding rectangle
  4742.  
  4743.    EXAMPLE
  4744.    ScrollRaster(rp,0,1,minx,miny,maxx,maxy) /* shift raster up by one row */
  4745.    ScrollRaster(rp,-1,-1,minx,miny,maxx,maxy)
  4746.           /* shift raster down and to the right by 1 pixel
  4747.  
  4748.    BUGS
  4749.    In 1.2/V1.3 if you ScrollRaster a SUPERBITMAP exactly left or 
  4750.    right, and there is no TmpRas attached to the RastPort, the system
  4751.    will allocate one for you, but will never free it or record its 
  4752.    location. This bug has been fixed for V36.  The workaround for
  4753.    1.2/1.3 is to attach a valid TmpRas of size at least 
  4754.    MAXBYTESPERROW to the RastPort before the call.
  4755.  
  4756.    Beginning with V36 ScrollRaster adds the shifted areas into the 
  4757.    damage list for SIMPLE_REFRESH windows. Due to unacceptable 
  4758.    system overhead, the decision was made NOT to propagate this 
  4759.    shifted area damage for SMART_REFRESH windows.
  4760.  
  4761.    SEE ALSO
  4762.    ScrollRasterBF() graphics/rastport.h
  4763.  
  4764. graphics.library/ScrollRasterBF               graphics.library/ScrollRasterBF
  4765.  
  4766.    NAME
  4767.    ScrollRasterBF -- Push bits in rectangle in raster around by
  4768.                    dx,dy towards 0,0 inside rectangle. Newly empty areas
  4769.            will be filled via EraseRect(). (V39)
  4770.  
  4771.    SYNOPSIS
  4772.    ScrollRasterBF(rp, dx, dy, xmin, ymin, xmax, ymax)
  4773.                 A1  D0  D1  D2    D3    D4    D5
  4774.  
  4775.    void ScrollRasterBF
  4776.         (struct RastPort *, WORD, WORD, WORD, WORD, WORD, WORD);
  4777.  
  4778.    FUNCTION
  4779.    Move the bits in the raster by (dx,dy) towards (0,0)
  4780.    The space vacated is filled by calling EraseRect().
  4781.    Limit the scroll operation to the rectangle defined
  4782.    by (xmin,ymin)(xmax,ymax). Bits outside will not be
  4783.    affected. If xmax,ymax is outside the rastport then use
  4784.    the lower right corner of the rastport.
  4785.    If you are dealing with a SimpleRefresh layered RastPort you
  4786.    should check rp->Layer->Flags & LAYERREFRESH to see if
  4787.    there is any damage in the damage list.  If there is you should
  4788.    call the appropriate BeginRefresh(Intuition) or BeginUpdate(graphics)
  4789.    routine sequence.
  4790.  
  4791.    INPUTS
  4792.    rp - pointer to a RastPort structure
  4793.    dx,dy are integers that may be positive, zero, or negative
  4794.    xmin,ymin - upper left of bounding rectangle
  4795.    xmax,ymax - lower right of bounding rectangle
  4796.  
  4797.    NOTES
  4798.  
  4799.    This call is exactly the same as ScrollRaster, except that it calls
  4800.    EraseRect() instead of RectFill() when clearing the newly exposed
  4801.    area. This allows use of a custom layer backfill hook.
  4802.  
  4803.    BUGS
  4804.  
  4805.    SEE ALSO
  4806.    ScrollRaster() EraseRect() intuition.library/ScrollWindowRaster() 
  4807.    graphics/rastport.h
  4808.  
  4809. graphics.library/ScrollVPort                     graphics.library/ScrollVPort
  4810.  
  4811.    NAME
  4812.     ScrollVPort -- Reinterpret RasInfo information in ViewPort to reflect
  4813.             the current Offset values.
  4814.  
  4815.    SYNOPSIS
  4816.     ScrollVPort( vp )
  4817.              a0
  4818.  
  4819.     void ScrollVPort(struct ViewPort *vp);
  4820.  
  4821.    FUNCTION
  4822.     After the programmer has adjusted the Offset values in
  4823.     the RasInfo structures of ViewPort, change the
  4824.     the copper lists to reflect the the Scroll positions.
  4825.     Changing the BitMap ptr in RasInfo and not changing the
  4826.     the Offsets will effect a double buffering affect.
  4827.  
  4828.    INPUTS
  4829.        vp - pointer to a ViewPort structure
  4830.          that is currently be displayed.
  4831.    RESULTS
  4832.     modifies hardware and intermediate copperlists to reflect
  4833.     new RasInfo
  4834.  
  4835.    BUGS
  4836.        pokes not fast enough to avoid some visible hashing of display (V37)
  4837.     This function was re-written in V39 and is ~10 times faster than
  4838.     before.
  4839.  
  4840.    SEE ALSO
  4841.     MakeVPort() MrgCop() LoadView()  graphics/view.h
  4842.  
  4843. graphics.library/SetABPenDrMd                   graphics.library/SetABPenDrMd
  4844.  
  4845.    NAME   
  4846.      SetABPenDrMd -- Set pen colors and draw mode for a RastPort. (V39)
  4847.  
  4848.    SYNOPSIS
  4849.     SetABPenDrMd( rp, apen, bpen, mode )
  4850.                    a1  d0     d1    d2
  4851.  
  4852.     void SetABPenDrMd( struct RastPort *, ULONG, ULONG, ULONG );
  4853.  
  4854.    FUNCTION
  4855.     Set the pen values and drawing mode for lines, fills and text.
  4856.     Get the bit definitions from rastport.h
  4857.  
  4858.    INPUTS
  4859.     rp - pointer to RastPort structure.
  4860.     apen - primary pen value
  4861.     bpen - secondary pen value
  4862.     mode - 0-255, some combinations may not make much sense.
  4863.  
  4864.    RESULT
  4865.     The mode set is dependent on the bits selected.
  4866.     Changes minterms to reflect new drawing mode and colors.
  4867.     Sets line drawer to restart pattern.
  4868.  
  4869.     NOTES
  4870.     This call is essentially the same as a sequence of
  4871.     SetAPen()/SetBPen()/SetDrMD() calls, except that it is
  4872.     significantly faster. The minterms will only be generated
  4873.     once, or not at all if nothing changed (warning to illegal
  4874.     RastPort pokers!).
  4875.  
  4876.    BUGS
  4877.  
  4878.    SEE ALSO
  4879.     SetAPen() SetBPen() SetDrMd() graphics/rastport.h
  4880.  
  4881. graphics.library/SetAPen                             graphics.library/SetAPen
  4882.  
  4883.    NAME   
  4884.     SetAPen -- Set the primary pen for a RastPort.
  4885.  
  4886.    SYNOPSIS
  4887.     SetAPen( rp, pen )
  4888.          a1  d0
  4889.  
  4890.     void SetAPen( struct RastPort *, UBYTE );
  4891.  
  4892.    FUNCTION
  4893.     Set the primary drawing pen for lines, fills, and text.
  4894.  
  4895.    INPUTS
  4896.     rp - pointer to RastPort structure.
  4897.     pen - (0-255)
  4898.  
  4899.    RESULT
  4900.     Changes the minterms in the RastPort to reflect new primary pen.
  4901.     Sets line drawer to restart pattern.
  4902.  
  4903.    BUGS
  4904.  
  4905.    SEE ALSO
  4906.     SetBPen() graphics/rastport.h
  4907.  
  4908. graphics.library/SetBPen                             graphics.library/SetBPen
  4909.  
  4910.    NAME   
  4911.     SetBPen -- Set secondary pen for a RastPort
  4912.  
  4913.    SYNOPSIS
  4914.     SetBPen( rp, pen )
  4915.          a1  d0
  4916.  
  4917.     void SetBPen( struct RastPort *, UBYTE );
  4918.  
  4919.    FUNCTION
  4920.     Set the secondary drawing pen for lines, fills, and text.
  4921.  
  4922.    INPUTS
  4923.     rp - pointer to RastPort structure.
  4924.     pen - (0-255)
  4925.  
  4926.    RESULT
  4927.     Changes the minterms in the RastPort to reflect new secondary pen.
  4928.     Sets line drawer to restart pattern.
  4929.  
  4930.    BUGS
  4931.  
  4932.     SEE ALSO
  4933.     SetAPen() graphics/rastport.h
  4934.  
  4935. graphics.library/SetChipRev                       graphics.library/SetChipRev
  4936.  
  4937.    NAME
  4938.     SetChipRev -- turns on the features of a Chip Set  (V39)
  4939.  
  4940.    SYNOPSIS
  4941.     chiprevbits = SetChipRev(ChipRev)
  4942.                                d0
  4943.  
  4944.     ULONG SetChipRev(ULONG);
  4945.  
  4946.    FUNCTION
  4947.     Enables the features of the requested Chip Set if available,
  4948.     and updates the graphics database accordingly.
  4949.  
  4950.    INPUTS
  4951.     ChipRev - Chip Rev that you would like to be enabled.
  4952.  
  4953.    RESULT
  4954.     chiprevbits - Actual bits set in GfxBase->ChipRevBits0.
  4955.  
  4956.    NOTES
  4957.     This routine should only be called once. It will be called by the system
  4958.     in the startup-sequence, but is included in the autodocs for authors
  4959.     of bootblock-games that wish to take advantage of post-ECS features.
  4960.  
  4961.    SEE ALSO
  4962.     <graphics/gfxbase.h>
  4963.  
  4964. graphics.library/SetCollision                   graphics.library/SetCollision
  4965.  
  4966.    NAME
  4967.     SetCollision -- Set a pointer to a user collision routine.
  4968.  
  4969.    SYNOPSIS
  4970.     SetCollision(num, routine, GInfo)
  4971.                  D0   A0       A1
  4972.  
  4973.     void SetCollision(ULONG, VOID (*)(), struct GelsInfo *);
  4974.  
  4975.    FUNCTION
  4976.     Sets a specified entry (num) in the user's collision vectors table
  4977.     equal to the address of the specified collision routine.
  4978.  
  4979.    INPUTS
  4980.     num     = collision vector number
  4981.     routine = pointer to the user's collision routine
  4982.     GInfo   = pointer to a GelsInfo structure
  4983.  
  4984.    RESULT
  4985.  
  4986.    BUGS
  4987.  
  4988.    SEE ALSO
  4989.     InitGels()  graphics/gels.h  graphics/rastport.h
  4990.  
  4991. graphics.library/SetDrMd                             graphics.library/SetDrMd
  4992.  
  4993.    NAME   
  4994.      SetDrMd -- Set drawing mode for a RastPort
  4995.  
  4996.    SYNOPSIS
  4997.     SetDrMd( rp, mode )
  4998.          a1  d0:8
  4999.  
  5000.     void SetDrMd( struct RastPort *, UBYTE );
  5001.  
  5002.    FUNCTION
  5003.     Set the drawing mode for lines, fills and text.
  5004.     Get the bit definitions from rastport.h
  5005.  
  5006.    INPUTS
  5007.     rp - pointer to RastPort structure.
  5008.     mode - 0-255, some combinations may not make much sense.
  5009.  
  5010.    RESULT
  5011.     The mode set is dependent on the bits selected.
  5012.     Changes minterms to reflect new drawing mode.
  5013.     Sets line drawer to restart pattern.
  5014.  
  5015.    BUGS
  5016.  
  5017.    SEE ALSO
  5018.     SetAPen() SetBPen() graphics/rastport.h
  5019.  
  5020. graphics.library/SetFont                             graphics.library/SetFont
  5021.  
  5022.    NAME
  5023.     SetFont -- Set the text font and attributes in a RastPort.
  5024.  
  5025.    SYNOPSIS
  5026.     SetFont(rp, font)
  5027.             A1   A0
  5028.  
  5029.     void SetFont(struct RastPort *, struct TextFont *);
  5030.  
  5031.    FUNCTION
  5032.     This function sets the font in the RastPort to that described
  5033.     by font, and updates the text attributes to reflect that
  5034.     change.  This function clears the effect of any previous
  5035.     soft styles.
  5036.  
  5037.    INPUTS
  5038.     rp   - the RastPort in which the text attributes are to be changed
  5039.     font - pointer to a TextFont structure returned from OpenFont()
  5040.            or OpenDiskFont()
  5041.  
  5042.    RESULT
  5043.  
  5044.    NOTES
  5045.     This function had previously been documented that it would
  5046.     accept a null font.  This practice is discouraged.
  5047.     o   Use of a RastPort with a null font with text routines has
  5048.         always been incorrect and risked the guru.
  5049.     o   Keeping an obsolete font pointer in the RastPort is no more
  5050.         dangerous than keeping a zero one there.
  5051.     o   SetFont(rp, 0) causes spurious low memory accesses under
  5052.         some system software releases.
  5053.  
  5054.     As of V36, the following Amiga font variants are no longer
  5055.     directly supported:
  5056.         fonts with NULL tf_CharSpace and non-NULL tf_CharKern.
  5057.         fonts with non-NULL tf_CharSpace and NULL tf_CharKern.
  5058.         fonts with NULL tf_CharSpace and NULL tf_CharKern with
  5059.         a tf_CharLoc size component greater than tf_XSize.
  5060.     Attempts to SetFont these one of these font variants will
  5061.     cause the system to modify your font to make it acceptable.
  5062.  
  5063.    BUGS
  5064.     Calling SetFont() on in-code TextFonts (ie fonts not
  5065.     OpenFont()ed) will result in a loss of 24 bytes from
  5066.     the system as of V36.
  5067.     This can be resolved by calling StripFont().
  5068.  
  5069.    SEE ALSO
  5070.     OpenFont()  StripFont()
  5071.     diskfont.library/OpenDiskFont()  graphics/text.h
  5072.  
  5073. graphics.library/SetMaxPen                         graphics.library/SetMaxPen
  5074.  
  5075.    NAME
  5076.        SetMaxPen -- set maximum pen value for a rastport (V39).
  5077.  
  5078.  
  5079.    SYNOPSIS
  5080.        SetMaxPen ( rp, maxpen)
  5081.                a0   d0
  5082.  
  5083.     void SetMaxPen(struct RastPort *,ULONG)
  5084.  
  5085.    FUNCTION
  5086.     This will instruct the graphics library that the owner of the rastport
  5087.     will not be rendering in any colors whose index is >maxpen. If there
  5088.     are any speed optimizations which the graphics device can make based
  5089.     on this fact (for instance, setting the pixel write mask), they will
  5090.     be done.
  5091.  
  5092.     Basically this call sets the rastport mask, if this would improve
  5093.     speed. On devices where masking would slow things down (like with
  5094.     chunky pixels), it will be a no-op.
  5095.  
  5096.    INPUTS
  5097.        rp  =  a pointer to a valid RastPort structure.
  5098.     maxpen =  a longword pen value. 
  5099.  
  5100.    BUGS
  5101.  
  5102.    NOTES
  5103.     The maximum pen value passed must take into account not only which
  5104.     colors you intend to render in the future, but what colors you will
  5105.     be rendering on top of.
  5106.     SetMaxPen(rp,0) doesn't make much sense.
  5107.  
  5108.    SEE ALSO
  5109.     SetWriteMask()
  5110.  
  5111. graphics.library/SetOPen                             graphics.library/SetOPen
  5112.  
  5113.    NAME
  5114.     SetOPen -- Change the Area OutLine pen and turn on Outline
  5115.             mode for areafills.
  5116.  
  5117.    SYNOPSIS
  5118.     SetOPen(rp, pen)
  5119.  
  5120.     void SetOPen( struct RastPort *, UBYTE );
  5121.  
  5122.    FUNCTION
  5123.     This is implemented as a c-macro.
  5124.     Pen is the pen number that will be used to draw a border
  5125.     around an areafill during AreaEnd().
  5126.  
  5127.    INPUTS
  5128.     rp = pointer to RastPort structure
  5129.     pen = number  between 0-255
  5130.  
  5131.    BUGS
  5132.  
  5133.    SEE ALSO
  5134.     AreaEnd() graphics/gfxmacros.h graphics/rastport.h
  5135.  
  5136. graphics.library/SetOutlinePen                 graphics.library/SetOutlinePen
  5137.  
  5138.    NAME
  5139.        SetOutlinePen -- Set the Outline Pen value for a RastPort (V39).
  5140.  
  5141.  
  5142.    SYNOPSIS
  5143.        old_pen=SetOutlinePen  ( rp, pen )
  5144.       d0                     a0   d0
  5145.  
  5146.     ULONG SetOutlinePen(struct RastPort *,ULONG)
  5147.  
  5148.    FUNCTION
  5149.     Set the current value of the O pen for the rastport and turn on area outline
  5150.     mode. This function should be used instead of poking the structure directly,
  5151.     because future graphics devices may store it differently, for instance,
  5152.     using more bits.
  5153.  
  5154.    INPUTS
  5155.        rp  =  a pointer to a valid RastPort structure.
  5156.     pen =  a longword pen number
  5157.  
  5158.     returns the previous outline pen
  5159.    BUGS
  5160.  
  5161.    NOTES
  5162.  
  5163.    SEE ALSO
  5164.     GetOPen() graphics/gfxmacros.h
  5165.  
  5166. graphics.library/SetRast                             graphics.library/SetRast
  5167.  
  5168.    NAME
  5169.        SetRast - Set an entire drawing area to a specified color.
  5170.  
  5171.    SYNOPSIS
  5172.        SetRast( rp, pen )
  5173.                 a1  d0
  5174.  
  5175.     void SetRast( struct RastPort *, UBYTE );
  5176.  
  5177.    FUNCTION
  5178.        Set the entire contents of the specified RastPort to the
  5179.        specified pen.
  5180.  
  5181.    INPUTS
  5182.        rp - pointer to RastPort structure
  5183.        pen - the pen number (0-255) to jam into bitmap
  5184.  
  5185.    RESULT
  5186.        All pixels within the drawing area are set to the
  5187.     selected pen number.
  5188.  
  5189.    BUGS
  5190.  
  5191.    SEE ALSO
  5192.     RectFill() graphics/rastport.h
  5193.  
  5194. graphics.library/SetRGB32                           graphics.library/SetRGB32
  5195.  
  5196.    NAME
  5197.     SetRGB32 -- Set one color register for this Viewport. (V39)
  5198.  
  5199.    SYNOPSIS
  5200.     SetRGB32(  vp,  n,   r,    g,    b)
  5201.                a0  d0   d1    d2    d3
  5202.  
  5203.     void SetRGB32( struct ViewPort *, ULONG, ULONG, ULONG, ULONG );
  5204.  
  5205.    INPUTS
  5206.     vp = viewport
  5207.     n = the number of the color register to set.
  5208.     r = red level   (32 bit left justified fraction)
  5209.     g = green level (32 bit left justified fraction)
  5210.     b = blue level  (32 bit left justified fraction)
  5211.  
  5212.    RESULT
  5213.     If there is a ColorMap for this viewport, then the value will
  5214.     be stored in the ColorMap.
  5215.     The selected color register is changed to match your specs.
  5216.     If the color value is unused then nothing will happen.
  5217.  
  5218.    BUGS
  5219.  
  5220.    NOTES
  5221.     Lower order bits of the palette specification will be discarded,
  5222.     depending on the color palette resolution of the target graphics
  5223.     device. Use 0xffffffff for the full value, 0x7fffffff for 50%,
  5224.     etc. You can find out the palette range for your screen by
  5225.     querying the graphics data base.
  5226.  
  5227.    SEE ALSO
  5228.     GetColorMap() GetRGB32() SetRGB32CM() LoadRGB32() graphics/view.h
  5229. graphics.library/SetRGB32CM                       graphics.library/SetRGB32CM
  5230.  
  5231.    NAME
  5232.        SetRGB32CM -- Set one color register for this ColorMap. (V39)
  5233.  
  5234.    SYNOPSIS
  5235.        SetRGB32CM(  cm,  n,   r,    g,    b)
  5236.                     a0  d0   d1    d2    d3
  5237.  
  5238.        void SetRGB4CM( struct ColorMap *, ULONG, ULONG, ULONG , ULONG);
  5239.  
  5240.    INPUTS
  5241.     cm = colormap
  5242.        n = the number of the color register to set. Must not exceed the numbe
  5243. r of colors
  5244.         allocated for the colormap.
  5245.        r = red level (32 bit unsigned left justified fraction)
  5246.        g = green level
  5247.        b = blue level
  5248.  
  5249.    RESULT
  5250.     Store the (r,g,b) triplet at index n of the ColorMap structure.
  5251.        This function can be used to set up a ColorMap before before
  5252.     linking it into a viewport.
  5253.  
  5254.    BUGS
  5255.  
  5256.    SEE ALSO
  5257.        GetColorMap() GetRGB32() SetRGB32() SetRGB4CM() graphics/view.h
  5258. graphics.library/SetRGB4                             graphics.library/SetRGB4
  5259.  
  5260.     NAME
  5261.        SetRGB4 -- Set one color register for this viewport.
  5262.  
  5263.     SYNOPSIS
  5264.        SetRGB4(  vp, n,   r,    g,    b)
  5265.                  a0  d0  d1:4  d2:4  d3:4
  5266.  
  5267.     void SetRGB4( struct ViewPort *, SHORT, UBYTE, UBYTE, UBYTE );
  5268.  
  5269.     FUNCTION
  5270.     Change the color look up table so that this viewport displays
  5271.     the color (r,g,b) for pen number n.
  5272.  
  5273.     INPUTS
  5274.     vp - pointer to  viewport structure
  5275.        n - the color number (range from 0 to 31)
  5276.        r - red level (0-15)
  5277.        g - green level (0-15)
  5278.        b - blue level (0-15)
  5279.  
  5280.     RESULT
  5281.     If there is a ColorMap for this viewport, then the value will
  5282.     be stored in the ColorMap.
  5283.        The selected color register is changed to match your specs.
  5284.     If the color value is unused then nothing will happen.
  5285.  
  5286.     BUGS
  5287.  
  5288.     NOTE: Under V36 and up, it is not safe to call this function
  5289.     from an interrupt, due to semaphore protection of graphics
  5290.     copper lists.
  5291.  
  5292.     SEE ALSO
  5293.        LoadRGB4() GetRGB4() graphics/view.h
  5294. graphics.library/SetRGB4CM                         graphics.library/SetRGB4CM
  5295.  
  5296.    NAME
  5297.        SetRGB4CM -- Set one color register for this ColorMap.
  5298.  
  5299.    SYNOPSIS
  5300.        SetRGB4CM(  cm,  n,   r,    g,    b)
  5301.                    a0  d0  d1:4  d2:4  d3:4
  5302.  
  5303.        void SetRGB4CM( struct ColorMap *, SHORT, UBYTE, UBYTE, UBYTE );
  5304.  
  5305.    INPUTS
  5306.     cm = colormap
  5307.        n = the number of the color register to set. Ranges from 0 to 31
  5308.         on current Amiga displays.
  5309.        r = red level (0-15)
  5310.        g = green level (0-15)
  5311.        b = blue level (0-15)
  5312.  
  5313.    RESULT
  5314.     Store the (r,g,b) triplet at index n of the ColorMap structure.
  5315.        This function can be used to set up a ColorMap before before
  5316.     linking it into a viewport.
  5317.  
  5318.    BUGS
  5319.  
  5320.    SEE ALSO
  5321.        GetColorMap() GetRGB4() SetRGB4() graphics/view.h
  5322. graphics.library/SetRPAttrA                       graphics.library/SetRPAttrA
  5323.  
  5324.    NAME
  5325.        SetRPAttrA -- modify rastport settings via a tag list
  5326.     SetRPAttrs  -- varargs stub for SetRPAttrA
  5327.  
  5328.    SYNOPSIS
  5329.        SetRPAttrA(rp,tags)
  5330.                   a0   a1
  5331.  
  5332.     void SetRPAttrA(struct RastPort *, struct TagItem *);
  5333.  
  5334.     SetRPAttrs(rp,tag,...);
  5335.  
  5336.    FUNCTION
  5337.        Modify settings of a rastport, based on the taglist passed.
  5338.     currently available tags are:
  5339.  
  5340.         RPTAG_Font        Font for Text()
  5341.         RPTAG_SoftStyle        style for text (see graphics/text.h)
  5342.         RPTAG_APen        Primary rendering pen
  5343.         RPTAG_BPen        Secondary rendering pen
  5344.         RPTAG_DrMd         Drawing mode (see graphics/rastport.h)
  5345.         RPTAG_OutLinePen     Area Outline pen
  5346.         RPTAG_WriteMask     Bit Mask for writing.
  5347.         RPTAG_MaxPen         Maximum pen to render (see SetMaxPen())
  5348.  
  5349.    INPUTS
  5350.     rp - pointer to the RastPort to modify.
  5351.     tags - a standard tag list
  5352.  
  5353.    RESULT
  5354.  
  5355.    BUGS
  5356.  
  5357.    SEE ALSO
  5358.     SetFont() SetSoftStyle() SetAPen() SetBPen() SetDrMd() SetOutLinePen()
  5359.     SetWriteMask() SetMaxPen() GetRPAttrA() graphics/rpattr.h
  5360.  
  5361. graphics.library/SetSoftStyle                   graphics.library/SetSoftStyle
  5362.  
  5363.    NAME
  5364.     SetSoftStyle -- Set the soft style of the current font.
  5365.  
  5366.    SYNOPSIS
  5367.     newStyle = SetSoftStyle(rp, style, enable)
  5368.     D0                      A1  D0     D1
  5369.  
  5370.     ULONG SetSoftStyle(struct RastPort *, ULONG, ULONG);
  5371.  
  5372.    FUNCTION
  5373.     This function alters the soft style of the current font.  Only
  5374.     those bits that are also set in enable are affected.  The
  5375.     resulting style is returned, since some style request changes
  5376.     will not be honored when the implicit style of the font
  5377.     precludes changing them.
  5378.  
  5379.    INPUTS
  5380.     rp     - the RastPort from which the font and style
  5381.              are extracted.
  5382.     style  - the new font style to set, subject to enable.
  5383.     enable - those bits in style to be changed.  Any set bits here
  5384.              that would not be set as a result of AskSoftStyle will
  5385.              be ignored, and the newStyle result will not be as
  5386.              expected. 
  5387.  
  5388.    RESULTS
  5389.     newStyle - the resulting style, both as a result of previous
  5390.                soft style selection, the effect of this function,
  5391.                and the style inherent in the set font.
  5392.  
  5393.    BUGS
  5394.  
  5395.    SEE ALSO
  5396.     AskSoftStyle()  graphics/text.h
  5397.  
  5398. graphics.library/SetWriteMask                   graphics.library/SetWriteMask
  5399.  
  5400.    NAME
  5401.        SetWriteMask -- Set the pixel write mask value for a RastPort (V39).
  5402.  
  5403.  
  5404.    SYNOPSIS
  5405.        success=SetWriteMask ( rp, msk )
  5406.       d0                   a0   d0
  5407.  
  5408.     ULONG SetWriteMask(struct RastPort *,ULONG)
  5409.  
  5410.    FUNCTION
  5411.     Set the current value of the bit write mask for the rastport.
  5412.     bits of the pixel with zeros in their mask will not be modified by
  5413.     subsequent drawing operations.
  5414.  
  5415.    INPUTS
  5416.        rp  =  a pointer to a valid RastPort structure.
  5417.     msk =  a longword mask value. 
  5418.  
  5419.     Graphics devices which do not support per-bit masking will
  5420.     return 0 (failure).
  5421.    BUGS
  5422.  
  5423.    NOTES
  5424.  
  5425.    SEE ALSO
  5426.     graphics/gfxmacros.h
  5427.  
  5428. graphics.library/SortGList                         graphics.library/SortGList
  5429.  
  5430.    NAME
  5431.     SortGList -- Sort the current gel list, ordering its y,x coordinates.
  5432.  
  5433.    SYNOPSIS
  5434.     SortGList(rp)
  5435.               A1
  5436.  
  5437.     void SortGList(struct RastPort *);
  5438.  
  5439.    FUNCTION
  5440.     Sorts the current gel list according to the gels' y,x coordinates.
  5441.     This sorting is essential before calls to DrawGList or DoCollision.
  5442.  
  5443.    INPUTS
  5444.     rp = pointer to the RastPort structure containing the GelsInfo
  5445.  
  5446.    RESULT
  5447.  
  5448.    BUGS
  5449.  
  5450.    SEE ALSO
  5451.     InitGels()  DoCollision()  DrawGList()  graphics/rastport.h
  5452.  
  5453. graphics.library/StripFont                         graphics.library/StripFont
  5454.  
  5455.    NAME
  5456.     StripFont -- remove the tf_Extension from a font (V36)
  5457.  
  5458.    SYNOPSIS
  5459.     StripFont(font)
  5460.               A0
  5461.  
  5462.     VOID StripFont(struct TextFont *);
  5463.  
  5464. graphics.library/SyncSBitMap                     graphics.library/SyncSBitMap
  5465.  
  5466.    NAME
  5467.        SyncSBitMap --    Syncronize Super BitMap with whatever is
  5468.             in the standard Layer bounds.
  5469.  
  5470.    SYNOPSIS
  5471.        SyncSBitMap( layer )
  5472.                       a0
  5473.  
  5474.     void SyncSBitMap( struct Layer * );
  5475.  
  5476.    FUNCTION
  5477.        Copy all bits from ClipRects in Layer into Super BitMap
  5478.     BitMap.  This is used for those functions that do not
  5479.     want to deal with the ClipRect structures but do want
  5480.     to be able to work with a SuperBitMap Layer.
  5481.  
  5482.    INPUTS
  5483.     layer - pointer to a Layer that has a SuperBitMap
  5484.         The Layer should already be locked by the caller.
  5485.  
  5486.    RESULT
  5487.     After calling this function, the programmer can manipulate
  5488.     the bits in the superbitmap associated with the layer.
  5489.     Afterwards, the programmer should call CopySBitMap to
  5490.     copy the bits back into the onscreen layer.
  5491.  
  5492.    BUGS
  5493.  
  5494.    SEE ALSO
  5495.     CopySBitMap() graphics/clip.h
  5496.  
  5497. graphics.library/Text                                   graphics.library/Text
  5498.  
  5499.    NAME
  5500.     Text -- Write text characters (no formatting).
  5501.  
  5502.    SYNOPSIS
  5503.     Text(rp, string, length)
  5504.          A1  A0      D0-0:16
  5505.  
  5506.     void Text(struct RastPort *, STRPTR, WORD);
  5507.  
  5508.    FUNCTION
  5509.     This graphics function writes printable text characters to the
  5510.     specified RastPort at the current position.  No control meaning
  5511.     is applied to any of the characters, thus only text on the
  5512.     current line is output.
  5513.  
  5514.     The current position in the RastPort is updated to the next
  5515.     character position.
  5516.     If the characters displayed run past the RastPort boundary,
  5517.     the current position is truncated to the boundary, and
  5518.     thus does not equal the old position plus the text length.
  5519.  
  5520.    INPUTS
  5521.     rp     - a pointer to the RastPort which describes where the
  5522.              text is to be output
  5523.     string - the address of string to output
  5524.     length - the number of characters in the string.
  5525.              If zero, there are no characters to be output.
  5526.  
  5527.    NOTES
  5528.     o   This function may use the blitter.
  5529.     o   Changing the text direction with RastPort->TxSpacing is
  5530.         not supported.
  5531.  
  5532.    BUGS
  5533.     For V34 and earlier:
  5534.     o   The maximum string length (in pixels) is limited to
  5535.         (1024 - 16 = 1008) pixels wide.
  5536.     o   A text string whose last character(s) have a
  5537.         tf_CharLoc size component that extends to the right of
  5538.         the rightmost of the initial and final CP positions
  5539.         will be (inappropriately) clipped.
  5540.  
  5541.    SEE ALSO
  5542.     Move()  TextLength()  graphics/text.h  graphics/rastport.h
  5543.  
  5544. graphics.library/TextExtent                       graphics.library/TextExtent
  5545.  
  5546.    NAME
  5547.     TextExtent -- Determine raster extent of text data. (V36)
  5548.  
  5549.    SYNOPSIS
  5550.     TextExtent(rp, string, count, textExtent)
  5551.                A1  A0      D0:16  A2
  5552.  
  5553.     void textExtent(struct RastPort *, STRPTR, WORD,
  5554.          struct TextExtent *);
  5555.  
  5556.    FUNCTION
  5557.     This function determines a more complete metric of the space
  5558.     that a text string would render into than the TextLength()
  5559.     function.
  5560.  
  5561.    INPUTS
  5562.     rp     - a pointer to the RastPort which describes where the
  5563.              text attributes reside.
  5564.     string - the address of the string to determine the length of.
  5565.     count  - the number of characters in the string.
  5566.                 If zero, there are no characters in the string.
  5567.     textExtent - a structure to hold the result.
  5568.  
  5569.    RESULTS
  5570.     textExtent is filled in as follows:
  5571.         te_Width  - same as TextLength() result: the rp_cp_x
  5572.                     advance that rendering this text would cause.
  5573.         te_Height - same as tf_YSize.  The height of the
  5574.                     font.
  5575.         te_Extent.MinX - the offset to the left side of the
  5576.                     rectangle this would render into.  Often zero.
  5577.         te_Extent.MinY - same as -tf_Baseline.  The offset
  5578.                     from the baseline to the top of the rectangle
  5579.                     this would render into.
  5580.         te_Extent.MaxX - the offset of the left side of the
  5581.                     rectangle this would render into.  Often the
  5582.                     same as te_Width-1.
  5583.         te_Extent.MaxY - same as tf_YSize-tf_Baseline-1.
  5584.                     The offset from the baseline to the bottom of
  5585.                     the rectangle this would render into.
  5586.  
  5587.    SEE ALSO
  5588.     TextLength()  Text()  TextFit()
  5589.     graphics/text.h  graphics/rastport.h
  5590.  
  5591. graphics.library/TextFit                             graphics.library/TextFit
  5592.  
  5593.    NAME
  5594.     TextFit - count characters that will fit in a given extent (V36)
  5595.  
  5596.    SYNOPSIS
  5597.     chars = TextFit(rastport, string, strLen, textExtent,
  5598.     D0              A1        A0      D0      A2
  5599.             constrainingExtent, strDirection,
  5600.             A3                  D1
  5601.             constrainingBitWidth, constrainingBitHeight)
  5602.             D2                    D3
  5603.  
  5604.     ULONG TextFit(struct RastPort *, STRPTR, UWORD,
  5605.         struct TextExtent *, struct TextExtent *, WORD, UWORD, UWORD);
  5606.  
  5607.    FUNCTION
  5608.     This function determines how many of the characters of the
  5609.     provided string will fit into the space described by the
  5610.     constraining parameters.  It also returns the extent of
  5611.     that number of characters.
  5612.  
  5613.    INPUTS
  5614.     rp     - a pointer to the RastPort which describes where the
  5615.              text attributes reside.
  5616.     string - the address of string to determine the constraint of
  5617.     strLen - The number of characters in the string.
  5618.              If zero, there are no characters in the string.
  5619.     textExtent - a structure to hold the extent result.
  5620.     constrainingExtent - the extent that the text must fit in.
  5621.         This can be NULL, indicating only the constrainingBit
  5622.         dimensions will describe the constraint.
  5623.     strDirection - the offset to add to the string pointer to
  5624.         get to the next character in the string.  Usually 1.
  5625.         Set to -1 and the string to the end of the string to
  5626.         perform a TextFit() anchored at the end.  No other value
  5627.         is valid.
  5628.     constrainingBitWidth - an alternative way to specify the
  5629.         rendering box constraint width that is independent of
  5630.         the rendering origin.  Range 0..32767.
  5631.     constrainingBitHeight - an alternative way to specify the
  5632.         rendering box constraint height that is independent of
  5633.         the rendering origin.  Range 0..32767.
  5634.  
  5635.    RESULTS
  5636.     chars - the number of characters from the origin of the
  5637.             given string that will fit in both the constraining
  5638.             extent (which specifies a CP bound and a rendering
  5639.             box relative to the origin) and in the rendering width
  5640.             and height specified.
  5641.  
  5642.    NOTES
  5643.     The result is zero chars and an empty textExtent when the fit
  5644.     cannot be performed.  This occurs not only when no text will
  5645.     fit in the provided constraints, but also when:
  5646.     -   the RastPort rp's rp_TxSpacing sign and magnitude is so
  5647.         great it reverses the path of the text. 
  5648.     -   the constrainingExtent does not include x = 0.
  5649.  
  5650.  
  5651.    BUGS
  5652.     Under V37, TextFit() would return one too few characters if the
  5653.     font was proportional. This can be worked around by passing
  5654.     (constrainingBitWidth + 1) for proportional fonts. This is fixed
  5655.     for V39.
  5656.  
  5657.    SEE ALSO
  5658.     TextExtent()  TextLength()  Text()
  5659.     graphics/text.h  graphics/rastport.h
  5660.  
  5661. graphics.library/TextLength                       graphics.library/TextLength
  5662.  
  5663.    NAME
  5664.     TextLength -- Determine raster length of text data.
  5665.  
  5666.    SYNOPSIS
  5667.     length = TextLength(rp, string, count)
  5668.     D0                  A1  A0      D0:16
  5669.  
  5670.     WORD TextLength(struct RastPort *, STRPTR, WORD);
  5671.  
  5672.    FUNCTION
  5673.     This graphics function determines the length that text data
  5674.     would occupy if output to the specified RastPort with the
  5675.     current attributes.  The length is specified as the number of
  5676.     raster dots: to determine what the current position would be
  5677.     after a Text() using this string, add the length to cp_x
  5678.     (cp_y is unchanged by Text()).  Use the newer TextExtent() to
  5679.     get more information.
  5680.  
  5681.    INPUTS
  5682.     rp     - a pointer to the RastPort which describes where the
  5683.              text attributes reside.
  5684.     string - the address of string to determine the length of
  5685.     count  - the string length.  If zero, there are no characters
  5686.              in the string.
  5687.  
  5688.    RESULTS
  5689.     length - the number of pixels in x this text would occupy, not
  5690.              including any negative kerning that may take place at
  5691.              the beginning of the text string, nor taking into
  5692.              account the effects of any clipping that may take
  5693.              place.
  5694.  
  5695.    NOTES
  5696.     Prior to V36, the result length occupied only the low word of
  5697.     d0 and was not sign extended into the high word.
  5698.  
  5699.    BUGS
  5700.     A length that would overflow single word arithmetic is not
  5701.     calculated correctly.
  5702.  
  5703.    SEE ALSO
  5704.     TextExtent()  Text()  TextFit()
  5705.     graphics/text.h  graphics/rastport.h
  5706.  
  5707. graphics.library/UnlockLayerRom               graphics.library/UnlockLayerRom
  5708.  
  5709.    NAME
  5710.     UnlockLayerRom -- Unlock Layer structure by ROM(gfx lib) code.
  5711.  
  5712.    SYNOPSIS
  5713.     UnlockLayerRom( layer )
  5714.              a5
  5715.  
  5716.     void UnlockLayerRom( struct Layer * );
  5717.  
  5718.    FUNCTION
  5719.     Release the lock on this layer. If the same task has called
  5720.     LockLayerRom more than once than the same number of calls to
  5721.     UnlockLayerRom must happen before the layer is actually freed
  5722.     so that other tasks may use it.
  5723.     This call does destroy scratch registers.
  5724.     This call is identical to UnlockLayer (layers.library).
  5725.  
  5726.    INPUTS
  5727.     layer - pointer to Layer structure
  5728.  
  5729.    BUGS
  5730.  
  5731.    SEE ALSO
  5732.     LockLayerRom() layers.library/UnlockLayer() graphics/clip.h
  5733.  
  5734. graphics.library/VBeamPos                           graphics.library/VBeamPos
  5735.  
  5736.    NAME   
  5737.     VBeamPos -- Get vertical beam position at this instant.
  5738.  
  5739.    SYNOPSIS
  5740.     pos = VBeamPos()
  5741.      d0
  5742.  
  5743.     LONG VBeamPos( void );
  5744.  
  5745.    FUNCTION
  5746.     Get the vertical beam position from the hardware.
  5747.  
  5748.    INPUTS
  5749.     none
  5750.  
  5751.    RESULT
  5752.     interrogates hardware for beam position and returns value.
  5753.     valid results in are the range of 0-511.
  5754.     Because of multitasking, the actual value returned may have
  5755.     no use. If you are the highest priority task then the value
  5756.     returned should be close, within 1 line.
  5757.  
  5758.    BUGS
  5759.  
  5760.    SEE ALSO
  5761.  
  5762.  
  5763. graphics.library/VideoControl                   graphics.library/VideoControl
  5764.  
  5765.    NAME
  5766.     VideoControl -- Modify the operation of a ViewPort's ColorMap (V36)
  5767.     VideoControlTags -- varargs stub for VideoControl (V36)
  5768.    SYNOPSIS
  5769.     error = VideoControl( cm , tags )
  5770.     d0                    a0   a1
  5771.  
  5772.     ULONG VideoControl( struct ColorMap *, struct TagItem * );
  5773.  
  5774.     error= VideoControlTags(cm, tags,...);
  5775.  
  5776.  
  5777.    FUNCTION
  5778.     Process the commands in the VideoControl command TagItem buffer 
  5779.     using cm as the target, with respect to its "attached" ViewPort.
  5780.  
  5781.     viewport commands:
  5782.  
  5783.     VTAG_ATTACH_CM     [_SET        | _GET] -- set/get attached viewport
  5784.     VTAG_VIEWPORTEXTRA [_SET        | _GET] -- set/get attached vp_extra 
  5785.     VTAG_NORMAL_DISP   [_SET        | _GET] -- set/get DisplayInfoHandle
  5786.                                                (natural mode)
  5787.     VTAG_COERCE_DISP   [_SET        | _GET] -- set/get DisplayInfoHandle 
  5788.                                                (coerced mode)
  5789.     VTAG_PF1_BASE      [_SET        | _GET] -- set/get color base for
  5790.                                                first playfield. (V39)
  5791.     VTAG_PF2_BASE      [_SET        | _GET] -- set/get color base for
  5792.                                                second playfield. (V39)
  5793.     VTAG_SPODD_BASE    [_SET        | _GET] -- set/get color base for odd
  5794.                                                sprites. (V39)
  5795.     VTAG_SPEVEN_BASE   [_SET        | _GET] -- set/get color base for even
  5796.                                                sprites. (V39)
  5797.     VTAG_BORDERSPRITE  [_SET        | _GET] -- on/off/inquire sprites in 
  5798.                                                borders. (V39)
  5799.     VTAG_SPRITERESN    [_SET        | _GET] -- set/get sprite resolution
  5800.                   (legal values are SPRITERESN_ECS/_140NS/_70NS/_35NS.
  5801.                    see graphics/view.h) (V39)
  5802.     VTAG_PF1_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield1 priority
  5803.                                                   with respect to sprites (V3
  5804. 9)
  5805.     VTAG_PF2_TO_SPRITEPRI [_SET     | _GET] -- set/get playfield2 priority
  5806.                                                   with respect to sprites (V3
  5807. 9)
  5808.     (These two require that the ColorMap is attached to a ViewPort to be
  5809.      effective).
  5810.  
  5811.     genlock commands:
  5812.  
  5813.     VTAG_BORDERBLANK   [_SET | _CLR | _GET] -- on/off/inquire blanking
  5814.     VTAG_BORDERNOTRANS [_SET | _CLR | _GET] -- on/off/inquire notransparency
  5815.     VTAG_CHROMAKEY     [_SET | _CLR | _GET] -- on/off/inquire chroma mode
  5816.     VTAG_BITPLANEKEY   [_SET | _CLR | _GET] -- on/off/inquire bitplane mode
  5817.     VTAG_CHROMA_PEN    [_SET | _CLR | _GET] -- set/clr/get chromakey pen #
  5818.     VTAG_CHROMA_PLANE  [_SET |      | _GET] -- set/get bitplanekey plane #
  5819.  
  5820.     control commands:
  5821.  
  5822.     VTAG_IMMEDIATE    - normally, VideoControl changes do not occur until the
  5823.             next MakeVPort. Using this tag, some changes can be made to
  5824.             happen immediately. The tag data is a pointer to a longword
  5825.             flag variable which will be cleared if all changes happened
  5826.             immediately. See the example. (V39)
  5827.  
  5828.     VTAG_FULLPALETTE   [_SET | _CLR | _GET] -- enable/disable loading of all
  5829.             colors in the copper list.
  5830.             Normally, graphics will only load the color which are necessary
  5831.             for the viewport, based upon the screen depth and mode. In order
  5832.             to use the color palette banking features, you may need to use
  5833.             this tag to tell graphics to load ALL colors, regardless of
  5834.             screen depth. (V39)
  5835.  
  5836.     VC_IntermediateCLUpdate
  5837.     VC_IntermediateCLUpdate_Query
  5838.              When set, graphics will update the intermediate copper
  5839.          lists on colour changes. When FALSE, graphics won't update
  5840.              the intermediate copperlists, so ScrollVPort(), 
  5841.              ChangeVPBitMap() and colour loading functions will be faster.
  5842.              This value is TRUE by default. (V40)
  5843.  
  5844.     VC_NoColorPaletteLoad
  5845.     VC_NoColorPaletteLoad_Query
  5846.              When set, only colour 0 will be loaded for this ViewPort,
  5847.              hence the inter-ViewPort gap will be smaller. The colours for
  5848.              this ViewPort are inherited from the next higher ViewPort. The
  5849.          results are undefined if this is the first or only ViewPort in
  5850.              the display, and undefined when used in conjunction with
  5851.              VTAG_FULLPALETTE (!?!).
  5852.              This value is FALSE by default. (V40)
  5853.  
  5854.     VC_DUALPF_Disable
  5855.     VC_DUALPF_Disable_Query
  5856.         When set, disables the setting of the dual-playfield
  5857.         bit in bplcon0. When used with a dual-playfield mode
  5858.         screen, this allows using separate scroll and bitmaps
  5859.         for the odd and even bitplanes, without going through
  5860.         the normal dual-playfield priority and palette selection.
  5861.         With appropriate palette setup, this can be used for
  5862.         transparency effects, etc.
  5863.  
  5864.     copper commands
  5865.  
  5866.     VTAG_USERCLIP      [_SET | _CLR | _GET] -- on/off/inquire clipping of
  5867.                                                UserCopperList at bottom
  5868.                                                edge of ColorMap->cm_vp 
  5869.                                                (defaults to off)
  5870.  
  5871.     buffer commands:
  5872.  
  5873.     VTAG_NEXTBUF_CM                         -- link to more VTAG commands
  5874.     VTAG_END_CM                             -- terminate command buffer
  5875.  
  5876.     batch mode commands:
  5877.  
  5878.     (if you want your videocontrol taglist to be processed in "batch"
  5879.      mode, that is, at the next MakeVPort() for the ColorMap->cm_vp;
  5880.      you may install a static list of videocontrol TagItems into the 
  5881.      ColorMap with the BATCH_ITEMS_SET command; and then enable/disable
  5882.      batch mode processing of those items via the BATCH_CM control
  5883.      command)
  5884.                 
  5885.     VTAG_BATCH_CM      [_SET | _CLR | _GET] -- on/off/inquire batch mode
  5886.     VTAG_BATCH_ITEMS   [_SET | _ADD | _GET] -- set/add/get batched TagLists
  5887.  
  5888.     private commands (used internally by intuition -- do not call):
  5889.  
  5890.     VTAG_VPMODEID      [_SET | _CLR | _GET] -- force GetVPModeID() return
  5891.     
  5892.  
  5893.    INPUTS
  5894.     cm   = pointer to struct ColorMap obtained via GetColorMap().
  5895.     tags = pointer to a table of videocontrol tagitems.
  5896.  
  5897.    RESULT
  5898.     error = NULL if no error occurred in the control operation.
  5899.     (non-NULL if bad colormap pointer, no tagitems or bad tag) 
  5900.  
  5901.     The operating characteristics of the ColorMap and its attached 
  5902.     ViewPort are modified. The result will be incorporated into the 
  5903.     ViewPort when its copper lists are reassembled via MakeVPort().
  5904.  
  5905.     Note that you must NOT change colors in the viewport (via SetRGB4(),
  5906.     LoadRGB4(), SetRGB4(), etc.) after changing any of the color palette
  5907.     offsets (VTAG_PF1_BASE, etc), without first remaking the ViewPort.
  5908.  
  5909.    NOTES
  5910.     Sprite resolutions is controlled by two sets of tags, SPRITERESN
  5911.     and DEFSPRITERESN. If you don't set the sprite resolution, it will
  5912.     follow the intuition-controlled "default" sprite resolution. Setting
  5913.     the sprite resolution to one of the SPRITERESN_ values will allow the
  5914.     application to override intuition's control of it.
  5915.  
  5916.     This function will modify the contents of the TagList you pass to it by
  5917.     changing _GET tags to the corresponding _SET or _CLR tag. The
  5918.     exceptions to this rule are documented as such above (such as
  5919.     VTAG_IMMEDIATE).
  5920.  
  5921.     The new tags added for V40 have the prefix VC_ instead of VTAG_. These
  5922.     tags work in the same manner as all other tags in the system, and will
  5923.     not be modified by VideoControl().
  5924.  
  5925.    EXAMPLE
  5926.     must_remake=-1;
  5927.     error=VideoControl(myvp->ColorMap,VTAG_BORDERBLANK_SET,-1,
  5928.                        (GFXBase->lib_Version>=39)?VTAG_IMMEDIATE:TAG_IGNORE,
  5929.                         &must_remake);
  5930.     if (must_remake) { MakeVPort(myview,myvp); MrgCop(myview); }
  5931.  
  5932.    EXAMPLE
  5933.     struct TagItem VCTags[] =
  5934.     {
  5935.         {VTAG_BORDERBLANK_GET, NULL},
  5936.         {VTAG_SPRITERESN_SET, SPRITERESN_35NS},
  5937.         {TAG_DONE, NULL},
  5938.     };
  5939.     BOOL bblank = FALSE;
  5940.  
  5941.     if (VideoControl(cm, VCTags) == NULL)
  5942.     {
  5943.         bblank = (VCTags[0].ti_Tag == VTAG_BORDERBLANK_SET);
  5944.     }
  5945.  
  5946.    EXAMPLE
  5947.     struct TagItem VCTags[] =
  5948.     {
  5949.         {VC_NoColorPaletteLoad_Query, NULL},
  5950.         {TAG_DONE},
  5951.     };
  5952.     ULONG query;
  5953.  
  5954.     VCTags[0].ti_Data = (ULONG)&query;
  5955.     if (VideoControl(cm, VCTags) == NULL)
  5956.     {
  5957.         printf("Palette loading is %s\n", (query ? "off" : "on"));
  5958.     }
  5959.  
  5960.    BUGS
  5961.  
  5962.    SEE ALSO
  5963.     graphics/videocontrol.h, GetColorMap(), FreeColorMap()
  5964.  
  5965. graphics.library/WaitBlit                           graphics.library/WaitBlit
  5966.  
  5967.    NAME
  5968.        WaitBlit -- Wait for the blitter to be finished before proceeding
  5969.                    with anything else.
  5970.  
  5971.    SYNOPSIS
  5972.        WaitBlit()
  5973.  
  5974.     void WaitBlit( void );
  5975.  
  5976.    FUNCTION
  5977.     WaitBlit returns when the blitter is idle. This function should
  5978.     normally only be used when dealing with the blitter in a
  5979.     synchronous manner, such as when using OwnBlitter and DisownBlitter.
  5980.     WaitBlit does not wait for all blits queued up using QBlit or
  5981.     QBSBlit. You should call WaitBlit if you are just about to modify or
  5982.     free some memory that the blitter may be using.
  5983.  
  5984.    INPUTS
  5985.        none
  5986.  
  5987.    RESULT
  5988.        Your program waits until the blitter is finished.
  5989.     This routine does not use any the CPU registers.
  5990.     do/d1/a0/a1 are preserved by this routine.
  5991.     It may change the condition codes though.
  5992.  
  5993.    BUGS
  5994.     When examining bits with the CPU right after a blit, or when freeing
  5995.     temporary memory used by the blitter, a WaitBlit() may be required.
  5996.  
  5997.     Note that many graphics calls fire up the blitter, and let it run.
  5998.     The CPU does not need to wait for the blitter to finish before 
  5999.     returning.
  6000.  
  6001.     Because of a bug in Agnus (prior to all revisions of fat Agnus)
  6002.      this code may return too soon when the blitter has, in fact, not 
  6003.     started the blit yet, even though BltSize has been written.  
  6004.  
  6005.     This most often occurs in a heavily loaded system with extended memory,
  6006.     HIRES, and 4 bitplanes.
  6007.  
  6008.     WaitBlit currently tries to avoid this Agnus problem by testing
  6009.     the BUSY bit multiple times to make sure the blitter has started.
  6010.     If the blitter is BUSY at first check, this function busy waits.
  6011.  
  6012.     This initial hardware bug was fixed as of the first "Fat Agnus" chip, 
  6013.     as used in all A500 and A2000 computers.
  6014.  
  6015.     Because of a different bug in Agnus (currently all revisions thru ECS)
  6016.      this code may return too soon when the blitter has, in fact, not 
  6017.     stopped the blit yet, even though blitter busy has been cleared.  
  6018.  
  6019.     This most often occurs in a heavily loaded system with extended memory,
  6020.     in PRODUCTIVITY mode, and 2 bitplanes.
  6021.  
  6022.     WaitBlit currently tries to avoid this Agnus problem by testing
  6023.     the BUSY bit multiple times to make sure the blitter has really
  6024.     written its final word of destination data.
  6025.  
  6026.    SEE ALSO
  6027.     OwnBlitter() DisownBlitter() hardware/blit.h
  6028.  
  6029. graphics.library/WaitBOVP                           graphics.library/WaitBOVP
  6030.                                                       
  6031.    NAME
  6032.     WaitBOVP -- Wait till vertical beam reached bottom of
  6033.             this viewport.
  6034.  
  6035.    SYNOPSIS
  6036.     WaitBOVP( vp )
  6037.           a0
  6038.  
  6039.     void WaitBOVP( struct ViewPort * );
  6040.  
  6041.    FUNCTION
  6042.     Returns when the vertical beam has reached the bottom of this viewport
  6043.  
  6044.    INPUTS
  6045.     vp - pointer to ViewPort structure
  6046.  
  6047.    RESULT
  6048.     This function will return sometime after the beam gets beyond
  6049.     the bottom of the viewport.  Depending on the multitasking load
  6050.     of the system, the actual beam position may be different than
  6051.     what would be expected in a lightly loaded system.
  6052.  
  6053.    BUGS
  6054.     Horrors! This function currently busy waits waiting for the
  6055.     beam to get to the right place.  It should use the copper
  6056.     interrupt to trigger and send signals like WaitTOF does.
  6057.  
  6058.    SEE ALSO
  6059.     WaitTOF() VBeamPos()
  6060.  
  6061. graphics.library/WaitTOF                             graphics.library/WaitTOF
  6062.  
  6063.    NAME
  6064.        WaitTOF -- Wait for the top of the next video frame.
  6065.  
  6066.    SYNOPSIS
  6067.        WaitTOF()
  6068.  
  6069.     void WaitTOF( void );
  6070.  
  6071.    FUNCTION
  6072.        Wait  for vertical blank to occur and all vertical blank
  6073.        interrupt routines to complete before returning to caller.
  6074.  
  6075.    INPUTS
  6076.        none
  6077.  
  6078.    RESULT
  6079.     Places this task on the TOF wait queue. When the vertical blank
  6080.     interrupt comes around, the interrupt service routine will fire off
  6081.     signals to all the tasks doing WaitTOF. The highest priority task
  6082.     ready will get to run then.
  6083.  
  6084.    BUGS
  6085.  
  6086.    SEE ALSO
  6087.     exec.library/Wait() exec.library/Signal()
  6088.  
  6089. graphics.library/WriteChunkyPixels         graphics.library/WriteChunkyPixels
  6090.  
  6091.    NAME
  6092.     WriteChunkyPixels -- write the pen number value of a rectangular array
  6093.     of pixels starting at a specified x,y location and continuing
  6094.     through to another x,y location within a certain RastPort. (V40)
  6095.  
  6096.    SYNOPSIS
  6097.     WriteChunkyPixels(rp,xstart,ystart,xstop,ystop,array,bytesperrow)
  6098.                       A0 D0     D1     D2    D3    A2     D4
  6099.  
  6100.     VOID WriteChunkyPixels(struct  RastPort *, LONG, LONG,
  6101.          LONG, LONG, UBYTE *, LONG);
  6102.  
  6103.    FUNCTION
  6104.     For each pixel in a rectangular region, decode the pen number selector
  6105.     from a linear array of pen numbers into the bit-planes used to describe
  6106.     a particular rastport.
  6107.  
  6108.    INPUTS
  6109.     rp     -  pointer to a RastPort structure
  6110.     (xstart,ystart) -  starting point in the RastPort
  6111.     (xstop,ystop)   -  stopping point in the RastPort
  6112.     array  - pointer to an array of UBYTEs from which to fetch the
  6113.              pixel data.
  6114.     bytesperrow - The number of bytes per row in the source array.
  6115.         This should be at least as large as the number of pixels
  6116.         being written per line.
  6117.  
  6118.    RESULT
  6119.  
  6120.    NOTE
  6121.     xstop must be >= xstart
  6122.     ystop must be >= ystart
  6123.     The source array can be in fast RAM.
  6124.  
  6125.    ===chunky-to-planar conversion HW:
  6126.  
  6127.    GfxBase->ChunkyToPlanarPtr is either NULL, or a pointer to a HW
  6128.    register used to aid in the process of converting 8-bit chunky 
  6129.    pixel data into the bit-plane format used by the Amiga custom
  6130.    display chips. If NULL, then such hardware is not present.
  6131.  
  6132.    If an expansion device provides hardware which operates compatibly,
  6133.    than it can install the HW address into this pointer at boot time,
  6134.    and the system will use it.
  6135.  
  6136.    This pointer may be used for direct access to the chunky-to-planar
  6137.    conversion HW, if more is desired than the straight chunky-pixel
  6138.    copy that is performed by WriteChunkyPixels().
  6139.  
  6140.    If using the hardware directly, it should only be accessed when
  6141.    the task using it has control of the blitter (via OwnBlitter()),
  6142.    since this is the locking used to arbitrate usage of this device.
  6143.  
  6144.    The hardware may be viewed as a device which accepts 32 8-bit
  6145.    chunky pixels and outputs 8 longwords of bitplane data.
  6146.  
  6147.    For proper operation, exactly 8 longwords (containing 32 pixels)
  6148.    of chunky data should be written to *(GfxBase->ChunkyToPlanarPtr).
  6149.    After the data is written, bitplane data (starting with plane 0)
  6150.    can be read back a longword at a time. There is no need to read
  6151.    back all 8 longwords if the high-order bitplanes are not needed.
  6152.  
  6153.    Since WriteChunkyPixels is not (currently) particularly fast on 
  6154.    systems without the chunky-to-planar hardware, time critical
  6155.    applications (games, etc) may want to use their own custom conversion
  6156.    routine if GfxBase->ChunkyToPlanarPtr is NULL, and call
  6157.    WriteChunkyPixels() otherwise.
  6158.  
  6159.    This pointer is only present in GfxBase in versions of graphics.library
  6160.    >= 40, so this should be checked before the pointer is read.
  6161.  
  6162.    BUGS
  6163.     Not very fast on systems without chunky-to-planar conversion
  6164.     hardware.
  6165.  
  6166.    SEE ALSO
  6167.     WritePixel()  graphics/rastport.h
  6168.  
  6169. graphics.library/WritePixel                       graphics.library/WritePixel
  6170.  
  6171.    NAME
  6172.        WritePixel -- Change the pen num of one specific pixel in a
  6173.                      specified RastPort.
  6174.  
  6175.    SYNOPSIS
  6176.        error = WritePixel(  rp, x,  y)
  6177.          d0                 a1 D0  D1
  6178.  
  6179.     LONG WritePixel( struct RastPort *, SHORT, SHORT );
  6180.  
  6181.    FUNCTION
  6182.        Changes the pen number of the selected pixel in the specified
  6183.        RastPort to that currently specified by PenA, the primary
  6184.        drawing pen. Obeys minterms in RastPort.
  6185.  
  6186.    INPUTS
  6187.        rp - a pointer to the RastPort structure
  6188.        (x,y) - point within the RastPort at which the selected
  6189.            pixel is located.
  6190.  
  6191.    RESULT
  6192.        error = 0 if pixel succesfully changed
  6193.           = -1 if (x,y) is outside the RastPort
  6194.  
  6195.    BUGS
  6196.  
  6197.    SEE ALSO
  6198.        ReadPixel() graphics/rastport.h
  6199.  
  6200. graphics.library/WritePixelArray8           graphics.library/WritePixelArray8
  6201.  
  6202.    NAME
  6203.     WritePixelArray8 -- write the pen number value of a rectangular array
  6204.     of pixels starting at a specified x,y location and continuing
  6205.     through to another x,y location within a certain RastPort. (V36)
  6206.  
  6207.    SYNOPSIS
  6208.     count = WritePixelArray8(rp,xstart,ystart,xstop,ystop,array,temprp)
  6209.     D0                       A0 D0:16  D1:16  D2:16 D3:16  A2   A1
  6210.  
  6211.     LONG WritePixelArray8(struct  RastPort *, UWORD, UWORD,
  6212.          UWORD, UWORD, UBYTE *, struct  RastPort *);
  6213.  
  6214.    FUNCTION
  6215.     For each pixel in a rectangular region, decode the pen number selector
  6216.     from a linear array of pen numbers into the bit-planes used to describe
  6217.     a particular rastport.
  6218.  
  6219.    INPUTS
  6220.     rp     -  pointer to a RastPort structure
  6221.     (xstart,ystart) -  starting point in the RastPort
  6222.     (xstop,ystop)   -  stopping point in the RastPort
  6223.     array  - pointer to an array of UBYTEs from which to fetch the
  6224.              pixel data. Allocate at least
  6225.              ((((width+15)>>4)<<4)*(ystop-ystart+1)) bytes.
  6226.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  6227.              temporary memory allocated for
  6228.              temprp->BitMap with Rows set == 1,
  6229.              temprp->BitMap with BytesPerRow == (((width+15)>>4)<<1),
  6230.              and temporary memory allocated for
  6231.              temprp->BitMap->Planes[])
  6232.  
  6233.    RESULT
  6234.     count will be set to the number of pixels plotted.
  6235.  
  6236.    NOTE
  6237.     xstop must be >= xstart
  6238.     ystop must be >= ystart
  6239.  
  6240.    BUGS
  6241.  
  6242.    SEE ALSO
  6243.     WritePixel()  graphics/rastport.h
  6244.  
  6245. graphics.library/WritePixelLine8             graphics.library/WritePixelLine8
  6246.  
  6247.    NAME
  6248.     WritePixelLine8 -- write the pen number value of a horizontal line
  6249.     of pixels starting at a specified x,y location and continuing
  6250.     right for count pixels. (V36)
  6251.  
  6252.    SYNOPSIS
  6253.     count = WritePixelLine8(rp,xstart,ystart,width,array,temprp)
  6254.     D0                      A0 D0:16  D1:16  D2    A2    A1
  6255.  
  6256.     LONG WritePixelLine8(struct RastPort *, UWORD, UWORD,
  6257.          UWORD, UBYTE *, struct RastPort *);
  6258.  
  6259.    FUNCTION
  6260.     For each pixel in a horizontal region, decode the pen number selector
  6261.     from a linear array of pen numbers into the bit-planes used to describe
  6262.     a particular rastport.
  6263.  
  6264.    INPUTS
  6265.     rp    -  pointer to a RastPort structure
  6266.     (x,y) - a point in the RastPort
  6267.     width - count of horizontal pixels to write
  6268.     array - pointer to an array of UBYTEs from which to fetch the pixel data
  6269.             allocate at least (((width+15)>>4)<<4) bytes.
  6270.     temprp - temporary rastport (copy of rp with Layer set == NULL,
  6271.              temporary memory allocated for
  6272.              temprp->BitMap with Rows set == 1,
  6273.              temprp->BitMap BytesPerRow == (((width+15)>>4)<<1),
  6274.              and temporary memory allocated for
  6275.              temprp->BitMap->Planes[])
  6276.  
  6277.    RESULT
  6278.     Count will be set to the number of pixels plotted
  6279.  
  6280.    NOTE
  6281.     width must be non negative
  6282.  
  6283.    BUGS
  6284.  
  6285.    SEE ALSO
  6286.     WritePixel()  graphics/rastport.h
  6287.  
  6288. graphics.library/XorRectRegion                 graphics.library/XorRectRegion
  6289.  
  6290.    NAME
  6291.        XorRectRegion -- Perform 2d XOR operation of rectangle
  6292.                        with region, leaving result in region
  6293.  
  6294.    SYNOPSIS
  6295.        status = XorRectRegion(region,rectangle)
  6296.          d0                     a0      a1
  6297.  
  6298.     BOOL XorRectRegion( struct Region *, struct Rectangle * );
  6299.  
  6300.    FUNCTION
  6301.     Add portions of rectangle to region if they are not in
  6302.     the region.
  6303.     Remove portions of rectangle from region if they are
  6304.     in the region.
  6305.  
  6306.    INPUTS
  6307.        region - pointer to Region structure
  6308.        rectangle - pointer to Rectangle structure
  6309.  
  6310.    RESULTS
  6311.     status - return TRUE if successful operation
  6312.          return FALSE if ran out of memory
  6313.  
  6314.    BUGS
  6315.  
  6316.    SEE ALSO
  6317.     OrRegionRegion() AndRegionRegion() graphics/regions.h
  6318.  
  6319. graphics.library/XorRegionRegion             graphics.library/XorRegionRegion
  6320.  
  6321.    NAME 
  6322.        XorRegionRegion -- Perform 2d XOR operation of one region
  6323.                        with second region, leaving result in second region 
  6324.  
  6325.    SYNOPSIS 
  6326.        status = XorRegionRegion(region1,region2) 
  6327.          d0                        a0      a1 
  6328.  
  6329.     BOOL XorRegionRegion( struct Region *, struct Region * );
  6330.  
  6331.    FUNCTION 
  6332.     Join the regions together. If any part of region1 overlaps
  6333.     region2 then remove that from the new region.
  6334.  
  6335.    INPUTS 
  6336.        region1      = pointer to Region structure
  6337.        region2      = pointer to Region structure
  6338.  
  6339.    RESULTS
  6340.     status - return TRUE if successful operation
  6341.          return FALSE if ran out of memory
  6342.  
  6343.    BUGS 
  6344.  
  6345.  
  6346.