Changes between Version 1 and Version 2 of GSoC_SVG_Symbols_FIRST_DRAFT_OF_THE_MS-RFC
- Timestamp:
- Jul 12, 2009, 7:38:14 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC_SVG_Symbols_FIRST_DRAFT_OF_THE_MS-RFC
v1 v2 3 3 4 4 Kiran Anjaneya Varma Alluri 5 July 12, 20096 1 Overview. 5 ''' July 12, 2009 6 1 Overview.''' 7 7 Popular tools such as Inkscape generate SVG graphics natively. So far MapServer has not supported 8 8 the SVG format, which leaves many users with the extra work of converting between formats. This … … 10 10 ne vector symbols in 11 11 the MapServer symbolset. 12 2 Method. 12 '''2 Method.''' 13 13 The SVG parsing and rendering will be triggered by the following syntax: 14 14 … … 22 22 The choice for using a SYMBOL for the task is to allow for the reuse of the SVG symbol easily within 23 23 classes. 24 3 Technical Overview 24 '''3 Technical Overview''' 25 25 26 In order to support the SVG format, we make use of the AGG library. The reasons for going with the 26 27 AGG library are: … … 32 33 33 34 There are some disadvantages that emerge from using the AGG library. Foremost, the AGG library 34 has an incomplete SVG speci 35 cation. To avoid having to reimplement the missing subset of the 36 speci 37 cation (which would, without a doubt, be a non-trivial task, and would add to the complexity 35 has an incomplete SVG specification. To avoid having to reimplement the missing subset of the 36 specification (which would, without a doubt, be a non-trivial task, and would add to the complexity 38 37 of this RFC), we stick by the following techniques: 39 38 40 39 1. A modular design is used, where the generation of the intermediate pixmap is done by a single 41 function so that it can be easily modi 42 ed to adjust to a dierent library. Thus,using a pixmap 40 function so that it can be easily modified to adjust to a different library. Thus, using a pixmap 43 41 will allow us to use any rendering library. 44 2. The unimplemented subset of the SVG speci 45 cation is clearly provided to users in the documen- 46 tation to prevent frustration on their side. 47 1 48 To implement this functionality, the following steps needs to be accomplished: 42 2. The unimplemented subset of the SVG specification is clearly provided to users in the Documentation 43 to prevent frustration on their side. 44 45 To implement this functionality, the following steps needs to be accomplished: 49 46 50 47 1. Implement an SVG parser. For this, we directly make use of the SVG Viewer example provided 51 48 along with the AGG sources. 52 49 2. Write a single function to render a parsed SVG 53 le to a pixmap. The pixmap will be an inter- 54 mediate form that can then be rendered. The pixmap will be stored in cache memory to prevent 50 file to a pixmap. The pixmap will be an intermediate form that can then be rendered. The pixmap will be stored in cache memory to prevent 55 51 having to constantly be rasterized it every time a symbol is drawn. 56 3. Render the pixmap into the 57 nal image 58 le. This will be done using a mixture of the AGG and 59 GD libraries. 60 4 Files Added 52 3. Render the pixmap into the final image 53 file. This will be done using a mixture of the AGG and GD libraries. 54 55 ''' 56 4 Files Added''' 61 57 62 58 Finally, the SVG parsing and pixmap generation functions will be stored in source … … 69 65 The 70 66 files within the above directory include the files for: 71 • SVG Parsing 72 • Trigger Function (based on Map 73 file syntax) 74 • SVG to Pixmap generation 67 68 • SVG Parsing. 69 70 • Trigger Function (based on '''Map 71 file''' syntax). 72 • SVG to Pixmap generation. 75 73 All 76 74 files are within the C++ 'mapserver' namespace. 77 78 5 Documentation 75 ''' 76 5 Documentation''' 79 77 The following documentation needs to be prepared for this project: 80 1. Missing SVG speci81 cation document.78 79 1. Missing SVG specification document. 82 80 2. Basic usage tutorial with examples. 83 81