home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 1 / Amiga Tools.iso / egs-tools / egs_dev-disk / egsdocs / egsblit.doc < prev    next >
Encoding:
Text File  |  1994-06-06  |  26.2 KB  |  905 lines

  1. TABLE OF CONTENTS
  2.  
  3. egsblit.library/--background--
  4. egsblit.library/EB_BitAreaCircle
  5. egsblit.library/EB_BitAreaPolygon
  6. egsblit.library/EB_BitBlt
  7. egsblit.library/EB_BitBltClipped
  8. egsblit.library/EB_CopyBitMap
  9. egsblit.library/EB_CopyBitMapClipped
  10. egsblit.library/EB_Draw
  11. egsblit.library/EB_DrawClipped
  12. egsblit.library/EB_DrawClippedPatt
  13. egsblit.library/EB_ExtractColor
  14. egsblit.library/EB_FillMask
  15. egsblit.library/EB_FillMaskClipped
  16. egsblit.library/EB_FloodFill
  17. egsblit.library/EB_FloodOneBit
  18. egsblit.library/EB_FloodZeroBit
  19. egsblit.library/EB_InvertPixel
  20. egsblit.library/EB_InvertRectangle
  21. egsblit.library/EB_ReadPixel
  22. egsblit.library/EB_RectangleClipped
  23. egsblit.library/EB_RectangleFill
  24. egsblit.library/EB_UnpackImage
  25. egsblit.library/EB_Write
  26. egsblit.library/EB_WriteClipped
  27. egsblit.library/EB_WritePixel
  28.  
  29. egsblit.library/--background--                 egsblit.library/--background--
  30.  
  31.  The egsblit.library is a collection of two types of functions.  First
  32.  special blit functions like EB_BitAreaCircle(), that are not usefull for all
  33.  types of bitmap.  And second as a collection of stubs to simplify blit
  34.  operations.  The stubs normaly invoke the method of the bitmap, so it is a
  35.  bit faster and more flexible to use direct method calls.
  36.  
  37.  EGS uses a virtual 24 bit color system.  This means that all rendering
  38.  commands can be used for 24 bit even, if the used bitmap is not 24 bit.
  39.  Using a 24 bit color on a non 24 bit bitmap will normaly result in
  40.  dithering. The dithering method relies on the bitmaps colors to be set to
  41.  the bitmap classes default palette (for the range of pens used for
  42.  dithering).
  43.  
  44.  A 24 bit pen is distinguished from a normal pen by beeing non zero in the
  45.  upper three bytes.  A problem would be color black (0x00000000), but all
  46.  dithering color schemes are selected, to have color register 0 being black.
  47.  
  48.  Dithering can cause distorting effects.  This is the case if the dithered
  49.  area is very small (e.g. text), or if a dithered area is copied around. This
  50.  problem can be solved by the use of pen colors for small areas. See
  51.  "egsintui.doc" for more information on color pen sharing.
  52.  
  53. egsblit.library/EB_BitAreaCircle             egsblit.library/EB_BitAreaCircle
  54.  
  55.    NAME
  56.     EB_BitAreaCircle -- Draw circle in one bit deep map
  57.  
  58.    SYNOPSIS
  59.     EB_BitAreaCircle(dst, radius)
  60.                      A0   D0
  61.  
  62.     void EB_BitAreaCircle(E_EBitMapPtr, WORD)
  63.  
  64.    FUNCTION
  65.     Draw a circle in a one bit deep map. The dimensions of the map are
  66.     modified to fit the circle. The result can be used for EB_FillMask
  67.     or EB_FillMaskClipped.
  68.  
  69.    NOTE
  70.     This function will change the width, height and bytesPerRow
  71.     field of the bitmap to fit the circle.
  72.  
  73.    INPUTS
  74.     radius       - radius of desired circle
  75.  
  76.    RESULT
  77.     A bitmap with a filled circle.
  78.  
  79.    SEE ALSO
  80.     EB_FillMask(), EB_FillMaskClipped(), EB_BitAreaPolygon(),
  81.     EB_FloodOneBit(), EB_FloodZeroBit()
  82.  
  83.  
  84. egsblit.library/EB_BitAreaPolygon           egsblit.library/EB_BitAreaPolygon
  85.  
  86.    NAME
  87.     EB_BitAreaPolygon -- Draw polygon in one bit deep map
  88.  
  89.    SYNOPSIS
  90.     EB_BitAreaPolygon(dst, poly, range, width, height)
  91.                       A0   A1    D0     D1     D2
  92.  
  93.     void EB_BitAreaPolygon(E_EBitMapPtr, EB_PolygonPtr, WORD, WORD, WORD)
  94.  
  95.    FUNCTION
  96.     Draws a one bit deep polygon in a map. Modifies the dimensions of the
  97.     map to fit the requierements of the polygon. The result can be used
  98.     for EB_FillMask() or EB_FillMaskClipped().
  99.  
  100.    NOTE
  101.     This function will change the width, height and bytesPerRow
  102.     field of the bitmap to fit the circle.
  103.  
  104.    INPUTS
  105.     poly         - Pointer to array of coordinate pairs. The coordinates
  106.                should be alligned to the upper left border.
  107.     range        - Number of vertices.
  108.     width,
  109.     height       - Dimensions of polygon
  110.  
  111.    RESULT
  112.  
  113.    SEE ALSO
  114.     EB_FillMask(), EB_FillMaskClipped(), EB_BitAreaCircle(),
  115.     EB_FloodOneBit(), EB_FloodZeroBit()
  116.  
  117.  
  118. egsblit.library/EB_BitBlt                           egsblit.library/EB_BitBlt
  119.  
  120.    NAME
  121.     EB_BitBlt -- do a bit blt with one or two bitmaps
  122.  
  123.    SYNOPSIS
  124.     EB_BitBlt(src, dst, xs, ys, width, height, xd, yd, terms)
  125.               A0   A1   D0  D1  D2     D3      D4  D5  D6
  126.  
  127.     void EB_BitBlt(E_EBitMapPtr, E_EBitMapPtr, WORD, WORD, WORD, WORD, WORD, WORD, UBYTE)
  128.  
  129.    FUNCTION
  130.     Performs a bit blit with a source and a destination rectangle. The
  131.     operation that is performed is defined with the terms minterm set.
  132.  
  133.    INPUTS
  134.     src          - the bitmap containing the source rectangle
  135.     dst          - the bitmap with the destination rectangle
  136.     xs           - left edge of the source
  137.     ys           - top edge of the source
  138.     width        - with of source and destination
  139.     height       - height of source and destination
  140.     xd           - left edge of the destination
  141.     yd           - top edge of the destination
  142.     terms        - minterms defining the type of operation
  143.  
  144.    RESULT
  145.     A logical combination from the source and the destination rectangle
  146.     into the destination rectangle.
  147.  
  148.    EXAMPLE
  149.     These are the sixteen possible minterm combinations:
  150.  
  151.                              dst = 0
  152.     E_nSRC_nDST                                  dst = ~(src|dst)
  153.             E_nSRC_DST                       dst = (~src)&dst
  154.     E_nSRC_nDST|E_nSRC_DST                       dst = ~src
  155.                    E_SRC_nDST            dst = src&(~dst)
  156.     E_nSRC_nDST|           E_SRC_nDST            dst = ~dst
  157.             E_nSRC_DST|E_SRC_nDST            dst = src != dst
  158.     E_nSRC_nDST|E_nSRC_DST|E_SRC_nDST            dst = ~(src&dst)
  159.                       E_SRC_DST  dst = src&dst
  160.     E_nSRC_nDST|                      E_SRC_DST  dst = src == dst
  161.             E_nSRC_DST|           E_SRC_DST  dst = dst
  162.     E_nSRC_nDST|E_nSRC_DST|           E_SRC_DST  dst = (~src)|dst
  163.                    E_SRC_nDST|E_SRC_DST  dst = src
  164.     E_nSRC_nDST|           E_SRC_nDST|E_SRC_DST  dst = src|(~dst)
  165.             E_nSRC_DST|E_SRC_nDST|E_SRC_DST  dst = src|dst
  166.     E_nSRC_nDST|E_nSRC_DST|E_SRC_nDST|E_SRC_DST  dst = 1
  167.  
  168.    NOTE
  169.     Not all minterm combination may be optimized, but all are implemented.
  170.     The most common are implemented in EB_PIXELMAP and 1 bit depth, but
  171.     you can use any type of bitmap for bitblits.  If you just want to
  172.     copy a rectangle you should consider EB_CopyBitMap(), but a call
  173.     to EB_BitBlt() with the copy minterm is routed to EB_CopyBitMap()
  174.     anyway.
  175.  
  176.    SEE ALSO
  177.     EB_BitBltClipped(), EB_CopyBitMap(), EB_FillMask(),
  178.     EB_ExtractColor()
  179.  
  180.  
  181. egsblit.library/EB_BitBltClipped             egsblit.library/EB_BitBltClipped
  182.  
  183.    NAME
  184.     EB_BitBltClipped -- perform a clipped bit blit
  185.  
  186.    SYNOPSIS
  187.     EB_BitBltClipped(src, dst, rect, xs, ys, width, height, xd, yd, terms)
  188.                      A0   A1   A2    D0  D1  D2     D3      D4  D5  D6
  189.  
  190.     void EB_BitBltClipped(E_EBitMapPtr, E_EBitMapPtr, E_ClipRectPtr, WORD, WORD, WORD, WORD, WORD, WORD, UBYTE)
  191.  
  192.    FUNCTION
  193.     Performs a clipped version of bit blit.
  194.  
  195.    INPUTS
  196.     src          - the bitmap containing the source rectangle
  197.     dst          - the bitmap with the destination rectangle
  198.     rect         - a rectangle in the destination bitmap, limiting
  199.                the affected area
  200.     xs           - left edge of the source
  201.     ys           - top edge of the source
  202.     width        - with of source and destination
  203.     height       - height of source and destination
  204.     xd           - left edge of the destination
  205.     yd           - top edge of the destination
  206.     terms        - minterms defining the type of operation
  207.  
  208.    RESULT
  209.     A logical combination from the source and the destination rectangle
  210.     into the destination rectangle.
  211.  
  212.    SEE ALSO
  213.     EB_BitBlt(), EB_CopyBitMap(), EB_FillMask(), EB_ExtractColor()
  214.  
  215.  
  216. egsblit.library/EB_CopyBitMap                   egsblit.library/EB_CopyBitMap
  217.  
  218.    NAME
  219.     EB_CopyBitMap -- Copy rectangle from bitmap to bitmap
  220.  
  221.    SYNOPSIS
  222.     EB_CopyBitMap(src, dst, xs, ys, width, height, xd, yd, mask)
  223.                   A0   A1   D0  D1  D2     D3      D4  D5  D6
  224.  
  225.     void EB_CopyBitMap(E_EBitMapPtr, E_EBitMapPtr, WORD, WORD, WORD, WORD, WORD, WORD, ULONG)
  226.  
  227.    FUNCTION
  228.     Copies a rectangular area from one bitmap to an other (or the same).
  229.     No clipping is performed either on source neither on destination. If
  230.     source bitmap is a real color map (24 Bits) and the destination is
  231.     not, a conversion will be done. This function may also be used, to
  232.     make conversions between different bitmap types.
  233.  
  234.     The function will certainly be replaced by a blitter, i.e. it should
  235.     be used in any case. "width" and "height" have the same meaning as
  236.     for EB_RectangleFill().
  237.  
  238.    INPUTS
  239.     src          - Source bitmap
  240.     dst          - Destination bitmap
  241.     xs, ys       - Location of source rectangle
  242.     width,
  243.     height       - Dimensions of rectangle
  244.     xd, yd       - Location of destination rectangle
  245.  
  246.    RESULT
  247.  
  248.    SEE ALSO
  249.     EB_CopyBitMapClipped(), EB_BitBlt
  250.  
  251.  
  252. egsblit.library/EB_CopyBitMapClipped     egsblit.library/EB_CopyBitMapClipped
  253.  
  254.    NAME
  255.     EB_CopyBitMapClipped -- Copy rectangle from bitmap to bitmap clipped
  256.  
  257.    SYNOPSIS
  258.     EB_CopyBitMapClipped(src, dst, rect, xs, ys, width, height, xd, yd, mask)
  259.                          A0   A1   A2    D0  D1  D2     D3      D4  D5  D6
  260.  
  261.     void EB_CopyBitMapClipped(E_EBitMapPtr, E_EBitMapPtr, EB_ClipRectPtr, WORD, WORD, WORD, WORD, WORD, WORD, ULONG)
  262.  
  263.    FUNCTION
  264.     Copies a rectangluar area from a bitmap to an other (or the same).
  265.     Clipping is performed through the cliprect. If source bitmap is a
  266.     real color map (24 Bits) and the destination is not, a conversion
  267.     will be done.
  268.  
  269.    INPUTS
  270.     src          - Source bitmap
  271.     dst          - Destination bitmap
  272.     rect         - Limiting clip rect in the destination bitmap
  273.     xs, ys       - Location of source rectangle
  274.     width,
  275.     height       - dimensions of rectangle
  276.     xd, yd       - location of destination rectangle
  277.  
  278.    RESULT
  279.  
  280.    SEE ALSO
  281.     EB_CopyBitMap(), EB_BitBlt()
  282.  
  283.  
  284. egsblit.library/EB_Draw                               egsblit.library/EB_Draw
  285.  
  286.    NAME
  287.     EB_Draw -- Draw line
  288.  
  289.    SYNOPSIS
  290.     EB_Draw(map, c, x1, y1, x2, y2, mask)
  291.             A0   D0 D1  D2  D3  D4  D5
  292.  
  293.     void EB_Draw(E_EBitMapPtr, ULONG, WORD, WORD, WORD, WORD, ULONG)
  294.  
  295.    FUNCTION
  296.     Draws a line of color c into a bitmap. If the color is a 24Bit color
  297.     (using the heigher 24Bits, but not the lower eight) and the bitmap is
  298.     no real color map, the next matching color is chosen. No clipping is
  299.     performed.
  300.  
  301.     The function uses a modified Bresenham algorithm for ultimate speed
  302.     and will certainly be replaced by a blitter.  This means it should
  303.     be used in any case.
  304.  
  305.    INPUTS
  306.     map          - map in which to render
  307.     c            - color, -1 to invert
  308.     x1, y1       - starting position
  309.     x2, y2       - ending position
  310.  
  311.    RESULT
  312.  
  313.    SEE ALSO
  314.     EB_DrawClipped(), EB_ClippedPatt()
  315.  
  316.  
  317. egsblit.library/EB_DrawClipped                 egsblit.library/EB_DrawClipped
  318.  
  319.    NAME
  320.     EB_DrawClipped -- Draw line clipped
  321.  
  322.    SYNOPSIS
  323.     EB_DrawClipped(map, rect, c, x1, y1, x2, y2, mask)
  324.                    A0   A1    D0 D1  D2  D3  D4  D5
  325.  
  326.     void EB_DrawClipped(E_EBitMapPtr, EB_ClipRectPtr, ULONG, WORD, WORD, WORD, WORD, ULONG)
  327.  
  328.    FUNCTION
  329.     Draw a line into a bitmap (see also EB_Draw()). Clipping is
  330.     performed using the cliprect. The function only clips in one
  331.     cliprect. To render through a list of cliprects, you should call this
  332.     function once for every cliprect. The function respects the remainder
  333.     when clipping, so if using several cliprects, the line is not broken
  334.     at borders.
  335.  
  336.    INPUTS
  337.     map          - bitmap in which to render
  338.     rect         - cliprect for clipping
  339.     c            - color, -1 to invert
  340.     x1, y1       - starting position
  341.     x2, y2       - ending position
  342.  
  343.    RESULT
  344.  
  345.    SEE ALSO
  346.     EB_Draw(), EB_ClippedPatt()
  347.  
  348.  
  349. egsblit.library/EB_DrawClippedPatt         egsblit.library/EB_DrawClippedPatt
  350.  
  351.    NAME
  352.     EB_DrawClippedPatt -- draw a clipped line with a pattern
  353.  
  354.    SYNOPSIS
  355.     EB_DrawClippedPatt(map, rect, front, back, x1, y1, x2, y2, patt)
  356.                        A0   A1    D0     D1    D2  D3  D4  D5  D6
  357.  
  358.     void EB_DrawClippedPatt(E_EBitMapPtr, EB_ClipRectPtr, LONG, LONG, WORD, WORD, WORD, WORD, UWORD)
  359.  
  360.    FUNCTION
  361.     Draw a line into a bitmap (see also EB_Draw()). Clipping is
  362.     performed using the cliprect. The function only clips in one
  363.     cliprect. To render through a list of cliprects, you should call this
  364.     function once for every cliprect. The function respects the remainder
  365.     when clipping, so if using several cliprects, the line is not broken
  366.     at borders.
  367.  
  368.     If a pattern is supplied two pens will be used for rendering.
  369.  
  370.    INPUTS
  371.     map          - the map to draw into
  372.     rect         - a limiting clip rectangle, NULL for no clipping
  373.     front        - first pen (for 1 in the mask) -1 means invert
  374.     back         - second pen (for 0 in the mask) -1 means transparent
  375.     x1, y1       - starting location
  376.     x2, y2       - ending location
  377.     patt         - pattern, starting with the MSB and rotating to the
  378.                left one bit after every pixel.
  379.  
  380.    RESULT
  381.  
  382.    SEE ALSO
  383.     EB_Draw(), EB_DrawClipped()
  384.  
  385.  
  386. egsblit.library/EB_ExtractColor               egsblit.library/EB_ExtractColor
  387.  
  388.    NAME
  389.     EB_ExtractColor -- build a mask for a color
  390.  
  391.    SYNOPSIS
  392.     EB_ExtractColor(src, dst, color, sx, sy, w, h, dx, dy)
  393.                     A0   A1   D0     D1  D2  D3 D4 D5  D6
  394.  
  395.     void EB_ExtractColor(E_EBitMapPtr, E_EBitMapPtr, ULONG, WORD, WORD, WORD, WORD, WORD, WORD)
  396.  
  397.    FUNCTION
  398.     Builds a mask of a rectangle depending on one color.  For every
  399.     pixel in the source that matches the color, the corresponding bit in
  400.     the mask rectangle is toggled.  This can be use for brush masking or
  401.     flood fill.
  402.  
  403.    INPUTS
  404.     src          - bitmap containing the source rectangle
  405.     dst          - bitmap holding the mask
  406.     color        - the color to be looked for
  407.     sx, sy       - top left edge of sourced
  408.     w, h         - size of source and destination
  409.     dx, dy       - top left edge of mask
  410.  
  411.    RESULT
  412.     A modified mask rectangle
  413.  
  414.    EXAMPLE
  415.     Doing an flood fill in a bitmap
  416.  
  417.     void Flood(E_EBitMapPtr map; ULONG color; WORD x; WORD y)
  418.     {
  419.        E_BitMapPtr mask;
  420.        EB_ClipRect rect, drect;
  421.        EB_ImageDest image;
  422.        ULONG oldColor;
  423.        /*
  424.         * Allocate a temporary mask bitmap
  425.         */
  426.        mask = E_AllocBitMap(map->With, map->Height, 1, E_PIXELMAP,
  427.                 E_EB_CLEARMAP, NULL);
  428.        if (mask)
  429.        {
  430.           /*
  431.            * get the color that is already there
  432.            */
  433.           oldColor = EB_ReadPixel(map, x, y);
  434.           /*
  435.            * Set all bits, coresponding to pixels that have the
  436.            * old color color to 1
  437.            */
  438.           EB_ExtractColor(map, mask, oldColor, 0, 0,
  439.                   map->Width, map->Height, 0, 0);
  440.           /*
  441.            * Use the bitmap boundaries
  442.            */
  443.           rect.Left = 0;
  444.           rect.Top  = 0;
  445.           rect.Right = map->Width -1;
  446.           rect.Bottom = map->Height-1;
  447.           /*
  448.            * Flood fill all bits with 1 to 0, this changes the region that
  449.            * was supposed to be flood filled
  450.            */
  451.           EB_FloodOneBit(mask,&rect,&drect,x,y);
  452.           /*
  453.            * Toggle all bits that were not in the flood to 0 and the
  454.            * ones that were flood back to 1
  455.            */
  456.           EB_ExtractColor(map, mask, oldColor,
  457.                   drect.Left, drect.Top,
  458.                   drect.Right-drect.Left+1,
  459.                   drect.Bottom-drect.Top+1,
  460.                   drect.Left, drect.Top);
  461.           /*
  462.            * now fill the flooded area with the correct color
  463.            */
  464.           image.Colors.front = color;
  465.           image.Colors.transparent = TRUE;
  466.           image.Left = drect.Left;
  467.           image.Top = drect.Top;
  468.           image.Width = drect.Right-drect.Left+1;
  469.           image.Height = drect.Bottom-drect.top+1;
  470.           EB_FillMask(mask,map,&image,drect->Left,drect->Top,0);
  471.           E_DisposeBitMap(map);
  472.        }
  473.     }
  474.  
  475.    SEE ALSO
  476.     EB_FloodOneBit(), EB_FloodZeroBit(), EB_FillMask(), EB_BitBlt()
  477.  
  478.  
  479. egsblit.library/EB_FillMask                       egsblit.library/EB_FillMask
  480.  
  481.    NAME
  482.     EB_FillMask -- Fill rectangle in bitmap through one pixel deep map
  483.  
  484.    SYNOPSIS
  485.     EB_FillMask(mask, dst, pattern, x, y, mask2)
  486.                 A0    A1   A2       D0 D1 D2
  487.  
  488.     void EB_FillMask(E_EBitMapPtr, E_EBitMapPtr, EB_ImageDesPtr, WORD, WORD, ULONG)
  489.  
  490.    FUNCTION
  491.     Fills a rectangluar area with one or two colors, depending on a mask.
  492.     The size and location in the mask of the rectangle is described in
  493.     pattern. If the colors described in pattern are 24bit colors and the
  494.     map is no 24bit map, this function renders with color patterns, to
  495.     simulate 24 bits. The function serves as basic function for Amiga
  496.     fonts and Area commands.
  497.  
  498.    INPUTS
  499.     mask         - mask bitplane
  500.     dst          - destinaton bitmap
  501.     pattern      - description of source rectangle and colors
  502.     x, y         - destination location
  503.  
  504.    RESULT
  505.  
  506.    SEE ALSO
  507.     EB_FillMaskClipped(), EB_BitAreaCircle(), EB_BitAreaPolygon(),
  508.     EB_FloodOneBit(), EB_FloodZeroBit(), EB_ExtractColor()
  509.  
  510.  
  511. egsblit.library/EB_FillMaskClipped         egsblit.library/EB_FillMaskClipped
  512.  
  513.    NAME
  514.     EB_FillMaskClipped -- Fill rectangle clipped through one bit deep mask
  515.  
  516.    SYNOPSIS
  517.     EB_FillMaskClipped(mask, dst, pattern, clip, x, y, mask2)
  518.                        A0    A1   A2       A3    D0 D1 D2
  519.  
  520.     void EB_FillMaskClipped(E_EBitMapPtr, E_EBitMapPtr, EB_ImageDesPtr, EB_ClipRectPtr, WORD, WORD, ULONG)
  521.  
  522.    FUNCTION
  523.     Same as fill mask, but clipping is performed according to the
  524.     cliprect.
  525.  
  526.    INPUTS
  527.     mask         - mask bitplane
  528.     dst          - destinaton bitmap
  529.     pattern      - description of source rectangle and colors
  530.     clip         - cliprect
  531.     x, y         - destination location
  532.  
  533.    RESULT
  534.  
  535.    SEE ALSO
  536.     EB_FillMask(), EB_BitAreaCircle(), EB_BitAreaPolygon(),
  537.     EB_FloodOneBit(), EB_FloodZeroBit(), EB_ExtractColor()
  538.  
  539.  
  540. egsblit.library/EB_FloodFill                     egsblit.library/EB_FloodFill
  541.  
  542.    NAME
  543.     EB_FloodFill -- Fill connected area in bitmap (obsolete)
  544.  
  545.    SYNOPSIS
  546.     EB_FloodFill(dst, clip, color, x, y, mode)
  547.                  A0   A1    D0     D1 D2 D3
  548.  
  549.     void EB_FloodFill(E_EBitMapPtr, EB_ClipRectPtr, ULONG, WORD, WORD, ULONG)
  550.  
  551.    FUNCTION
  552.     Fills a consecutive area of pixels, the cliprect serves as additional
  553.     border, if the area is open to the verge. If mode is set to zero then
  554.     then that segement is filled which has the color of the starting
  555.     point, else that segment is filled, which is surrounded by the fill
  556.     color.
  557.  
  558.    INPUTS
  559.     dst          - Destination bitmap
  560.     clip         - cliprect
  561.     color        - fillcolor
  562.     x, y         - starting location
  563.  
  564.    RESULT
  565.  
  566.    SEE ALSO
  567.  
  568.  
  569. egsblit.library/EB_FloodOneBit                 egsblit.library/EB_FloodOneBit
  570.  
  571.    NAME
  572.     EB_FloodOneBit -- flood with ones
  573.  
  574.    SYNOPSIS
  575.     EB_FloodOneBit(map, clip, dclip, x, y)
  576.                    A0   A1    A2     D0 D1
  577.  
  578.     void EB_FloodOneBit(E_EBitMapPtr, EB_ClipRectPtr, EB_ClipRectPtr, WORD, WORD)
  579.  
  580.    FUNCTION
  581.     Floods an area of zeros with ones. Only works with E_PIXELMAP and one
  582.     bit depth.
  583.  
  584.    INPUTS
  585.     map          - the mask to flood
  586.     clip         - surrounding cliprect, giving maximum borders for
  587.                the flood
  588.     dclip        - destination cliprect. Is filled with the actual size
  589.                of the flooded area
  590.     x, y         - seed location
  591.  
  592.    RESULT
  593.  
  594.    SEE ALSO
  595.     EB_FloodZeroBit(), EB_ExtractColor(), EB_FillMask()
  596.  
  597.  
  598. egsblit.library/EB_FloodZeroBit               egsblit.library/EB_FloodZeroBit
  599.  
  600.    NAME
  601.     EB_FloodZeroBit -- flood with zeros
  602.  
  603.    SYNOPSIS
  604.     EB_FloodZeroBit(map, clip, dclip, x, y)
  605.                     A0   A1    A2     D0 D1
  606.  
  607.     void EB_FloodZeroBit(E_EBitMapPtr, EB_ClipRectPtr, EB_ClipRectPtr, WORD, WORD)
  608.  
  609.    FUNCTION
  610.     Floods an area of ones with zeros. Only works with E_PIXELMAP and one
  611.     bit depth.
  612.  
  613.    INPUTS
  614.     map          - the mask to flood
  615.     clip         - surrounding cliprect, giving maximum borders for
  616.                the flood
  617.     dclip        - destination cliprect. Is filled with the actual size
  618.                of the flooded area
  619.     x, y         - seed location
  620.  
  621.    RESULT
  622.  
  623.    SEE ALSO
  624.     EB_FloodZeroBit(), EB_ExtractColor(), EB_FillMask()
  625.  
  626.  
  627. egsblit.library/EB_InvertPixel                 egsblit.library/EB_InvertPixel
  628.  
  629.    NAME
  630.     EB_InvertPixel -- Invert a pixel
  631.  
  632.    SYNOPSIS
  633.     EB_InvertPixel(map, x, y)
  634.                    A0   D0 D1
  635.  
  636.     void EB_InvertPixel(E_EBitMapPtr, WORD, WORD)
  637.  
  638.    FUNCTION
  639.     Inverts a pixel. Double usage of this function by using the same
  640.     parameters will be no effect.
  641.  
  642.    INPUTS
  643.     map          - bitmap to work on
  644.     x, y         - pixel coordinates
  645.  
  646.    RESULT
  647.  
  648.    SEE ALSO
  649.     EB_WritePixel(), EB_ReadPixel()
  650.  
  651.  
  652. egsblit.library/EB_InvertRectangle         egsblit.library/EB_InvertRectangle
  653.  
  654.    NAME
  655.     EB_InvertRectangle -- Invert the border of a rectangle
  656.  
  657.    SYNOPSIS
  658.     EB_InvertRectangle(map, left, top, right, bottom)
  659.                        A0   D0    D1   D2     D3
  660.  
  661.     void EB_InvertRectangle(E_EBitMapPtr, WORD, WORD, WORD, WORD)
  662.  
  663.    FUNCTION
  664.     Inverts the border of a rectangle. Double usage of this function
  665.     using same parameters will result in no effect. Should be used for
  666.     mouse dragging operations. This function is used by EGSIntui to move
  667.     and resize windows. Clipping is performed at the bitmap borders.
  668.  
  669.    INPUTS
  670.     map          - the bitmap to work on
  671.     left         - left edge of the rectangle
  672.     top          - top edge of the rectangle
  673.     right        - right edge of the rectangle
  674.     bottom       - bottom edge of the rectangle
  675.  
  676.    RESULT
  677.  
  678.    SEE ALSO
  679.     EB_RectangleFill()
  680.  
  681.  
  682. egsblit.library/EB_ReadPixel                     egsblit.library/EB_ReadPixel
  683.  
  684.    NAME
  685.     EB_ReadPixel -- get the color of a pixel
  686.  
  687.    SYNOPSIS
  688.     EB_ReadPixel(map, x, y)
  689.                  A0   D0 D1
  690.  
  691.     ULONG EB_ReadPixel(E_EBitMapPtr, WORD, WORD)
  692.  
  693.    FUNCTION
  694.     Returns the color of a pixel. In pseudo modes this is the register
  695.     number in real mode its the color itself (RRRR RRRR GGGG GGGG BBBB
  696.     BBBB xxxx xxxx).
  697.  
  698.     Reads a pixel's colour.  This function is certainly not accelerated
  699.     by a blitter.  Should be used for reasons of compatibility when
  700.     using several bit depths or when support of any new graphics card
  701.     without software modification is wanted.
  702.  
  703.     Obviously for 8 or 24 bit mode more direct techniques are
  704.     recommended.
  705.  
  706.    INPUTS
  707.     map          - pointer to the bitmap
  708.     x, y         - pixel coordinates in the map
  709.  
  710.    RESULT
  711.     the color, either a register value or a real color value, depending on
  712.     the mode
  713.  
  714.    EXAMPLE
  715.     To get a 24 bit color value:
  716.  
  717.     color = (map->Colors) ?
  718.            (ULONG)(map->Colors[EB_ReadPixel(map,x,y)]) :
  719.            EB_ReadPixel(map,x,y);
  720.  
  721.    SEE ALSO
  722.  
  723.  
  724. egsblit.library/EB_RectangleClipped       egsblit.library/EB_RectangleClipped
  725.  
  726.    NAME
  727.     EB_RectangleClipped -- Fill rectangle clipped
  728.  
  729.    SYNOPSIS
  730.     EB_RectangleClipped(map, rect, c, left, top, width, height, mask)
  731.                         A0   A1    D0 D1    D2   D3     D4      D5
  732.  
  733.     void EB_RectangleClipped(E_EBitMapPtr, EB_ClipRectPtr, ULONG, WORD, WORD, WORD, WORD, ULONG)
  734.  
  735.    FUNCTION
  736.     Same as EB_RectangleFill(), but clipping is done using the cliprect.
  737.  
  738.    INPUTS
  739.     map          - the bitmap to fill
  740.     rect         - limiting clip rect
  741.     c            - color to fill with
  742.     left, top    - left top coordinate of rectangle
  743.     width,
  744.     height       - size of rectangle
  745.  
  746.    RESULT
  747.  
  748.    SEE ALSO
  749.     EB_RectangleFill()
  750.  
  751.  
  752. egsblit.library/EB_RectangleFill             egsblit.library/EB_RectangleFill
  753.  
  754.    NAME
  755.     EB_RectangleFill -- Fill rectangle
  756.  
  757.    SYNOPSIS
  758.     EB_RectangleFill(map, c, left, top, width, height, mask)
  759.                      A0   D0 D1    D2   D3     D4      D5
  760.  
  761.     void EB_RectangleFill(E_EBitMapPtr, ULONG, WORD, WORD, WORD, WORD, ULONG)
  762.  
  763.    FUNCTION
  764.     Fills a rectangular area in a bitmap. If the color is a 24 bit color,
  765.     but the bitmap is not 24 bit deep, the function fills with a color
  766.     pattern to simulate 24 bits. "width" and "height" describe the real
  767.     width and height in pixels, i.e. a one-pixeled rectangle has
  768.     width=height=1.
  769.  
  770.     This function will certainly be replaced by a blitter and therefore
  771.     should be used in any case.
  772.  
  773.    INPUTS
  774.     map          - bitmap in which to fill
  775.     c            - color, -1 to invert
  776.     left, top    - uppper left corner of rectangle
  777.     width,
  778.     height       - dimensions of rectangle
  779.  
  780.    RESULT
  781.  
  782.    SEE ALSO
  783.     EB_RectangleClipped()
  784.  
  785.  
  786. egsblit.library/EB_UnpackImage                 egsblit.library/EB_UnpackImage
  787.  
  788.    NAME
  789.     EB_UnpackImage -- convert image to bitmap (obsolete)
  790.  
  791.    SYNOPSIS
  792.     EB_UnpackImage(image, depth, colors)
  793.                    A1     D0     A2
  794.  
  795.     E_EBitMapPtr EB_UnpackImage(EB_ImagePtr, WORD, EB_ColorTablePtr)
  796.  
  797.    FUNCTION
  798.     As the EGS libraries work in different bit depths, and bitmap
  799.     organisations, there has to be an standardized format for icon,
  800.     images etc. This format is defined in EB_Image. The aim of this
  801.     function is to convert from this format to a bitmap. This function
  802.     also allocates a bitmap in fast mem.
  803.  
  804.    INPUTS
  805.     image        - Image to convert
  806.     depth        - depth for destination
  807.     colors       - array of colors to use for conversion
  808.  
  809.    RESULT
  810.  
  811.    BUGS
  812.     This function has now knowledge of the desired bitmap type, so it
  813.     will return any type of bitmap, thus resulting in slow blits. The
  814.     proposed work around, is to allocate a bitmap using E_AllocBitMap(),
  815.     and then apply the "Unpack" method to it.
  816.  
  817.    SEE ALSO
  818.  
  819.  
  820. egsblit.library/EB_Write                             egsblit.library/EB_Write
  821.  
  822.    NAME
  823.     EB_Write -- write text in build in font
  824.  
  825.    SYNOPSIS
  826.     EB_Write(map, color, x, y, str, len, mask)
  827.              A0   A2     D0 D1 A3   D2   D3
  828.  
  829.     void EB_Write(E_EBitMapPtr, EB_ColorDesPtr, WORD, WORD, char *, WORD, ULONG)
  830.  
  831.    FUNCTION
  832.     Renders a text into a bitmap, using a build in 8x10 non proportional
  833.     font. This function is faster than the EB_UnpackImage which is used
  834.     by EG_Text(), to render amiga fonts. If your programs use lots of
  835.     text and have no extraordinary font requirements you should use this
  836.     font.
  837.  
  838.    INPUTS
  839.     map          - destination bitmap
  840.     color        - description of front and back color and transparency
  841.     x, y         - starting location
  842.     str          - text
  843.     len          - length of text
  844.  
  845.    RESULT
  846.  
  847.    SEE ALSO
  848.     EB_WriteClipped(), EG_Text(), EB_FillMask()
  849.  
  850.  
  851. egsblit.library/EB_WriteClipped               egsblit.library/EB_WriteClipped
  852.  
  853.    NAME
  854.     EB_WriteClipped -- write text clipped in build in font
  855.  
  856.    SYNOPSIS
  857.     EB_WriteClipped(map, rect, color, x, y, str, len, mask)
  858.                     A0   A1    A2     D0 D1 A3   D2   D3
  859.  
  860.     void EB_WriteClipped(E_EBitMapPtr, EB_ClipRectPtr, EB_ColorDesPtr, WORD, WORD, char *, WORD, ULONG)
  861.  
  862.    FUNCTION
  863.     Same as EB_Write, but clipping is performed using the cliprect.
  864.  
  865.    INPUTS
  866.     map          - destination bitmap
  867.     rect         - limiting clipping rectangle
  868.     color        - description of front and back color and transparency
  869.     x, y         - starting location
  870.     str          - text
  871.     len          - length of text
  872.  
  873.    RESULT
  874.  
  875.    SEE ALSO
  876.     EB_Write(), EG_Text(), EB_FillMask()
  877.  
  878.  
  879. egsblit.library/EB_WritePixel                   egsblit.library/EB_WritePixel
  880.  
  881.    NAME
  882.     EB_WritePixel -- set a pixel
  883.  
  884.    SYNOPSIS
  885.     EB_WritePixel(map, c, x, y, mask)
  886.                   A0   D0 D1 D2 D3
  887.  
  888.     void EB_WritePixel(E_EBitMapPtr, ULONG, WORD, WORD, ULONG)
  889.  
  890.    FUNCTION
  891.     Writes pixel into a bitmap. If the color is 24 bit color but the
  892.     bitmap is not the library simulates a 24 bit bitmap, using patterns.
  893.     See also EB_ReadPixel.
  894.  
  895.    INPUTS
  896.     map          - map to work on
  897.     c            - color to be used for the pixel
  898.     x, y         - pixel location
  899.  
  900.    RESULT
  901.  
  902.    SEE ALSO
  903.  
  904.  
  905.