home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / misc / RenderLib.lha / RenderLib / Doc / Autodoc / render.doc < prev    next >
Encoding:
Text File  |  1997-01-17  |  47.4 KB  |  1,442 lines

  1. TABLE OF CONTENTS
  2.  
  3. render.library/AddChunkyImageA
  4. render.library/AddHistogramA
  5. render.library/AddRGB
  6. render.library/AddRGBImageA
  7. render.library/AllocRenderMem
  8. render.library/AllocRenderVec
  9. render.library/BestPen
  10. render.library/Chunky2BitMapA
  11. render.library/Chunky2RGBA
  12. render.library/ConvertChunkyA
  13. render.library/CountRGB
  14. render.library/CreateHistogramA
  15. remder.library/CreatePaletteA
  16. render.library/CreatePenTableA
  17. render.library/CreateRMHandlerA
  18. render.library/CreateScaleEngineA
  19. render.library/DeleteHistogram
  20. render.library/DeletePalette
  21. render.library/DeleteRMHandler
  22. render.library/DeleteScaleEngine
  23. render.library/ExportPaletteA
  24. render.library/ExtractPaletteA
  25. render.library/FlushPalette
  26. render.library/FreeRenderMem
  27. render.library/FreeRenderVec
  28. render.library/ImportPaletteA
  29. render.library/Planar2ChunkyA
  30. render.library/QueryHistogram
  31. render.library/RenderA
  32. render.library/ScaleA
  33. render.library/ScaleOrdinate
  34. render.library/SortPaletteA
  35. render.library/AddChunkyImageA                 render.library/AddChunkyImageA
  36.  
  37.    NAME
  38.         AddChunkyImageA - add chunky bytes to a histogram.
  39.         AddChunkyImage  - varargs stub for AddChunkyImageA.
  40.  
  41.    SYNOPSIS
  42.         success = AddChunkyImageA(histogram,chunky,width,height,
  43.         d0                        a0        a1     d0    d1     
  44.                                   palette,taglist)
  45.                                   a2      a3
  46.         
  47.         ULONG AddChunkyImageA(APTR,UBYTE *,UWORD,UWORD,
  48.                               APTR,struct TagItem *)
  49.         
  50.         ULONG AddChunkyImageA(APTR,UBYTE *,UWORD,UWORD,
  51.                               APTR,tag,...,TAG_DONE)
  52.  
  53.    FUNCTION
  54.         This function adds an array of chunky bytes to a
  55.         histogram. The color information contained in the
  56.         chunky array gets stored in the histogram.
  57.  
  58.    INPUTS
  59.         histogram       - pointer to a histogram
  60.         chunky          - pointer to an array of chunky bytes
  61.         width           - width to be added [pixels]
  62.         height          - lines to be added [rows]
  63.         palette         - pointer to a palette object
  64.                           created with CreatePaletteA()
  65.         taglist         - pointer to an array of TagItems
  66.  
  67.    TAGS
  68.         RND_SourceWidth (UWORD) - Total width of the chunky array [pixels].
  69.                 Default - equals to the specified width.
  70.  
  71.         RND_ProgressHook (ULONG) - Pointer to a callback hook
  72.                 structure for progress display operations. Refer to
  73.                 render/renderhooks.h for further information.
  74.                 Default - NULL.
  75.         
  76.    RESULTS
  77.         success - return value to indicate whether the operation succeeded.
  78.                   You must at least check for ADDH_SUCCESS. Adding data to
  79.                   histograms may fail at any time and the histogram may
  80.                   thereof get inaccurate.
  81.  
  82.    NOTES
  83.         - It is not possible with this function to directly add a chunky
  84.           array that represents a HAM color scheme. In this case you have
  85.           to convert it to an RGB array via Chunky2RGBA(), and then to call
  86.           AddRGBImageA().
  87.            
  88.         - This function may call the progress callback Hook with
  89.           the PMSGTYPE_LINES_ADDED message.
  90.         
  91.    SEE ALSO
  92.         AddRGBImageA(), CreateHistogramA(), render/renderhooks.h
  93.  
  94.  
  95. render.library/AddHistogramA                     render.library/AddHistogramA
  96.  
  97.    NAME
  98.         AddHistogramA - add a histogram to another histogram.
  99.         AddHistogram  - varargs stub for AddHistogramA.
  100.  
  101.    SYNOPSIS
  102.         success = AddHistogramA(desthistogram,sourcehistogram,taglist)
  103.         d0                      a0            a1              a2
  104.         
  105.         ULONG AddHistogramA(APTR,APTR,struct TagItem *)
  106.         
  107.         ULONG AddHistogramA(APTR,APTR,tag,...,TAG_DONE)
  108.  
  109.    FUNCTION
  110.         This function adds a histogram to another histogram,
  111.         according to the following scheme:
  112.         
  113.         desthistogram + sourcehistogram -> desthistogram
  114.         
  115.         The color information contained in the source histogram
  116.         will be added to the destination histogram.
  117.  
  118.    INPUTS
  119.         desthistogram       - pointer to destination histogram
  120.         sourcehistogram     - pointer to source histogram
  121.         taglist             - pointer to an array of TagItems
  122.  
  123.    TAGS
  124.         None defined. Pass NULL.
  125.  
  126.    RESULTS
  127.         success - return value to indicate whether the operation succeeded.
  128.                   You must at least check for ADDH_SUCCESS. Adding data to
  129.                   histograms may fail at any time and the histogram may
  130.                   thereof get inaccurate.
  131.        
  132.    SEE ALSO
  133.         CreateHistogramA()
  134.  
  135.  
  136. render.library/AddRGB                                   render.library/AddRGB
  137.  
  138.    NAME
  139.         AddRGB - add a RGB value to a histogram.
  140.  
  141.    SYNOPSIS
  142.         success = AddRGB(histogram,RGB,count)
  143.         d0               a0        d0  d1
  144.         
  145.         ULONG AddRGB(APTR,ULONG,ULONG)
  146.  
  147.    FUNCTION
  148.         This function adds a single RGB value plus the number
  149.         of its representations to a histogram.
  150.  
  151.    INPUTS
  152.         histogram    - pointer to a histogram
  153.         RGB          - RGB value to be added
  154.         count        - number of represantations for that RGB value
  155.  
  156.    RESULTS
  157.         success - return value to indicate whether the operation succeeded.
  158.                   You must at least check for ADDH_SUCCESS. Adding data to
  159.                   histograms may fail at any time and the histogram may
  160.                   thereof get inaccurate.
  161.  
  162.    SEE ALSO
  163.         AddRGBImageA(), CreateHistogramA()
  164.  
  165.  
  166. render.library/AddRGBImageA                       render.library/AddRGBImageA
  167.  
  168.    NAME
  169.         AddRGBImageA - add an array of RGB data to a histogram.
  170.         AddRGBImage  - varargs stub for AddRGBImageA.
  171.  
  172.    SYNOPSIS
  173.         success = AddRGBImageA(histogram,rgb,width,height,taglist)
  174.         d0                     a0        a1  d0    d1     a2
  175.         
  176.         ULONG AddRGBImageA(APTR,ULONG *,UWORD,UWORD,struct TagItem *)
  177.         
  178.         ULONG AddRGBImage(APTR,ULONG *,UWORD,UWORD,tag,...,TAG_DONE) 
  179.  
  180.    FUNCTION
  181.         This function adds an array of RGB pixels to a
  182.         histogram. The color information contained in the
  183.         RGB array gets stored in the histogram.
  184.  
  185.    INPUTS
  186.         histogram       - pointer to a histogram
  187.         rgb             - pointer to an array of RGB data
  188.         width           - width to be added [pixels]
  189.         height          - lines to be added [rows]
  190.         taglist         - pointer to an array of TagItems
  191.  
  192.    TAGS
  193.         RND_SourceWidth (UWORD) - Total width of the RGB array [pixels].
  194.                 Default - equals to the specified width.
  195.  
  196.         RND_ProgressHook (ULONG) - Pointer to a callback hook
  197.                 structure for progress display operations. Refer to
  198.                 render/renderhooks.h for further information.
  199.                 Default - NULL.
  200.  
  201.    RESULTS
  202.         success - return value to indicate whether the operation succeeded.
  203.                   You must at least check for ADDH_SUCCESS. Adding data to
  204.                   histograms may fail at any time and the histogram may
  205.                   thereof get inaccurate.
  206.  
  207.    NOTES
  208.         - This function may call the progress callback Hook with
  209.           the PMSGTYPE_LINES_ADDED message.
  210.         
  211.    SEE ALSO
  212.         AddRGB(), CreateHistogramA(), render/renderhooks.h
  213.  
  214.  
  215. render.library/AllocRenderMem                   render.library/AllocRenderMem
  216.  
  217.    NAME
  218.         AllocRenderMem - allocate memory from a render-memhandler.
  219.  
  220.    SYNOPSIS
  221.         mem = AllocRenderMem(rendermemhandler,size)
  222.         d0                   a0               d0
  223.  
  224.         APTR AllocRenderMem(APTR, ULONG)
  225.  
  226.    FUNCTION
  227.         AllocRenderMem will allocate a memory block from a
  228.         render-memhandler, or from public memory. If there is no
  229.         memory block of the requested size available, NULL will be
  230.         returned. You must check this return value. The request
  231.         may fail at any time. Every call to this function must be
  232.         followed by a call to FreeRenderMem.
  233.  
  234.    INPUTS
  235.         rendermemhandler - pointer to a render-memhandler, or NULL.
  236.                            If you pass NULL, MEMF_ANY will be used.
  237.         size             - the size of the desired block in bytes
  238.  
  239.    RESULTS
  240.         mem              - pointer to a block of memory, or NULL if the
  241.                            allocation failed.
  242.  
  243.    NOTES
  244.         There is no real need for this function being available to
  245.         you, except for helping you to create a smart, lean and sexy
  246.         memory management - the idea is to enable your application
  247.         and the library to share a particular memory pool.
  248.  
  249.    SEE ALSO
  250.         FreeRenderMem(), AllocRenderVec(), CreateRMHandlerA()
  251.  
  252.  
  253. render.library/AllocRenderVec                   render.library/AllocRenderVec
  254.  
  255.    NAME
  256.         AllocRenderVec - allocate memory from a render-memhandler, 
  257.                          keeping track of the allocated size and
  258.                          the memhandler itself.
  259.  
  260.    SYNOPSIS
  261.         mem = AllocRenderVec(rendermemhandler,size)
  262.         d0                   a0               d0
  263.  
  264.         APTR AllocRenderVec(APTR, ULONG)
  265.  
  266.    FUNCTION
  267.         AllocRenderVec will allocate a memory block from a
  268.         render-memhandler, or from public memory. If there is no
  269.         memory block of the requested size available, NULL will be
  270.         returned. You must check this return value. The request
  271.         may fail at any time. Any call to this function must be
  272.         followed by a call to FreeRenderVec(). AllocRenderVec()
  273.         keeps track of the allocated size and the memhandler itself.
  274.  
  275.    INPUTS
  276.         rendermemhandler - pointer to a render-memhandler, or NULL.
  277.                            If you pass NULL, MEMF_ANY will be used.
  278.         size             - the size of the desired block in bytes
  279.  
  280.    RESULTS
  281.         mem              - pointer to a block of memory, or NULL
  282.                            if the allocation failed.
  283.  
  284.    SEE ALSO
  285.         FreeRenderVec(), AllocRenderMem(), CreateRMHandlerA()
  286.  
  287.  
  288. render.library/BestPen                                 render.library/BestPen
  289.  
  290.    NAME
  291.         BestPen - find the best matching pen.
  292.  
  293.    SYNOPSIS
  294.         pen = BestPen(palette,RGB)
  295.         d0            a0      d0
  296.         
  297.         LONG BestPen(APTR,ULONG)
  298.  
  299.    FUNCTION
  300.         Calculate a palette's pen number that matches best
  301.         a given RGB value.
  302.  
  303.    INPUTS
  304.         palette   - palette created with CreatePaletteA()
  305.         RGB       - RGB value to find a match for
  306.  
  307.    RESULTS
  308.         pen       - pen number or -1 if no pen could be found.
  309.                     (Usually this occurs when the palette is empty.)
  310.  
  311.  
  312. render.library/Chunky2BitMapA                   render.library/Chunky2BitMapA
  313.  
  314.    NAME
  315.         Chunky2BitMapA - convert chunky data to bitplanes.
  316.         Chunky2BitMap  - varargs stub for Chunky2BitMapA.
  317.  
  318.    SYNOPSIS
  319.         Chunky2BitMapA(chunky,sx,sy,width,height,bitmap,dx,dy,taglist)
  320.                        a0     d0 d1 d2    d3     a1     d4 d5 a2
  321.         
  322.         void Chunky2BitMapA(UBYTE *,UWORD,UWORD,UWORD,UWORD,
  323.                             struct BitMap *,UWORD,UWORD,struct TagItem *)
  324.         
  325.         void Chunky2BitMap(UBYTE *,UWORD,UWORD,UWORD,UWORD,
  326.                            struct BitMap *,UWORD,UWORD,tag,...,TAG_DONE) 
  327.  
  328.    FUNCTION
  329.         Converts an array of chunky bytes to the bitplanes
  330.         associated with a BitMap structure. You can specify
  331.         clip areas both inside the chunky array and the
  332.         BitMap. This function merges the data into the
  333.         destination BitMap if required. BMF_INTERLEAVED is
  334.         also handled.
  335.         
  336.         You may only process BMF_STANDARD bitmaps with this
  337.         function.
  338.  
  339.    INPUTS
  340.         chunky     - pointer to an array of chunky bytes
  341.         sx         - left edge inside the chunky array [pixels]
  342.         sy         - top edge inside the chunky array [rows]
  343.         width      - width [pixels]
  344.         height     - height [rows]
  345.         bitmap     - pointer to an initialized BitMap structure
  346.         dx         - destination left edge inside BitMap [pixels]
  347.         dy         - destination top edge inside BitMap [rows]
  348.         taglist    - pointer to an array of TagItems
  349.  
  350.    TAGS
  351.         RND_SourceWidth (UWORD) - Total width of the chunky array [pixels].
  352.                 Default - equals to the specified width.
  353.  
  354.         RND_PenTable (ULONG) - Pointer to a table of 256 UBYTEs
  355.                 for an additional conversion of the pen numbers.
  356.                 Default - NULL.
  357.  
  358.    RESULTS
  359.         none
  360.  
  361.    IMPORTANT NOTES
  362.         Starting with v39, you are not allowed to assume foreign
  363.         BitMap structures being of a planar type. You may pass a
  364.         BitMap structure to this function only if the BMF_STANDARD
  365.         flag is set.
  366.  
  367.         Also remember to set-up your own BitMap structure with the
  368.         BMF_STANDARD flag if you wish to convert it with this
  369.         function. Consider Chunky2BitMapA() being low-level. The
  370.         BitMap structure involved here is intended to hold planar
  371.         information. Since v39, this is different to what
  372.         graphics.library might associate with a BitMap structure.
  373.  
  374.         Do NOT use this function with BitMap structures that are
  375.         actually being displayed. If you wish to transfer chunky
  376.         bytes to visible areas, use graphics.library functions, such
  377.         as WriteChunkyPixels(), or WritePixelArray8(). You may also
  378.         use Chunky2BitMapA() followed by BltBitMapRastPort() etc.
  379.  
  380.         With a graphics card supplied, WriteChunkyPixels() can be
  381.         hundereds times faster than Chunky2BitMapA() followed by
  382.         BltBitMapRastPort(). If you have to provide backward
  383.         compatibility, it is worth the effort to differenciate between
  384.         Kick 2.x and OS 3.x. Use Chunky2BitMapA() in the first case,
  385.         WritePixelArray8() in the second case, and WriteChunkyPixels()
  386.         if the system runs under OS3.1 and is supplied with a graphics
  387.         card.
  388.  
  389. SEE ALSO
  390.         Planar2ChunkyA(), graphics/gfx.h,
  391.         graphics.library/WriteChunkyPixels()
  392.  
  393.  
  394. render.library/Chunky2RGBA                         render.library/Chunky2RGBA
  395.  
  396.    NAME
  397.         Chunky2RGBA - convert an array of chunky bytes to RGB data.
  398.         Chunky2RGB  - varargs stub for Chunky2RGBA.
  399.  
  400.    SYNOPSIS
  401.         success = Chunky2RGBA(chunky,width,height,rgb,palette,taglist)
  402.         d0                    a0     d0    d1     a1  a2      a3
  403.         
  404.         ULONG Chunky2RGBA(UBYTE *,UWORD,UWORD,ULONG *,APTR,struct TagItem *)
  405.         
  406.         ULONG Chunky2RGB(UBYTE *,UWORD,UWORD,ULONG *,APTR,tag,...,TAG_DONE) 
  407.  
  408.    FUNCTION
  409.         This function converts an array of chunky bytes to RGB data.
  410.  
  411.    INPUTS
  412.         chunky      - pointer to an array of chunky bytes
  413.         width       - width to be converted [pixels]
  414.         height      - height to be converted [rows]
  415.         rgb         - pointer to RGB destination buffer
  416.         palette     - pointer to a palette object created
  417.                       with CreatePaletteA()
  418.         taglist     - pointer to an array of TagItems
  419.  
  420.    TAGS
  421.         RND_SourceWidth (UWORD) - Total width of the chunky array [pixels].
  422.                 Default - equals to the specified width.
  423.  
  424.         RND_DestWidth (UWORD) - Total width of the RGB array [pixels].
  425.                 Default - equals to the specified width.
  426.  
  427.         RND_ColorMode (ULONG) - Color mode that defines how to determine
  428.                 a chunky pixel's actual color. Refer to the definitions
  429.                 in render/render.h. Default - COLORMODE_CLUT.
  430.  
  431.         RND_LeftEdge (UWORD) - Horizontal starting position inside the
  432.                 chunky array [pixels]. This is mainly intended to allow
  433.                 the conversion of HAM clip areas.
  434.                 Default - 0.
  435.  
  436.         RND_ProgressHook (ULONG) - Pointer to a callback hook
  437.                 structure for progress display operations. Refer to
  438.                 render/renderhooks.h for further information.
  439.                 Default - NULL.
  440.  
  441.    RESULTS
  442.         result  - CONV_SUCCESS to indicate that the operation
  443.                   succeeded. Currently, the only reason for this
  444.                   function to fail is CONV_CALLBACK_ABORTED.
  445.  
  446.    NOTES
  447.         - This function may call the progress callback Hook
  448.           with the PMSGTYPE_LINES_CONVERTED message type.
  449.  
  450.    SEE ALSO
  451.         render/render.h
  452.  
  453.  
  454. render.library/ConvertChunkyA                   render.library/ConvertChunkyA
  455.  
  456.    NAME
  457.         ConvertChunkyA - convert an array of chunky bytes to a new palette.
  458.         ConvertChunky  - varargs stub for ConvertChunkyA.
  459.  
  460.    SYNOPSIS
  461.         ConvertChunkyA(source,sourcepalette,width,height,dest,        
  462.                        a0     a1            d0    d1     a2   
  463.                        destpalette,taglist)
  464.                        a3          a4
  465.         
  466.         void ConvertChunkyA(UBYTE *,APTR,UWORD,UWORD,UBYTE *,
  467.                             APTR,struct TagItem *)
  468.         
  469.         void ConvertChunky(UBYTE *,APTR,UWORD,UWORD,UBYTE *,
  470.                            APTR,tag,...,TAG_DONE)
  471.  
  472.    FUNCTION
  473.         This function converts a source array of chunky bytes
  474.         to another array, and adapts it to a new palette.
  475.         Optionally, a secondary pen conversion is performed.
  476.  
  477.    INPUTS
  478.         source        - pointer to the source array of chunky data
  479.         sourcepalette - pointer to the source array's palette
  480.         width         - width to be converted [pixels]
  481.         height        - height to be converted [rows]
  482.         dest          - pointer to the destination chunky array
  483.         destpalette   - pointer to the destination array's palette
  484.         taglist       - pointer to an array of TagItems
  485.  
  486.    TAGS
  487.         RND_SourceWidth (UWORD) - Total width of source array [pixels].
  488.                 Default - equals to the width specified.
  489.  
  490.         RND_DestWidth (UWORD) - Total width of dest array [pixels].
  491.                 Default - equals to the width specified.
  492.  
  493.         RND_PenTable (ULONG) - Pointer to a table of 256 UBYTEs
  494.                 for a secondary conversion of the pen numbers.
  495.                 Default - NULL. 
  496.         
  497.    RESULTS
  498.         none
  499.         
  500.    SEE ALSO
  501.         CreatePenTableA(), CreatePaletteA()
  502.  
  503.  
  504. render.library/CreateHistogramA               render.library/CreateHistogramA
  505.  
  506.    NAME
  507.         CreateHistogramA - create and set up a histogram.
  508.         CreateHistogram  - varargs stub for CreateHistogramA.
  509.  
  510.    SYNOPSIS
  511.         hst = CreateHistogramA(taglist)
  512.         d0                     a1
  513.         
  514.         APTR CreateHistogramA(struct TagItem *)
  515.         
  516.         APTR CreateHistogram(tag,...,TAG_DONE)
  517.  
  518.    FUNCTION
  519.         Allocates and initializes a histogram.
  520.  
  521.    INPUTS
  522.         taglist - pointer to an array of TagItems
  523.  
  524.    TAGS
  525.         RND_RMHandler (ULONG) - pointer to a render-memhandler
  526.                 created with CreateRMHandlerA().
  527.                 Default - NULL.
  528.  
  529.         RND_HSType (UWORD) - Type of histogram. Refer to
  530.                 render/render.h for the available types.
  531.                 Default - HSTYPE_15BIT_TURBO.
  532.  
  533.    RESULTS
  534.         histogram - pointer to a histogram ready for usage,
  535.                     or NULL if something went wrong.
  536.  
  537.    SEE ALSO
  538.         DeleteHistogram(), QueryHistogram(), render/render.h
  539.  
  540.  
  541. render.library/CountRGB                               render.library/CountRGB
  542.  
  543.    NAME
  544.         CountRGB     - count a RGB value in a histogram.
  545.  
  546.    SYNOPSIS
  547.         count = CountRGB(histogram,RGB)
  548.         d0               a0        d0
  549.         
  550.         ULONG CountRGB(APTR,ULONG)
  551.  
  552.    FUNCTION
  553.         Counts the number of occurances for a particular RGB value.
  554.         The result may depend on the histogram's accuracy.
  555.  
  556.    INPUTS
  557.         histogram - pointer to a histogram
  558.  
  559.    RESULTS
  560.         count     - number of representations for the
  561.                     specified RGB value.
  562.  
  563.    NOTE
  564.         You only get the exact result for 24bit histograms. The
  565.         lower the resolution, the more colors are actually put
  566.         together into one `category' of similar colors. A 24bit
  567.         histogram differenciates 16,7 million colors, a 15bit
  568.         histogram, for instance, only 32768.
  569.  
  570.  
  571. render.library/CreatePaletteA                   render.library/CreatePaletteA
  572.  
  573.    NAME
  574.         CreatePaletteA - create a palette.
  575.         CreatePalette  - vararg stub for CreatePaletteA.
  576.  
  577.    SYNOPSIS
  578.         palette = CreatePaletteA(taglist)
  579.         d0                       a1
  580.         
  581.         APTR CreatePaletteA(struct TagItem *)
  582.         
  583.         APTR CreatePalette(tag,...,TAG_DONE)
  584.  
  585.    FUNCTION
  586.         This function creates and initializes a palette
  587.         that can hold up to 256 color entries.
  588.  
  589.    INPUTS
  590.         taglist     - pointer to an array of TagItems
  591.  
  592.    TAGS
  593.         RND_HSType (ULONG) - the palette's resolution. Palette adaption
  594.                 accuracy and memory consumption depend on this constant.
  595.                 A palette's resolution is specified analogously to a
  596.                 histogram's resolution. Valid types are in the range
  597.                 from 12 to 18 bit. Default - HSTYPE_15BIT.
  598.  
  599.         RND_RMHandler (ULONG) - pointer to a render-memhandler that was
  600.                 created with CreateRMHandler(). Default - NULL.
  601.         
  602.    RESULTS
  603.         palette  - a palette ready for usage,
  604.                    or NULL if something went wrong.
  605.  
  606.    SEE ALSO
  607.         DeletePalette(), ImportPaletteA(), ExportPaletteA(), 
  608.         ExtractPaletteA(), FlushPalette(), render/render.h
  609.  
  610.  
  611. render.library/CreatePenTableA                 render.library/CreatePenTableA
  612.  
  613.    NAME
  614.         CreatePenTableA - create a pen conversion table.
  615.         CreatePenTable  - varargs stub for CreatePenTableA.
  616.  
  617.    SYNOPSIS
  618.         CreatePenTableA(chunky,oldpalette,width,height,newpalette,
  619.                         a0     a1         d0    d1     a2
  620.                         pentab,taglist)
  621.                         a3     a4
  622.         
  623.         void CreatePenTableA(UBYTE *,APTR,UWORD,UWORD,APTR,
  624.                              UBYTE *,struct TagItem *)
  625.         
  626.         void CreatePenTable(UBYTE *,APTR,UWORD,UWORD,APTR,
  627.                             UBYTE *,tag,...,TAG_DONE)
  628.  
  629.    FUNCTION
  630.         This function creates a table for the conversion of a
  631.         particular array of chunky bytes. It scans through the
  632.         chunky array, adapts the found palette entries to a new
  633.         palette, and generates an output table of 256 UBYTEs.
  634.         
  635.         This function is equivalent to ConvertChunkyA(), except
  636.         for that it does not actually convert the chunky image,
  637.         but instead creates the conversion table for that palette
  638.         adaption.
  639.  
  640.    INPUTS
  641.         chunky      - pointer to an array of chunky bytes
  642.         oldpalette  - pointer to the original palette
  643.         width       - width to be converted [pixels]
  644.         height      - height to be converted [rows]
  645.         newpalette  - pointer to a palette to be adapted to
  646.         pentab      - pointer to the destination table
  647.         taglist     - pointer to an array of TagItems
  648.  
  649.    TAGS
  650.         RND_SourceWidth (UWORD) - Total width of the chunky array [pixels].
  651.                 Default - equals to the specified width.
  652.  
  653.         RND_PenTable (ULONG) - Pointer to a table of 256 UBYTEs
  654.                 for a secondary conversion of the pen numbers.
  655.                 Default - NULL.
  656.         
  657.    RESULTS
  658.         none
  659.         
  660.    NOTES
  661.         The destination table is assumed to have 256 entries,
  662.         with no respect to what color indices actually occur in
  663.         the chunky image.
  664.  
  665.    SEE ALSO
  666.         ConvertChunkyA(), CreatePaletteA()
  667.  
  668.  
  669. render.library/CreateRMHandlerA               render.library/CreateRMHandlerA
  670.  
  671.    NAME
  672.         CreateRMHandlerA - Create and set up a memory handler.
  673.         CreateRMHandler  - varargs stub for CreateRMHandlerA.
  674.  
  675.    SYNOPSIS
  676.         rmh = CreateRMHandlerA(taglist)
  677.         d0                     a1
  678.         
  679.         APTR CreateRMHandlerA(struct TagItem *)
  680.         
  681.         APTR CreateRMHandler(tag,...,TAG_DONE)
  682.  
  683.    FUNCTION
  684.         This function allocates and initializes a render-memhandler.
  685.         This is a custom memory resource manager for histograms,
  686.         rendering, and many other operations. You may use a
  687.         render-memhandler for your own purposes, too.
  688.  
  689.         A render-memhandler helps to avoid memory fragmentation as
  690.         well as extreme stressing of the system's public memory lists.
  691.         Private memory management is supported as well as v39 exec
  692.         pools and common public memory. Future versions might provide
  693.         more types of memory management.
  694.  
  695.    INPUTS
  696.         taglist - pointer to an array of TagItems
  697.  
  698.    TAGS
  699.         RND_MemType (UWORD) - type of memory management.
  700.                 Valid types are defined in render/render.h.
  701.                 Default - RMHTYPE_PUBLIC.
  702.  
  703.         RND_MemBlock (ULONG) - pointer to a block of memory
  704.                 used for private memory management. This tag
  705.                 is obligatory if you specify RMHTYPE_PRIVATE
  706.                 and is ignored otherwise. 
  707.                 Default - none.
  708.  
  709.         RND_MemSize (ULONG) - size of the memory block used
  710.                 for private memory management. This tag is
  711.                 obligatory if you specify RMHTYPE_PRIVATE
  712.                 and is ignored otherwise. 
  713.                 Default - none.
  714.  
  715.         RND_MemFlags (ULONG) - memory flags, as defined in
  716.                 exec/memory.h. These are ignored for
  717.                 RMHTYPE_PRIVATE. Default - MEMF_ANY.
  718.  
  719.    RESULTS
  720.         rmh - a render-memhandler ready for usage, or NULL if
  721.               something went wrong.
  722.  
  723.    NOTES
  724.         You must check for the presence of exec v39 before
  725.         you create a memhandler with RMHTYPE_POOL specified.
  726.  
  727.    SEE ALSO
  728.         AllocRenderMem(), AllocRenderVec(), DeleteRMHandler(),
  729.         exec.library/CreatePool(), render/render.h, exec/memory.h
  730.  
  731.  
  732. render.library/CreateScaleEngineA           render.library/CreateScaleEngineA
  733.  
  734.    NAME
  735.         CreateScaleEngineA - Create a scaling-engine.
  736.         CreateScaleEngine  - varargs stub for CreateScaleEngineA.
  737.  
  738.    SYNOPSIS
  739.         scaleengine = CreateScaleEngineA(sourcewidth,sourceheight,
  740.         d0                               d0          d1           
  741.                                          destwidth,destheight,taglist)
  742.                                          d2        d3         a1
  743.         
  744.         APTR CreateScaleEngineA(UWORD,UWORD,UWORD,
  745.                                 UWORD,struct TagItem *)
  746.         
  747.         APTR CreateScaleEngine(UWORD,UWORD,UWORD,
  748.                                UWORD,tag,...,TAG_DONE)
  749.  
  750.    FUNCTION
  751.         Allocates and initializes a scaling-engine for a specific
  752.         set of scaling parameters. Once set up, this scaling-engine
  753.         is highly optimized for these particular parameter
  754.         specifications.
  755.  
  756.    INPUTS
  757.         sourcewidth  - source width [pixels]
  758.         sourceheight - source height [rows]
  759.         destwidth    - destination width [pixels]
  760.         destheight   - destination height [rows]
  761.         taglist      - pointer to an array of tag items
  762.  
  763.    TAGS
  764.         RND_RMHandler (ULONG) - pointer to a render-memhandler,
  765.                 such as created with CreateRMHandlerA().
  766.                 Default - NULL.
  767.  
  768.         RND_PixelFormat (ULONG) - Type of data to process.
  769.                 Currently defined are PIXFMT_CHUNKY_CLUT
  770.                 and PIXFMT_0RGB_32.
  771.                 Default - PIXFMT_CHUNKY_CLUT.
  772.  
  773.    RESULTS
  774.         engine - a scaling-engine ready for usage, or NULL
  775.                  if something went wrong.
  776.  
  777.    SEE ALSO
  778.         DeleteScaleEngine(), ScaleA()
  779.  
  780.  
  781. render.library/DeleteHistogram                 render.library/DeleteHistogram
  782.  
  783.    NAME
  784.         DeleteHistogram - dispose a histogram.
  785.  
  786.    SYNOPSIS
  787.         DeleteHistogram(histogram)
  788.                         a0
  789.  
  790.         void DeleteHistogram(APTR)
  791.  
  792.    FUNCTION
  793.         Removes a histogram and frees all associated memory.
  794.  
  795.    INPUTS
  796.         histogram   - pointer to a histogram
  797.  
  798.    RESULTS
  799.         none
  800.  
  801.  
  802. render.library/DeleteRMHandler                 render.library/DeleteRMHandler
  803.  
  804.    NAME
  805.         DeleteRMHandler - free a render-memhandler.
  806.  
  807.    SYNOPSIS
  808.         DeleteRMHandler(rendermemhandler)
  809.                         a0
  810.  
  811.         void DeleteRMHandler(APTR)
  812.  
  813.    FUNCTION
  814.         DeleteRMHandler() will remove and free a previously created
  815.         render-memhandler. That does not imply that any outstanding
  816.         memory will be returned to the system or to whatever memory
  817.         ressources. You are responsible for freeing each memory block
  818.         that you have allocated from a render-memhandler.
  819.  
  820.    INPUTS
  821.         render-memhandler - a render-memhandler to be deleted.
  822.  
  823.    RESULTS
  824.         none
  825.  
  826.    NOTES
  827.         You are not allowed to call DeleteRMHandler() before
  828.         every single byte has been returned to the memhandler.
  829.  
  830.    SEE ALSO
  831.         CreateRMHandlerA()
  832.  
  833.  
  834. render.library/DeletePalette                     render.library/DeletePalette
  835.  
  836.    NAME
  837.         DeletePalette - dispose a palette.
  838.  
  839.    SYNOPSIS
  840.         DeletePalette(palette)
  841.                       a0
  842.  
  843.         void DeletePalette(APTR)
  844.  
  845.    FUNCTION
  846.         This function deletes a palette and frees all
  847.         associated memory.
  848.  
  849.    INPUTS
  850.         palette   - pointer to a palette, such as created
  851.                     with CreatePaletteA()
  852.  
  853.    RESULTS
  854.         none
  855.  
  856.    SEE ALSO
  857.         CreatePaletteA(), FlushPalette()
  858.  
  859.  
  860. render.library/DeleteScaleEngine             render.library/DeleteScaleEngine
  861.  
  862.    NAME
  863.         DeleteScaleEngine - dispose a scaling-engine.
  864.  
  865.    SYNOPSIS
  866.         DeleteScaleEngine(engine)
  867.                           a0
  868.  
  869.         void DeleteScaleEngine(APTR)
  870.  
  871.    FUNCTION
  872.         Deletes a scaling-engine and frees all associated memory.
  873.  
  874.    INPUTS
  875.         engine   - a scaling-engine to be removed
  876.  
  877.    RESULTS
  878.         none
  879.  
  880.    SEE ALSO
  881.         CreateScaleEngineA(), ScaleA()
  882.  
  883.  
  884. render.library/ExportPaletteA                   render.library/ExportPaletteA
  885.  
  886.    NAME
  887.         ExportPaletteA - export a palette.
  888.         ExportPalette  - varargs stub for ExportPaletteA.
  889.  
  890.    SYNOPSIS
  891.         ExportPaletteA(palette,buffer,taglist)
  892.                        a0      a1     a2
  893.         
  894.         ExportPaletteA(APTR,APTR,struct TagItem *)
  895.         
  896.         ExportPalette(APTR,APTR,tag,...,TAG_DONE)
  897.  
  898.    FUNCTION
  899.         This function exports a palette (or a part of it)
  900.         to a colortable.
  901.  
  902.    INPUTS
  903.         palette   - pointer to a palette created
  904.                     with CreatePaletteA()
  905.         buffer    - pointer to a destination buffer
  906.         taglist   - pointer to an array of tag items
  907.  
  908.    TAGS
  909.         RND_PaletteFormat (ULONG) - format of the color table
  910.                 to be created. Refer to render/render.h for
  911.                 the available types. Default - PALFMT_RGB8.
  912.  
  913.         RND_FirstColor (ULONG) - first color entry to export.
  914.                 Default - 0.
  915.         
  916.         RND_NumColors (ULONG) - number of colors to export.
  917.                 Default - the number of colors inside the palette.
  918.  
  919.    RESULTS
  920.         none
  921.  
  922.    SEE ALSO
  923.         CreatePaletteA(), ImportPaletteA()
  924.  
  925.  
  926. render.library/ExtractPaletteA                 render.library/ExtractPaletteA
  927.  
  928.    NAME
  929.         ExtractPaletteA - extract a palette from a histogram.
  930.         ExtractPalette  - varargs stub for ExtractPaletteA.
  931.  
  932.    SYNOPSIS
  933.         success = ExtractPaletteA(histogram,palette,numcolors,taglist)
  934.         d0                        a0        a1      d0        a2
  935.         
  936.         ULONG ExtractPaletteA(APTR,ULONG *,UWORD,struct TagItem *)
  937.         
  938.         ULONG ExtractPalettA(APTR,ULONG *,UWORD,tag,...,TAG_DONE)
  939.  
  940.    FUNCTION
  941.         This function extracts a given number of colors from a
  942.         histogram. This results in a color lookup table (also called
  943.         a palette).
  944.  
  945.    INPUTS
  946.         histogram - pointer to a histogram
  947.         palette   - pointer to a palette created
  948.                     with CreatePaletteA()
  949.         numcolors - number of entries to extract
  950.         taglist   - pointer to an array of TagItems
  951.  
  952.    TAGS
  953.         RND_RMHandler (ULONG) - Custom memory handler created with
  954.                 CreateRMHandlerA(). This is used to handle intermediate
  955.                 buffers during quantization.
  956.                 Default - The histogram's memory handler.
  957.  
  958.         RND_ProgressHook (ULONG) - Pointer to a callback hook
  959.                 structure for progress display operations. Refer to
  960.                 render/renderhooks.h for further information.
  961.                 Default - NULL.
  962.  
  963.         RND_RGBWeight (ULONG) - R/G/B quantization factors.
  964.                 They form a relative measurement between the R/G/B
  965.                 components, defining what color components should be
  966.                 preferred when the histogram gets decomposed.
  967.                 Default - 0x010101 (all components are treat equally).
  968.  
  969.         RND_ColorMode (ULONG) - Color mode that defines how to determine
  970.                 a chunky pixel's actual color. Currently this tag
  971.                 should be specified if you extract a palette for the use
  972.                 with a HAM6 image. Default - COLORMODE_CLUT.
  973.  
  974.         RND_FirstColor (ULONG) - first color entry inside the palette
  975.                 that will be used for the extracted colors. See also
  976.                 ImportPaletteA() for further details. Default - 0.
  977.  
  978.         RND_NewPalette (ULONG) - if set to TRUE, this flag indicates
  979.                 that you want to dispose the current palette and
  980.                 create a new one. If set to FALSE, the new color entries
  981.                 are merged to the existing palette. Default - TRUE.
  982.  
  983.    RESULTS
  984.         result  - returncode to indicate whether the operation
  985.                   succeeded. You must at least check for
  986.                   EXTP_SUCCESS.
  987.  
  988.    NOTES
  989.         - This function may call the progress callback Hook
  990.           with the PMSGTYPE_COLORS_CHOSEN message type.
  991.  
  992.    SEE ALSO
  993.         CreateHistogramA(), CreatePaletteA(), ImportPaletteA(),
  994.         render/render.h, render/renderhooks.h
  995.  
  996.  
  997. render.library/FlushPalette                       render.library/FlushPalette
  998.  
  999.    NAME
  1000.         FlushPalette - flush all buffers from a palette.
  1001.  
  1002.    SYNOPSIS
  1003.         FlushPalette(palette)
  1004.                      a0
  1005.  
  1006.         void FlushPalette(APTR)
  1007.  
  1008.    FUNCTION
  1009.         This function flushes all buffers that might be
  1010.         associated with a palette.
  1011.  
  1012.    INPUTS
  1013.         palette   - pointer to a palette that was
  1014.                     created with CreatePaletteA()
  1015.  
  1016.    RESULTS
  1017.         none
  1018.  
  1019.    SEE ALSO
  1020.         DeletePaletteA()
  1021.  
  1022.  
  1023. render.library/FreeRenderMem                     render.library/FreeRenderMem
  1024.  
  1025.    NAME
  1026.         FreeRenderMem - return memory to a render-memhandler.
  1027.  
  1028.    SYNOPSIS
  1029.         FreeRenderMem(rendermemhandler,mem,size)
  1030.                       a0               a1  d0
  1031.  
  1032.         void FreeRenderMem(APTR,APTR,ULONG)
  1033.  
  1034.    FUNCTION
  1035.         Free a block of memory that was previously
  1036.         allocated with AllocRenderMem().
  1037.  
  1038.    INPUTS
  1039.         rendermemhandler - pointer to the render-memhandler you have
  1040.                            allocated the memory from
  1041.         mem              - pointer to the memory block to be returned
  1042.         size             - size of that memory block [bytes]
  1043.  
  1044.    RESULTS
  1045.         NONE
  1046.  
  1047.    SEE ALSO
  1048.         AllocRenderMem(), DeleteRMHandler()
  1049.  
  1050.  
  1051. render.library/FreeRenderVec                     render.library/FreeRenderVec
  1052.  
  1053.    NAME
  1054.         FreeRenderVec - return memory to a render-memhandler.
  1055.  
  1056.    SYNOPSIS
  1057.         FreeRenderVec(mem)
  1058.                       a0
  1059.  
  1060.         void FreeRenderVec(APTR)
  1061.  
  1062.    FUNCTION
  1063.         Free a block of memory that was previously
  1064.         allocated with AllocRenderVec().
  1065.  
  1066.    INPUTS
  1067.         mem - pointer to a memory block
  1068.               to be returned to its render-memhandler
  1069.  
  1070.    RESULTS
  1071.         NONE
  1072.  
  1073.    SEE ALSO
  1074.         AllocRenderVec(), DeleteRMHandler()
  1075.  
  1076.  
  1077. render.library/ImportPaletteA                   render.library/ImportPaletteA
  1078.  
  1079.    NAME
  1080.         ImportPaletteA - import a palette.
  1081.         ImportPalette  - varargs stub for ImportPaletteA.
  1082.  
  1083.    SYNOPSIS
  1084.         ImportPaletteA(palette,table,entries,taglist)
  1085.                        a0      a1    d0      a2
  1086.         
  1087.         ImportPaletteA(APTR,APTR,UWORD,struct TagItem *)
  1088.         
  1089.         ImportPalette(APTR,APTR,UWORD,tag,...,TAG_DONE)
  1090.         
  1091.    FUNCTION
  1092.         This function imports entries from a color table to
  1093.         a palette. You are allowed to import multiple times.
  1094.         When doing so, entries will be overwritten (not inserted).
  1095.         The palette automatically grows to the required number of
  1096.         entries. Remember to neither import more than 256 entries
  1097.         nor beyond the 256th entry.
  1098.  
  1099.    INPUTS
  1100.         palette   - pointer to a palette created
  1101.                     with CreatePaletteA()
  1102.         table     - pointer to the source color table
  1103.         entries   - number of color entries to import
  1104.         taglist   - pointer to an array of tag items
  1105.  
  1106.    TAGS
  1107.         RND_PaletteFormat (ULONG) - format of the color table
  1108.                 to be imported. Refer to render/render.h for
  1109.                 the available types. Default - PALFMT_RGB8.
  1110.  
  1111.         RND_FirstColor (ULONG) - first destination color entry
  1112.                 to import to. Default - 0.
  1113.  
  1114.         RND_EHBPalette (ULONG) - tag to indicate whether the
  1115.                 palette should be interpreted as for an
  1116.                 Extra-Halfbrite picture. Default - FALSE.
  1117.  
  1118.         RND_NewPalette (ULONG) - if set to TRUE, this flag indicates
  1119.                 that you want to dispose the current palette and
  1120.                 import a new one. If set to FALSE, the palette is
  1121.                 merged. Default - TRUE.
  1122.  
  1123.    RESULTS
  1124.         none
  1125.  
  1126.    SEE ALSO
  1127.         CreatePaletteA(), ExportPaletteA(), render/render.h
  1128.  
  1129.  
  1130. render.library/Planar2ChunkyA                   render.library/Planar2ChunkyA
  1131.  
  1132.    NAME
  1133.         Planar2ChunkyA - convert bitplane data to chunky bytes.
  1134.         Planar2Chunky  - varargs stub for Planar2ChunkyA.
  1135.  
  1136.    SYNOPSIS
  1137.         Planar2ChunkyA(planetab,bytewidth,rows,depth,bytesperrow,
  1138.                        a0       d0        d1   d2    d3
  1139.                        chunkybuffer,taglist)
  1140.                        a1           a2
  1141.  
  1142.         void Planar2ChunkyA(PLANEPTR *,UWORD,UWORD,UWORD,UWORD,
  1143.                             UBYTE *,struct TagItem *)
  1144.         
  1145.         void Planar2Chunky(PLANEPTR *,UWORD,UWORD,UWORD,UWORD
  1146.                             UBYTE *,tag,...,TAG_DONE)
  1147.  
  1148.    FUNCTION
  1149.         Converts raw bitplane-oriented (planar) graphics to an array
  1150.         of chunky bytes.
  1151.  
  1152.    INPUTS
  1153.         planetab    - pointer to a table of planepointers
  1154.         bytewidth   - width [bytes]. This must be an even number.
  1155.         rows        - height [rows]
  1156.         depth       - number of bitplanes
  1157.         bytesperrow - total bytes per row in the source bitplanes.
  1158.                       This must be an even number. If you convert
  1159.                       interleaved bitplanes, multiply by depth.
  1160.         chunky      - pointer to the destination chunky buffer
  1161.         taglist     - pointer to an array of TagItems
  1162.  
  1163.    TAGS
  1164.         RND_DestWidth (UWORD) - Total width of chunky array [pixels].
  1165.                 Default - equals to bytewidth * 8.
  1166.  
  1167.                 You are explicitely allowed to use a destwidth that is
  1168.                 smaller than bytewidth * 8 pixels.
  1169.                 
  1170.                 Important note:
  1171.                 If you specify this tag, you must _still_ supply a
  1172.                 chunky buffer of at least bytewidth * 8 * rows bytes.
  1173.  
  1174.    NOTES
  1175.         Starting with v39, you are not allowed to assume foreign BitMap
  1176.         structures being of a planar type.  Before you grab a table of
  1177.         planepointers out of an unknown BitMap structure and pass it to
  1178.         this function, you have to check for the presence of the
  1179.         BMF_STANDARD flag.
  1180.  
  1181.    RESULTS
  1182.         none
  1183.  
  1184.    SEE ALSO
  1185.         Chunky2BitMapA(), graphics/gfx.h
  1186.  
  1187.  
  1188. render.library/QueryHistogram                   render.library/QueryHistogram
  1189.  
  1190.    NAME
  1191.         QueryHistogram - query a histogram parameter.
  1192.  
  1193.    SYNOPSIS
  1194.         value = QueryHistogram(histogram,tag)
  1195.         d0                     a0        d0
  1196.         
  1197.         ULONG QueryHistogram(APTR,Tag)
  1198.  
  1199.    FUNCTION
  1200.         Query one of a histogram's specifications
  1201.         via Tag parameter.
  1202.  
  1203.    INPUTS
  1204.         histogram - pointer to a histogram
  1205.         tag       - Tag to be queried
  1206.  
  1207.    TAGS
  1208.         RND_NumColors (ULONG) -
  1209.                 the number of different colors inside the histogram.
  1210.  
  1211.         RND_NumPixels (ULONG) -
  1212.                 the number of pixels that have been added to the
  1213.                 histogram.
  1214.  
  1215.         RND_RMHandler (ULONG) -
  1216.                 the histogram's render-memhandler.
  1217.  
  1218.         RND_HSType (UWORD) -
  1219.                 the histogram's type.
  1220.  
  1221.    RESULTS
  1222.         value    - the queried parameter.
  1223.  
  1224.    SEE ALSO
  1225.         CreateHistogramA()
  1226.  
  1227.  
  1228. render.library/RenderA                                 render.library/RenderA
  1229.  
  1230.    NAME
  1231.         RenderA - render an array of RGB data to chunky bytes.
  1232.         Render  - varargs stub for RenderA.
  1233.  
  1234.    SYNOPSIS
  1235.         success = RenderA(rgb,width,height,chunky,palette,taglist)
  1236.         d0                a0  d0    d1     a1     a2      a3
  1237.         
  1238.         ULONG RenderA(ULONG *,UWORD,UWORD,UBYTE *,APTR,struct TagItem *)
  1239.         
  1240.         ULONG Render(ULONG *,UWORD,UWORD,UBYTE *,APTR,tag,...,TAG_DONE)
  1241.  
  1242.    FUNCTION
  1243.         Render an array of RGB data to an array of chunky bytes.
  1244.  
  1245.    INPUTS
  1246.         rgb         - pointer to an array of RGB pixels
  1247.         width       - width to be converted [pixels]
  1248.         height      - height to be converted [rows]
  1249.         chunky      - pointer to the destination array
  1250.         palette     - pointer to a palette to be rendered to
  1251.         taglist     - pointer to an array of TagItems
  1252.  
  1253.    TAGS
  1254.         RND_SourceWidth (UWORD) - Total width of the RGB array [pixels].
  1255.                 Default - equals to the specified width.
  1256.  
  1257.         RND_DestWidth (UWORD) - Total width of the chunky array [pixels].
  1258.                 Default - equals to the specified width.
  1259.  
  1260.         RND_ColorMode (ULONG) - Color mode that defines how to determine
  1261.                 a chunky pixel's actual color. Refer to the definitions
  1262.                 in render/render.h. Default - COLORMODE_CLUT.
  1263.  
  1264.         RND_DitherMode (UWORD) - Error diffusion mode.
  1265.                 Refer to the definitions in render/render.h.
  1266.                 Default - DITHERMODE_NONE.
  1267.  
  1268.         RND_ProgressHook (ULONG) - Pointer to a callback hook
  1269.                 structure for progress display operations. Refer to
  1270.                 render/renderhooks.h for further information.
  1271.                 Default - NULL.
  1272.  
  1273.         RND_OffsetColorZero (UWORD) - First color index to appear
  1274.                 in the rendered chunky image. This offset will be
  1275.                 added to the palette's indices. Default - 0.
  1276.  
  1277.    RESULTS
  1278.         result  - returncode to indicate whether the operation
  1279.                   succeeded. You must at least check for
  1280.                   REND_SUCCESS.
  1281.  
  1282.    NOTES
  1283.         - This function may call the progress callback Hook with
  1284.           the PMSGTYPE_LINES_RENDERED message type.
  1285.  
  1286.    SEE ALSO
  1287.         render/render.h, render/renderhooks.h
  1288.  
  1289.  
  1290. render.library/ScaleA                                   render.library/ScaleA
  1291.  
  1292.    NAME
  1293.         ScaleA - scale an image.
  1294.         Scale  - varargs stub for ScaleA.
  1295.  
  1296.    SYNOPSIS
  1297.         ScaleA(engine,source,dest,taglist)
  1298.                a0     a1     a2   a3
  1299.         
  1300.         void ScaleA(APTR,APTR,APTR,struct TagItem *)
  1301.         
  1302.         void Scale(APTR,APTR,APTR,tag,...,TAG_DONE)
  1303.  
  1304.    FUNCTION
  1305.         Scales a source array of pixels to another array.
  1306.  
  1307.    INPUTS
  1308.         engine  - pointer to a scaling-engine created
  1309.                   with CreateScaleEngineA()
  1310.         source  - pointer to source array of pixels
  1311.         dest    - pointer to destination array
  1312.         taglist - pointer to an array of TagItems
  1313.  
  1314.    TAGS
  1315.         RND_SourceWidth (UWORD) - Total width of the source array [pixels].
  1316.                 Default - equals to the source width the scaling-engine
  1317.                           was created with.
  1318.  
  1319.         RND_DestWidth (UWORD) - Total width of the dest array [pixels].
  1320.                 Default - equals to the destination width the
  1321.                           scaling-engine was created with.
  1322.    RESULTS
  1323.         none
  1324.  
  1325.    SEE ALSO
  1326.         CreateScaleEngineA()
  1327.  
  1328.  
  1329. render.library/ScaleOrdinate                     render.library/ScaleOrdinate
  1330.  
  1331.    NAME
  1332.         ScaleOrdinate - scale a single ordinate.
  1333.  
  1334.    SYNOPSIS
  1335.         scaled_ordinate = ScaleOrdinate(start,dest,ordinate)
  1336.         d0                              d0    d1   d2
  1337.  
  1338.         UWORD ScaleOrdinate(UWORD,UWORD,UWORD)
  1339.  
  1340.    FUNCTION
  1341.         This function scales a single ordinate. The algorythm
  1342.         used here is identical to what scaling-engines are
  1343.         created with.
  1344.         
  1345.    EXAMPLE        
  1346.         Assume you have a specific pair of coordinates
  1347.         that represent a particular pixel inside an image.
  1348.         You can use this function to determine the pixel's
  1349.         new coordinates after the image has been scaled:
  1350.  
  1351.         new_pixel_x = ScaleOrdinate(picwidth,newwidth,pixel_x);
  1352.         new_pixel_y = ScaleOrdinate(picheight,newheight,pixel_y);
  1353.  
  1354.    INPUTS
  1355.         start    - original value (e.g. width or height)
  1356.                    e.g. the original width of an image.
  1357.                    This value usually corresponds to a
  1358.                    start value with CreateScaleEngineA().
  1359.                    Must not be 0.
  1360.         dest     - destination value (e.g. width or height)
  1361.                    e.g. the scaled width of an image.
  1362.                    This value usually corresponds to a
  1363.                    dest value with CreateScaleEngineA().
  1364.                    Must not be 0.
  1365.         ordinate - a single ordinate (e.g. of a pixel).
  1366.                    Must be less than <start>.
  1367.  
  1368.    RESULTS
  1369.         scaled_ordinate - the new ordinate (after scaling)
  1370.         
  1371.    SEE ALSO
  1372.         CreateScaleEngineA()
  1373.  
  1374.  
  1375. render.library/SortPaletteA                       render.library/SortPaletteA
  1376.  
  1377.    NAME
  1378.         SortPaletteA - sort a palette.
  1379.         SortPalette  - varargs stub for SortPaletteA.
  1380.  
  1381.    SYNOPSIS
  1382.         success = SortPaletteA(palette,mode,taglist)
  1383.         d0                     a0      d0   a1
  1384.         
  1385.         ULONG SortPaletteA(APTR,ULONG,struct TagItem *)
  1386.         
  1387.         ULONG SortPalette(APTR,ULONG,tag,...,TAG_DONE)
  1388.  
  1389.    FUNCTION
  1390.         Sorts a palette according to a sort mode.
  1391.         Some sort modes apply to palettes solely, some
  1392.         others additionally require a histogram.
  1393.  
  1394.    INPUTS
  1395.         palette - pointer to a palette created
  1396.                   with CreatePaletteA().
  1397.  
  1398.         mode    - sort mode. Currently defined are:
  1399.  
  1400.                   PALMODE_BRIGHTNESS      - sort the palette entries
  1401.                                 by brightness.
  1402.  
  1403.                   PALMODE_SATURATION      - sort the palette entries
  1404.                                 by their color intensity.
  1405.  
  1406.                   PALMODE_POPULARITY      - sort the palette entries
  1407.                                 by the number of pixels that they
  1408.                                 represent. You must specify the
  1409.                                 RND_Histogram taglist argument.
  1410.  
  1411.                   PALMODE_REPRESENTATION  - sort the palette entries
  1412.                                 by the number of histogram entries
  1413.                                 that they represent. You must specify
  1414.                                 the RND_Histogram taglist argument.
  1415.                   
  1416.                   PALMODE_SIGNIFICANCE    - sort the palette entries
  1417.                                 by their optical significance for the
  1418.                                 human eye. Implementation is unknown
  1419.                                 to you and may change. You must supply
  1420.                                 the RND_Histogram taglist argument.
  1421.  
  1422.                   PALMODE_ASCENDING       - by default, sort direction
  1423.                                 is descending, i.e. precedence is
  1424.                                 `more-to-less' of the given effect.
  1425.                                 Combine with this flag to invert the
  1426.                                 sort direction.
  1427.  
  1428.         taglist - pointer to an array of tagitems.
  1429.  
  1430.    TAGS
  1431.         RND_Histogram (ULONG) - pointer to a histogram. This taglist
  1432.                 argument is obligatory for some sort modes. (See above)
  1433.  
  1434.    RESULTS
  1435.         success - return value to indicate whether the operation succeeded.
  1436.                   You must at least check for SORTP_SUCCESS.
  1437.  
  1438.    SEE ALSO
  1439.         render/render.h
  1440.  
  1441.  
  1442.