[/============================================================================
Boost.Geometry (aka GGL, Generic Geometry Library)
Copyright (c) 2007-2013 Barend Gehrels, Amsterdam, the Netherlands.
Copyright (c) 2008-2013 Bruno Lalande, Paris, France.
Copyright (c) 2009-2013 Mateusz Loskot, London, UK.
Use, modification and distribution is subject to the Boost Software License,
Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================/]
[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
[/ Generated from doxy/doxygen_output/xml/classboost_1_1geometry_1_1svg__mapper.xml]
[section:svg_mapper svg_mapper]
'''svg_mapper'''
Helper class to create SVG maps.
[heading Synopsis]
``template
class svg_mapper
: noncopyable
{
// ...
};
``
[heading Template parameter(s)]
[table
[[Parameter] [Default] [Description]]
[[typename Point] [] [Point type, for input geometries. ]]
[[bool SameScale] [true] [Boolean flag indicating if horizontal and vertical scale should be the same. The default value is true ]]
[[typename SvgCoordinateType] [double] [Coordinate type of SVG points. SVG is capable to use floating point coordinates. Therefore the default value is double]]
]
[heading Constructor(s)]
[table
[[Function] [Description] [Parameters] ]
[[``svg_mapper(std::ostream & stream, SvgCoordinateType width, SvgCoordinateType height,
std::string const & width_height = "width=\"100%\" height=\"100%\"")``
] [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
[* SvgCoordinateType]: ['width]: Width of the SVG map (in SVG pixels)
[* SvgCoordinateType]: ['height]: Height of the SVG map (in SVG pixels)
[* std::string const &]: ['width_height]: Optional information to increase width and/or height
]]
[[``~svg_mapper()``
] [Destructor, called automatically. Closes the SVG by streaming <\/svg> ] [
]]
]
[heading Member Function(s)]
[table
[[Function] [Description] [Parameters] [Returns]]
[[``template
void add(Geometry const & geometry)``
] [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
][
]
]
[[``template
void map(Geometry const & geometry, std::string const & style, double size = -1.0)``
] [Maps a geometry into the SVG map using the specified style. ] [[* Geometry const &]: ['geometry]: A model of the specified concept
[* std::string const &]: ['style]: String containing verbatim SVG style information
[* double]: ['size]: Optional size (used for SVG points) in SVG pixels. For linestrings, specify linewidth in the SVG style information
][
]
]
[[``template
void text(TextPoint const & point, std::string const & s, std::string const & style,
double offset_x = 0.0, double offset_y = 0.0, double lineheight = 10.0)``
] [Adds a text to the SVG map. ] [[* TextPoint const &]: ['point]: Location of the text (in map units)
[* std::string const &]: ['s]: The text itself
[* std::string const &]: ['style]: String containing verbatim SVG style information, of the text
[* double]: ['offset_x]: Offset in SVG pixels, defaults to 0
[* double]: ['offset_y]: Offset in SVG pixels, defaults to 0
[* double]: ['lineheight]: Line height in SVG pixels, in case the text contains
][
]
]
]
[heading Header]
Either
`#include `
Or
`#include `
[include reference/io/svg.qbk]
[endsect]