Changes between Version 4 and Version 5 of UnifyingTheRenderingInterfaces
- Timestamp:
- Nov 9, 2007, 10:29:40 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UnifyingTheRenderingInterfaces
v4 v5 6 6 === Current way of doing things === 7 7 {{{ 8 #!c 8 9 int msDrawXXX(image, shape, symbol, scalefactor ...) { 9 10 if renderGD … … 18 19 and then each msDrawXXXYYY function is 19 20 {{{ 21 #!c 20 22 int msDrawXXXYYY(image, shape, symbol, scalefactor ...) { 21 23 ... … … 34 36 all (or as much as possible) cartographic treatment is done once, and the renderers only deal with... tada! rendering 35 37 {{{ 38 #!c 36 39 int msDrawXXX(image, shape, symbol, scalefactor ...) { 37 40 ... … … 55 58 56 59 {{{ 60 #!c 57 61 void renderSimpleLine(imageObj *image, shapeObj *thePoints, int/double width, colorObj *color, int* dashstyle, int dashstylelength, 58 62 some_struct *capsandjoins) … … 67 71 * ellipse markers: ... 68 72 {{{ 73 #!c 69 74 void renderXXXMarkers(imageObj *image, int nmarkers, pointObj **labelpoints, double *angles, 70 75 colorObj *color, colorObj *outlinecolor … … 75 80 * vector: the vector points have been scaled and rotated beforehand. 76 81 {{{ 82 #!c 77 83 void renderVectorSymbol(imageObj*image, pointObj *location, pointObj **vectorpoints, int nvectorpoints, int/double width, 78 84 colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?) … … 80 86 * pixmap: need to pass on the pixmap scaling factor, angle 81 87 {{{ 88 #!c 82 89 void renderPixmapSymbol(imageObj *image, pointObj *location, TBD:image representation, double scalingfactor, double angle) 83 90 }}} 84 91 * truetype: need to pass on font file, character, size, angle 85 92 {{{ 93 #!c 86 94 void renderTruetypeSymbol(imageObj *image, pointObj *location, char *fontfile, char character, int size, double angle, 87 95 colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?) … … 89 97 * ellipse: ellipse has been scaled beforehand, pass on angle? 90 98 {{{ 99 #!c 91 100 void renderEllipseSymbol(imageObj *image, pointObj *location, int w, int h, double angle, 92 101 colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?) … … 97 106 * '''simple''': straightforward, provide vertexes and color 98 107 {{{ 108 #!c 99 109 void renderSimplePolygon(imageObj *image, shapeObj *polypoints, colorObj *color, 100 110 colorObj *outlinecolor, int/double outlinewidth) /*optional outlined polygon in one step*/ … … 102 112 * '''hatched''': renders only the hatch with an optional background. polygon outline would be done with another STYLE block. 103 113 {{{ 114 #!c 104 115 void renderHatchedPolygon(imageObj *image, shapeObj *polypoints, int/double linewidth, int/double linespacing, 105 116 colorObj *color, colorObj *backgroundcolor) … … 108 119 * vector: vector symbol adjusted for size and angle beforehand. 109 120 {{{ 121 #!c 110 122 void renderVectorTiledPolygon(imageObj *image, shapeObj *polypoints, pointObj **vectorpoints, int nvectorpoints, 111 123 int/double linewidth, int tileheight, int tilewidth, /*here the vector symbol would be centered on this specified tile size*/ … … 114 126 * ellipse: ellipse symbol adjusted for size 115 127 {{{ 128 #!c 116 129 void renderEllipseTiledPolygon(imageObj *image, shapeObj *polypoints, int/double ellipsewidth, int/double ellipseheight, double ellipseangle, 117 130 int tileheight, int tilewidth, /*here the ellipse symbol would be centered on this specified tile size*/ … … 120 133 * pixmap: pass on pixmap scaling factor and angle 121 134 {{{ 135 #!c 122 136 void renderPixmapTiledPolygon(imageObj *image, shapeObj *polypoints, TBD: image data, double pixmapscalingfactor, double pixmapangle, 123 137 int tileheight, int tilewidth, /*here the pixmap symbol would be centered on this specified tile size*/ … … 126 140 * truetype: idem, pass on font file and character 127 141 {{{ 142 #!c 128 143 void renderTruetypeTiledPolygon(imageObj *image, shapeObj *polypoints, char* fontfile, int charsize, double angle, 129 144 int tileheight, int tilewidth, /*here the truetype symbol would be centered on this specified tile size*/ … … 141 156 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 142 157 {{{ 158 #!c 143 159 inline void setPixelAGG(imageObj *im, int x, int y, int r, int g, int b, int a) { 144 160 im->buffer[x][y]=AGGPixelMacro(r,g,b,a);