Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
0legmax committed May 16, 2016
1 parent aedd9b0 commit c659e8c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SVG++ library 1.1
SVG++ library 1.2
=======================

Please visit http://svgpp.org/ for description, tutorial and reference.
Expand Down Expand Up @@ -41,3 +41,8 @@ Take a look at [Tutorial](http://svgpp.org/lesson01.html) to get the idea about
* An SVG viewer or library that produces raster image from SVG
(though C++ demo app included, which renders SVG with [AGG](http://antigrain.com), GDI+ or [Skia](https://code.google.com/p/skia/) graphics library)
* Renders anything itself

####What's new####

SVG++ update 1.2 focuses on reducing compiler memory usage by allowing separation
of template heavy Boost.Spirit code to other compilation unit.
26 changes: 19 additions & 7 deletions doc/sphinx/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,29 @@ the parser produces.

Before first SVG++ header is included some macro should be defined for each parser to be moved::

#define SVGPP_USE_EXTERNAL_PATH_DATA_PARSER 1
#define SVGPP_USE_EXTERNAL_TRANSFORM_PARSER 1
#define SVGPP_USE_EXTERNAL_PATH_DATA_PARSER
#define SVGPP_USE_EXTERNAL_TRANSFORM_PARSER
#define SVGPP_USE_EXTERNAL_PRESERVE_ASPECT_RATIO_PARSER
#define SVGPP_USE_EXTERNAL_PAINT_PARSER
#define SVGPP_USE_EXTERNAL_MISC_PARSER
#define SVGPP_USE_EXTERNAL_COLOR_PARSER
#define SVGPP_USE_EXTERNAL_LENGTH_PARSER


And new source file should be added to the project that contains instantiations for some templates with
parameters used in the application::

#include <svgpp/parser/external_function/parse_path_data_impl.hpp>
#include <svgpp/parser/external_function/parse_transform_impl.hpp>
#include <svgpp/parser/external_function/parse_all_impl.hpp>

SVGPP_PARSE_PATH_DATA_IMPL(const char *, double)
SVGPP_PARSE_TRANSFORM_IMPL(const char *, double)

First parameters to ``SVGPP_PARSE_PATH_DATA_IMPL()`` and ``SVGPP_PARSE_TRANSFORM_IMPL()`` macros are type of iterators
that are provided by used XML parser policy. And the second parameters are *coordinate* and *number* types used.
SVGPP_PARSE_PAINT_IMPL (const char *, color_factory_t, svgpp::factory::icc_color::default_factory)
SVGPP_PARSE_COLOR_IMPL (const char *, color_factory_t, svgpp::factory::icc_color::default_factory)
SVGPP_PARSE_PRESERVE_ASPECT_RATIO_IMPL(const char *)
SVGPP_PARSE_MISC_IMPL (const char *, double)
SVGPP_PARSE_CLIP_IMPL (const char *, length_factory_t)
SVGPP_PARSE_LENGTH_IMPL (const char *, length_factory_t)

First parameters to ``SVGPP_PARSE_..._IMPL()`` macros are type of iterators
that are provided by used XML parser policy.
And the other parameters are *coordinate* type or different factories types used.

0 comments on commit c659e8c

Please sign in to comment.