Changes between Version 4 and Version 5 of UnifyingTheRenderingInterfaces


Ignore:
Timestamp:
Nov 9, 2007, 10:29:40 AM (17 years ago)
Author:
tbonfort
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UnifyingTheRenderingInterfaces

    v4 v5  
    66=== Current way of doing things ===
    77{{{
     8#!c
    89int msDrawXXX(image, shape, symbol, scalefactor ...) {
    910  if renderGD
     
    1819and then each msDrawXXXYYY function is
    1920{{{
     21#!c
    2022int msDrawXXXYYY(image, shape, symbol, scalefactor ...) {
    2123 ...
     
    3436all (or as much as possible) cartographic treatment is done once, and the renderers only deal with... tada! rendering
    3537{{{
     38#!c
    3639int msDrawXXX(image, shape, symbol, scalefactor ...) {
    3740...
     
    5558
    5659{{{
     60#!c
    5761void renderSimpleLine(imageObj *image, shapeObj *thePoints, int/double width, colorObj *color, int* dashstyle, int dashstylelength,
    5862                          some_struct *capsandjoins)
     
    6771   * ellipse markers: ...
    6872{{{
     73#!c
    6974void renderXXXMarkers(imageObj *image, int nmarkers, pointObj **labelpoints, double *angles,
    7075                         colorObj *color, colorObj *outlinecolor
     
    7580 * vector: the vector points have been scaled and rotated beforehand.
    7681{{{
     82#!c
    7783void renderVectorSymbol(imageObj*image, pointObj *location, pointObj **vectorpoints, int nvectorpoints, int/double width,
    7884                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     
    8086 * pixmap: need to pass on the pixmap scaling factor, angle
    8187{{{
     88#!c
    8289void renderPixmapSymbol(imageObj *image, pointObj *location, TBD:image representation, double scalingfactor, double angle)
    8390}}}
    8491 * truetype: need to pass on font file, character, size, angle
    8592{{{
     93#!c
    8694void renderTruetypeSymbol(imageObj *image, pointObj *location, char *fontfile, char character, int size, double angle,
    8795                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     
    8997 * ellipse: ellipse has been scaled beforehand, pass on angle?
    9098{{{
     99#!c
    91100void renderEllipseSymbol(imageObj *image, pointObj *location, int w, int h, double angle,
    92101                         colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?)
     
    97106 * '''simple''': straightforward, provide vertexes and color
    98107{{{
     108#!c
    99109void renderSimplePolygon(imageObj *image, shapeObj *polypoints, colorObj *color,
    100110                         colorObj *outlinecolor, int/double outlinewidth) /*optional outlined polygon in one step*/
     
    102112 * '''hatched''': renders only the hatch with an optional background. polygon outline would be done with another STYLE block.
    103113{{{
     114#!c
    104115void renderHatchedPolygon(imageObj *image, shapeObj *polypoints, int/double linewidth, int/double linespacing,
    105116                         colorObj *color, colorObj *backgroundcolor)
     
    108119  * vector: vector symbol adjusted for size and angle beforehand.
    109120{{{
     121#!c
    110122void renderVectorTiledPolygon(imageObj *image, shapeObj *polypoints, pointObj **vectorpoints, int nvectorpoints,
    111123                         int/double linewidth, int tileheight, int tilewidth, /*here the vector symbol would be centered on this specified tile size*/
     
    114126  * ellipse: ellipse symbol adjusted for size
    115127{{{
     128#!c
    116129void renderEllipseTiledPolygon(imageObj *image, shapeObj *polypoints, int/double ellipsewidth, int/double ellipseheight, double ellipseangle,
    117130                         int tileheight, int tilewidth, /*here the ellipse symbol would be centered on this specified tile size*/
     
    120133  * pixmap: pass on pixmap scaling factor and angle
    121134{{{
     135#!c
    122136void renderPixmapTiledPolygon(imageObj *image, shapeObj *polypoints, TBD: image data, double pixmapscalingfactor, double pixmapangle,
    123137                         int tileheight, int tilewidth, /*here the pixmap symbol would be centered on this specified tile size*/
     
    126140  * truetype: idem, pass on font file and character
    127141{{{
     142#!c
    128143void renderTruetypeTiledPolygon(imageObj *image, shapeObj *polypoints, char* fontfile, int charsize, double angle,
    129144                         int tileheight, int tilewidth, /*here the truetype symbol would be centered on this specified tile size*/
     
    141156A 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
    142157{{{
     158#!c
    143159inline void setPixelAGG(imageObj *im, int x, int y, int r, int g, int b, int a) {
    144160 im->buffer[x][y]=AGGPixelMacro(r,g,b,a);