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 | {{{ |
| 23 | void renderXXXMarkers(imageObj *image, int nmarkers, pointObj **labelpoints, double *angles, |
| 24 | colorObj *color, colorObj *outlinecolor |
| 25 | XXXX marker type specific data); |
| 26 | }}} |
19 | | * vector |
20 | | * pixmap |
21 | | * truetype |
22 | | * ellipse |
| 29 | * vector: the vector points have been scaled and rotated beforehand. |
| 30 | {{{ |
| 31 | void 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 | {{{ |
| 36 | void 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 | {{{ |
| 40 | void 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 | {{{ |
| 45 | void renderEllipseSymbol(imageObj *image, pointObj *location, int w, int h, double angle, |
| 46 | colorObj *color, colorObj *outlinecolor, colorObj* backgroundcolor?) |
| 47 | }}} |
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 | {{{ |
| 53 | void 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 | {{{ |
| 58 | void 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 | {{{ |
| 64 | void 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 | {{{ |
| 70 | void 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 | {{{ |
| 76 | void 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 | {{{ |
| 82 | void 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 | }}} |