Changes between Version 3 and Version 4 of GSoC_SVG_Symbols_SECOND_DRAFT_OF_THE_MS_RFC
- Timestamp:
- Aug 10, 2009, 10:48:50 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC_SVG_Symbols_SECOND_DRAFT_OF_THE_MS_RFC
v3 v4 2 2 Kiran Anjaneya Varma Alluri 3 3 August 10, 2009 4 1 Overview.5 4 '''1 Overview. 5 ''' 6 6 Popular tools such as Inkscape generate SVG graphics natively. So far MapServer has not supported the SVG format, which 7 7 leaves many users with the extra work of converting between formats. This RFC aims to introduce support for SVG graphics 8 8 as an alternate method to define vector symbols in the MapServer symbolset. 9 9 10 2 Method. 10 '''2 Method.''' 11 11 12 12 The SVG parsing and rendering will be triggered by the following syntax: … … 21 21 The choice for using a SYMBOL for the task is to allow for the reuse of the SVG symbol easily within classes. 22 22 23 3 Technical Overview. 23 '''3 Technical Overview.''' 24 24 25 25 In order to support the SVG format, we make use of the AGG library. The reasons for going with the AGG library are: … … 40 40 41 41 To implement this functionality, the following steps needs to be accomplished: 42 42 43 1. Implement an SVG parser. For this, we directly make use of the SVG Viewer example provided along with the AGG 43 44 sources. … … 56 57 6. Render the pixmap into the final image file. This will be done using a mixture of the AGG and GD libraries. 57 58 58 59 4 Files Added and Modified. 60 61 4.1 AGG/SVG Parser. 59 ''' 60 4 Files Added and Modified.''' 61 ''' 62 4.1 AGG/SVG Parser.''' 62 63 The SVG parsing and pixmap generation functions will be stored in source files stored at 63 64 … … 71 72 c. SVG to Pixmap generation 72 73 All files are within the C++ ’mapserver’ namespace. 73 74 4.2 Rendering Functions. 74 ''' 75 4.2 Rendering Functions.''' 75 76 The rendering functions in mapgd.c will be modified to support the SVG type. These include all the basic shapes such as 76 77 points, lines, circles etc. These will make use of the createBrushFromSVG function to render to a GD pixmap. 77 78 4.3 Lexical Analyzer and Parser. 78 ''' 79 4.3 Lexical Analyzer and Parser.''' 79 80 The maplexer.l file will be modified to support two new keywords (SVG and SVGPATH). The mapsymbol.h file be modified 80 81 by adding SVG related data to the symbolObj structure along with basic enumerations and defines. The mapsymbol.c file’s 81 82 loadSymbol function will be modified to generate the required new fields in the symbolObj structure. 82 83 83 84 5 Documentation. 84 ''' 85 5 Documentation.''' 85 86 The following documentation needs to be prepared for this project: 86 87 1. Missing SVG specification document.