38#ifndef DRAIN_TREE_UTILS_SVG
39#define DRAIN_TREE_UTILS_SVG
43#include <drain/util/EnumUtils.h>
44#include <drain/util/Frame.h>
45#include <drain/util/Rectangle.h>
47#include "AlignAnchorSVG.h"
74 TreeSVG & getDefaultObject(TreeSVG & root, svg::tag_t);
78 TreeSVG &
ensureStyle(TreeSVG & root,
const SelectXML<svg::tag_t> & selector,
const std::initializer_list<std::pair<const char *,const Variable> > & styleDef);
83DRAIN_ENUM_DICT(TreeUtilsSVG::Roles);
84DRAIN_ENUM_OSTREAM(TreeUtilsSVG::Roles);
93 const std::string dir;
96 const std::string prefix;
100 dir(filepath.dir.empty() ?
"" : filepath.dir.str()+
'/'),
104 int visitPrefix(TreeSVG & tree,
const TreeSVG::path_t & path)
override;
118 const std::string LOCAL;
121 const std::string SHARED;
131 int visitPrefix(TreeSVG & tree,
const TreeSVG::path_t & path)
override {
136 int visitPostfix(TreeSVG & tree,
const TreeSVG::path_t & path)
override;
143 typedef std::map<std::string, unsigned short> variableStat_t;
156 const std::string CLIP;
177 TreeSVG &
getClippingRect(TreeSVG & root,
size_t width,
size_t height);
180 int visitPrefix(TreeSVG & tree,
const TreeSVG::path_t & path)
override {
185 int visitPostfix(TreeSVG & tree,
const TreeSVG::path_t & path)
override;
Extracts and stores directory path, base filename and extension.
Definition FilePath.h:58
Definition SelectorXML.h:89
Default implementation of a tree visitor (concept) compatible TreeUtils::traverser()
Definition TreeUtils.h:270
Definition TreeUtilsSVG.h:151
static TreeSVG & getClippingRect(TreeSVG &root, size_t width, size_t height)
Ensures a clipping path o f type RECT of given size.
Definition TreeUtilsSVG.cpp:289
Definition TreeUtilsSVG.h:88
Definition DataSelector.cpp:1277
SVG classes marking requests of relative horizontal and vertical alignment.
Definition TreeUtilsSVG.h:65
static TreeSVG & ensureStyle(TreeSVG &root, const SelectXML< svg::tag_t > &selector, const std::initializer_list< std::pair< const char *, const Variable > > &styleDef)
Create a new entry, unless already defined.
Definition TreeUtilsSVG.cpp:65