Changes between Version 1 and Version 2 of UnifyingTheRenderingInterfaces
- Timestamp:
- Oct 31, 2007, 4:58:42 AM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UnifyingTheRenderingInterfaces
v1 v2 4 4 == Desired Functionality == 5 5 === Line Layers === 6 * simple6 * '''simple''': straightforward case, need to pass vertexes, width, color, and optionally caps and joins 7 7 * 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)]] 11 10 * 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) 18 16 19 17 === Point Layers === 18 should be pretty straightforward. must probably expose a way for the renderer to cache an internal representation of the symbol if needed. 20 19 * vector 21 20 * pixmap … … 24 23 25 24 === Polygon and Circle Layers === 26 * simple27 * outlined ?28 * hatched29 * tiled25 * '''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''' 30 29 * vector 31 30 * ellipse … … 34 33 35 34 === 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 === 42 A 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 {{{ 44 inline 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 }}} 48 and then use a vtable approach to connect that to a generic setPixel function. 49 50 == I/O and Pixel Formats == 51 All 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 54 or 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 58 or 59 * have the renderer provide saving functions directly (i.e. call directly libpng/libjpeg/...)