1[/============================================================================ 2 Boost.Geometry (aka GGL, Generic Geometry Library) 3 4 Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands. 5 Copyright (c) 2008-2013 Bruno Lalande, Paris, France. 6 Copyright (c) 2009-2013 Mateusz Loskot, London, UK. 7 8 Use, modification and distribution is subject to the Boost Software License, 9 Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 10 http://www.boost.org/LICENSE_1_0.txt) 11=============================================================================/] 12 13 14[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically] 15[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1svg__mapper.xml] 16[section:svg_mapper svg_mapper] 17 18'''<indexterm><primary>svg_mapper</primary></indexterm>''' 19Helper class to create SVG maps. 20 21[heading Synopsis] 22``template<typename Point, bool SameScale, typename SvgCoordinateType> 23class svg_mapper 24 : noncopyable 25{ 26 // ... 27}; 28`` 29 30[heading Template parameter(s)] 31[table 32[[Parameter] [Default] [Description]] 33[[typename Point] [] [Point type, for input geometries. ]] 34[[bool SameScale] [true] [Boolean flag indicating if horizontal and vertical scale should be the same. The default value is true ]] 35[[typename SvgCoordinateType] [double] [Coordinate type of SVG points. SVG is capable to use floating point coordinates. Therefore the default value is double]] 36] 37 38[heading Constructor(s)] 39[table 40[[Function] [Description] [Parameters] ] 41[[``svg_mapper(std::ostream & stream, SvgCoordinateType width, SvgCoordinateType height, 42 std::string const & width_height = "width=\"100%\" height=\"100%\"")`` 43 44] [Constructor, initializing the SVG map. Opens and initializes the SVG. Should be called explicitly. ] [[* std::ostream &]: ['stream]: Output stream, should be a stream already open 45 46[* SvgCoordinateType]: ['width]: Width of the SVG map (in SVG pixels) 47 48[* SvgCoordinateType]: ['height]: Height of the SVG map (in SVG pixels) 49 50[* std::string const &]: ['width_height]: Optional information to increase width and/or height 51 52 53 54]] 55[[``~svg_mapper()`` 56 57] [Destructor, called automatically. Closes the SVG by streaming <\/svg> ] [ 58 59]] 60] 61 62[heading Member Function(s)] 63[table 64[[Function] [Description] [Parameters] [Returns]] 65[[``template<typename Geometry> 66void add(Geometry const & geometry)`` 67 68] [Adds a geometry to the transformation matrix. After doing this, the specified geometry can be mapped fully into the SVG map. ] [[* Geometry const &]: ['geometry]: A model of the specified concept 69 70 71 72][ 73 74] 75] 76[[``template<typename Geometry> 77void map(Geometry const & geometry, std::string const & style, double size = -1.0)`` 78 79] [Maps a geometry into the SVG map using the specified style. ] [[* Geometry const &]: ['geometry]: A model of the specified concept 80 81[* std::string const &]: ['style]: String containing verbatim SVG style information 82 83[* double]: ['size]: Optional size (used for SVG points) in SVG pixels. For linestrings, specify linewidth in the SVG style information 84 85 86 87][ 88 89] 90] 91[[``template<typename TextPoint> 92void text(TextPoint const & point, std::string const & s, std::string const & style, 93 double offset_x = 0.0, double offset_y = 0.0, double lineheight = 10.0)`` 94 95] [Adds a text to the SVG map. ] [[* TextPoint const &]: ['point]: Location of the text (in map units) 96 97[* std::string const &]: ['s]: The text itself 98 99[* std::string const &]: ['style]: String containing verbatim SVG style information, of the text 100 101[* double]: ['offset_x]: Offset in SVG pixels, defaults to 0 102 103[* double]: ['offset_y]: Offset in SVG pixels, defaults to 0 104 105[* double]: ['lineheight]: Line height in SVG pixels, in case the text contains 106 107 108 109][ 110 111] 112] 113] 114 115[heading Header] 116Either 117 118`#include <boost/geometry.hpp>` 119 120 121Or 122 123`#include <boost/geometry/io/svg/svg_mapper.hpp>` 124 125[include reference/io/svg.qbk] 126 127[endsect] 128 129