Changes between Version 1 and Version 2 of UnifyingTheRenderingInterfaces

Show
Ignore:
Timestamp:
10/31/07 04:58:42 (6 years ago)
Author:
tbonfort
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UnifyingTheRenderingInterfaces

    v1 v2  
    44== Desired Functionality == 
    55=== Line Layers === 
    6  * simple 
     6 * '''simple''': straightforward case, need to pass vertexes, width, color, and optionally caps and joins 
    77  * dashed 
    8   * outlined? 
    9  * brushed 
    10   * vector 
     8  * outlined: the renderer can provide a method to draw a solid line with a one pixel outline in a single step 
     9 * '''brushed''': used essentially with a pixmap symbol as in [[BR]] [[Image(http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/linesymbolization.png)]] 
    1110  * pixmap 
    12   * truetype? 
    13  * markers 
    14   * vector 
    15   * pixmap 
    16   * truetype 
    17   * ellipse 
     11  * vector,truetype : investigate if this should be supported. very probably have to be transformed to a pixmap before being used internally by the renderer. 
     12 * '''markers''' : different strategies can be used here 
     13  * naive: mapserver computes marker positions and orientations, and for each computed point calls the renderer's appropriate marker function 
     14  * optimisation: mapserver passes a list of points and orientations to the renderer, and all the markers are rendered in one pass 
     15  * optional: the renderer provides a method for automatically calculating marker locations (see [http://thread.gmane.org/gmane.comp.graphics.agg/3772 this thread] for a discussion of this feature with AGG) 
    1816 
    1917=== Point Layers === 
     18should be pretty straightforward. must probably expose a way for the renderer to cache an internal representation of the symbol if needed. 
    2019 * vector 
    2120 * pixmap 
     
    2423 
    2524=== Polygon and Circle Layers === 
    26  * simple 
    27   * outlined? 
    28  * hatched 
    29  * tiled 
     25 * '''simple''': straightforward, provide vertexes and color 
     26  * outlined: same question as line shapes, provide a way to draw an outlined shape in a single step 
     27 * '''hatched''' 
     28 * '''tiled''' 
    3029  * vector 
    3130  * ellipse 
     
    3433 
    3534=== Labelling === 
    36  * simple 
    37  * follow 
    38  * compute size before rendering 
     35 * '''font caching''': gd has a global font cache, accessed through a mutex. AGG currently attaches the font cache to its imageObj. 
     36 * '''encoding''': gd tries to automatically detect encoding. options can either be to pass on the encoding to the renderer, or always convert to utf8 for example. 
     37 * '''simple''': straighforward once caching has been solved/decided 
     38 * '''follow''': font rendering function is called once per character. could be optimized by passing the whole string and a list of positions/angles. 
     39 * '''bounding box''' : used by the labelcache to determine which labels can/will be drawn. With gd this is easy as the font cache is global. For other renderers, the font cache could be tied to the fontset object. 
     40 
     41=== Raster Layers === 
     42A possible solution to avoid function call overhead while allowing the raster functions to set single pixel values could be for the renderers to expose an inlined setPixel (and getPixel?) function, probably without any bounds checking for performance. for example 
     43{{{ 
     44inline void setPixelAGG(imageObj *im, int x, int y, int r, int g, int b, int a) { 
     45 im->buffer[x][y]=AGGPixelMacro(r,g,b,a); 
     46} 
     47}}} 
     48and then use a vtable approach to connect that to a generic setPixel function. 
     49 
     50== I/O and Pixel Formats == 
     51All I/O is currently done with gd (or not: geotiff,etc) 
     52=== pixmap input === 
     53 * have gd load pixmaps, and let the renderer convert and cache on first access 
     54or 
     55 * let the renderer provide a pixmap loading function 
     56=== image output === 
     57 * the renderer converts its internal image representation to a gdimage and let gd do the saving 
     58or 
     59 * have the renderer provide saving functions directly (i.e. call directly libpng/libjpeg/...)