Changes between Version 2 and Version 3 of UnifyingTheRenderingInterfaces


Ignore:
Timestamp:
Nov 9, 2007, 3:45:08 AM (17 years ago)
Author:
tbonfort
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UnifyingTheRenderingInterfaces

    v2 v3  
    66 * '''simple''': straightforward case, need to pass vertexes, width, color, and optionally caps and joins
    77  * dashed
    8   * outlined: the renderer can provide a method to draw a solid line with a one pixel outline in a single step
     8  * outlined: the renderer can provide a method to draw a solid line with a one pixel outline in a single step. Not very usefull for lines as in that case the ouline is drawn first, and the inside is cached for later processing so as to provide ''nice'' intersections.
     9
     10{{{
     11void renderSimpleLine(imageObj *image, shapeObj *thePoints, int/double width, colorObj *color, int* dashstyle, int dashstylelength,
     12                          some_struct *capsandjoins)
     13}}}
    914 * '''brushed''': used essentially with a pixmap symbol as in [[BR]] [[Image(http://mapserver.gis.umn.edu/docs/howto/agg-rendering-specifics/linesymbolization.png)]]
    1015  * pixmap
    1116  * 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)
    16 
     17 * '''markers''' : mapserver passes a list of points and orientations to the renderer, and all the markers are rendered in one pass. pixmap, vector, truetype, and ellipse? specific versions could be presented by the renderer:
     18   * vector markers: the vector has been scaled to the desired size, need to pass on line width and the vector symbol points to the renderer
     19   * truetype markers: the font file location/lookup has been done, need to pass on font absolute path, symbol character, size
     20   * pixmap markers: need to pass on the pixmap symbol, and a scaling factor for the final pixmap size
     21   * ellipse markers: ...
     22{{{
     23void renderXXXMarkers(imageObj *image, int nmarkers, pointObj **labelpoints, double *angles,
     24                         colorObj *color, colorObj *outlinecolor
     25                         XXXX marker type specific data);
     26}}}
    1727=== Point Layers ===
    1828should be pretty straightforward. must probably expose a way for the renderer to cache an internal representation of the symbol if needed.
    19  * vector
    20  * pixmap
    21  * truetype
    22  * ellipse
     29 * vector: the vector points have been scaled and rotated beforehand.
     30{{{
     31void renderVectorSymbol(imageObj*image, pointObj *location, pointObj **vectorpoints, int nvectorpoints, int/double width,
     32                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     33}}}
     34 * pixmap: need to pass on the pixmap scaling factor, angle
     35{{{
     36void renderPixmapSymbol(imageObj *image, pointObj *location, TBD:image representation, double scalingfactor, double angle)
     37}}}
     38 * truetype: need to pass on font file, character, size, angle
     39{{{
     40void renderTruetypeSymbol(imageObj *image, pointObj *location, char *fontfile, char character, int size, double angle,
     41                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     42}}}
     43 * ellipse: ellipse has been scaled beforehand, pass on angle?
     44{{{
     45void renderEllipseSymbol(imageObj *image, pointObj *location, int w, int h, double angle,
     46                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     47}}}
    2348
    2449=== Polygon and Circle Layers ===
     50I've grouped these together as they are conceptually rather equivalent. all the following will need to be split up in circle/polygon at implementation.
    2551 * '''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'''
    29   * vector
    30   * ellipse
    31   * pixmap
    32   * truetype
     52{{{
     53void renderSimplePolygon(imageObj *image, shapeObj *polypoints, colorObj *color,
     54                         colorObj *outlinecolor, int/double outlinewidth) /*optional outlined polygon in one step*/
     55}}}
     56 * '''hatched''': renders only the hatch with an optional background. polygon outline would be done with another STYLE block.
     57{{{
     58void renderHatchedPolygon(imageObj *image, shapeObj *polypoints, int/double linewidth, int/double linespacing,
     59                         colorObj *color, colorObj *backgroundcolor)
     60}}}
     61 * '''tiled''': the specified symbol is used as a tile to fill the polygon. it could be nice to provide a way to specify symbol size ''and'' spacing between symbols. Same as for marker symbols, all possible preprocessing on the actual symbol must be done before passing it on to the renderer.
     62  * vector: vector symbol adjusted for size and angle beforehand.
     63{{{
     64void renderVectorTiledPolygon(imageObj *image, shapeObj *polypoints, pointObj **vectorpoints, int nvectorpoints,
     65                         int/double linewidth, int tileheight, int tilewidth, /*here the vector symbol would be centered on this specified tile size*/
     66                         colorObj *color, colorObj *outlineColor, colorObj *backgroundcolor);
     67}}}
     68  * ellipse: ellipse symbol adjusted for size
     69{{{
     70void renderEllipseTiledPolygon(imageObj *image, shapeObj *polypoints, int/double ellipsewidth, int/double ellipseheight, double ellipseangle,
     71                         int tileheight, int tilewidth, /*here the ellipse symbol would be centered on this specified tile size*/
     72                         colorObj *color, colorObj *outlineColor, colorObj *backgroundcolor);
     73}}}
     74  * pixmap: pass on pixmap scaling factor and angle
     75{{{
     76void renderPixmapTiledPolygon(imageObj *image, shapeObj *polypoints, TBD: image data, double pixmapscalingfactor, double pixmapangle,
     77                         int tileheight, int tilewidth, /*here the pixmap symbol would be centered on this specified tile size*/
     78                         colorObj *backgroundcolor);
     79}}}
     80  * truetype: idem, pass on font file and character
     81{{{
     82void renderTruetypeTiledPolygon(imageObj *image, shapeObj *polypoints, char* fontfile, int charsize, double angle,
     83                         int tileheight, int tilewidth, /*here the truetype symbol would be centered on this specified tile size*/
     84                         colorObj *color, colorObj *outlineColor, colorObj *backgroundcolor);
     85}}}
    3386
    3487=== Labelling ===
     
    48101and then use a vtable approach to connect that to a generic setPixel function.
    49102
     103'''update''': this won't work out as an inline function is of no use if we're using function pointers (i.e. the vtable)
     104
    50105== I/O and Pixel Formats ==
    51106All I/O is currently done with gd (or not: geotiff,etc)