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