#include <Svg.h>
Inherits cinder::svg::Group.
Represents an SVG Document. See SVG Document Structure http://www.w3.org/TR/SVG/struct.html.
cinder::svg::Doc::Doc |
( |
| ) |
|
cinder::svg::Doc::Doc |
( |
const fs::path & |
filePath | ) |
|
cinder::svg::Doc::Doc |
( |
DataSourceRef |
dataSource, |
|
|
const fs::path & |
filePath = fs::path() |
|
) |
| |
DocRef cinder::svg::Doc::create |
( |
const fs::path & |
filePath | ) |
|
|
static |
DocRef cinder::svg::Doc::create |
( |
DataSourceRef |
dataSource, |
|
|
const fs::path & |
filePath = fs::path() |
|
) |
| |
|
static |
DocRef cinder::svg::Doc::createFromSvgz |
( |
DataSourceRef |
dataSource, |
|
|
const fs::path & |
filePath = fs::path() |
|
) |
| |
|
static |
int32_t cinder::svg::Doc::getWidth |
( |
| ) |
const |
Returns the width of the document in pixels.
int32_t cinder::svg::Doc::getHeight |
( |
| ) |
const |
Returns the height of the document in pixels.
ivec2 cinder::svg::Doc::getSize |
( |
| ) |
const |
Returns the size of the document in pixels.
float cinder::svg::Doc::getAspectRatio |
( |
| ) |
const |
Returns the aspect ratio of the Doc (width / height)
Area cinder::svg::Doc::getBounds |
( |
| ) |
const |
Returns the bounds of the Doc (0,0,width,height)
float cinder::svg::Doc::getDpi |
( |
| ) |
const |
Returns the document's dots-per-inch. Currently hardcoded to 72.
Node * cinder::svg::Doc::nodeUnderPoint |
( |
const vec2 & |
pt | ) |
|
Returns the top-most Node which contains pt. Returns NULL if no Node contains the point.
shared_ptr< Surface8u > cinder::svg::Doc::loadImage |
( |
fs::path |
relativePath | ) |
|
Utility function to load an image relative to the document. Caches results.
template<typename T >
const T* cinder::svg::Group::find |
( |
const std::string & |
id | ) |
|
|
inherited |
Recursively searches for a child element of type svg::T
named id. Returns NULL on failure to find the object or if it is not of type T.
const Node * cinder::svg::Group::findNode |
( |
const std::string & |
id, |
|
|
bool |
recurse = true |
|
) |
| const |
|
inherited |
Recursively searches for a child element named id. Returns NULL on failure.
template<typename T >
const T* cinder::svg::Group::findByIdContains |
( |
const std::string & |
idPartial | ) |
const |
|
inherited |
Recursively searches for a child element of type svg::T
whose name contains idPartial. Returns NULL on failure to find the object or if it is not of type T.
const Node * cinder::svg::Group::findNodeByIdContains |
( |
const std::string & |
idPartial, |
|
|
bool |
recurse = true |
|
) |
| const |
|
inherited |
Recursively searches for a child element whose name contains idPartial. Returns NULL on failure. (null_ptr later?)
const Node * cinder::svg::Group::findInAncestors |
( |
const std::string & |
elementId | ) |
const |
|
virtualinherited |
Finds the node with ID elementId amongst this Node's ancestors. Returns NULL on failure.
Reimplemented from cinder::svg::Node.
const Node & cinder::svg::Group::getChild |
( |
const std::string & |
id | ) |
const |
|
inherited |
const Node& cinder::svg::Group::operator/ |
( |
const std::string & |
id | ) |
const |
|
inherited |
virtual Shape2d cinder::svg::Group::getShape |
( |
| ) |
const |
|
virtualinherited |
void cinder::svg::Group::appendMergedShape2d |
( |
Shape2d * |
appendTo | ) |
const |
|
inherited |
Appends the merged Shape2d for the group to appentTo.
const std::list<Node*>& cinder::svg::Group::getChildren |
( |
| ) |
const |
|
inherited |
Returns a reference to the list of the Group's children.
std::list<Node*>& cinder::svg::Group::getChildren |
( |
| ) |
|
|
inherited |
Returns a reference to the list of the Group's children.
Node * cinder::svg::Group::nodeUnderPoint |
( |
const vec2 & |
absolutePoint, |
|
|
const mat3 & |
parentInverseMatrix |
|
) |
| const |
|
protectedinherited |
Shape2d cinder::svg::Group::getMergedShape2d |
( |
| ) |
const |
|
protectedinherited |
Rectf cinder::svg::Group::calcBoundingBox |
( |
| ) |
const |
|
protectedvirtualinherited |
virtual bool cinder::svg::Group::isDrawable |
( |
| ) |
const |
|
protectedvirtualinherited |
void cinder::svg::Group::parse |
( |
const XmlTree & |
xml | ) |
|
|
protectedinherited |
Doc * cinder::svg::Node::getDoc |
( |
| ) |
const |
|
inherited |
const Node* cinder::svg::Node::getParent |
( |
| ) |
const |
|
inherited |
Returns the immediate parent of this node.
const std::string& cinder::svg::Node::getId |
( |
| ) |
const |
|
inherited |
Returns the ID of this Node when present.
string cinder::svg::Node::getDomPath |
( |
| ) |
const |
|
inherited |
Returns a DOM-style path to this node.
const Style& cinder::svg::Node::getStyle |
( |
| ) |
const |
|
inherited |
Returns the style elements defined on this Node but not inherited from ancestors.
void cinder::svg::Node::setStyle |
( |
const Style & |
style | ) |
|
|
inherited |
Sets the style defined on this Node but not inherited from ancestors.
Style cinder::svg::Node::calcInheritedStyle |
( |
| ) |
const |
|
inherited |
Returns the node's Style, including attributes inherited from its ancestors for attributes it does not specify.
virtual bool cinder::svg::Node::containsPoint |
( |
const vec2 & |
pt | ) |
const |
|
virtualinherited |
void cinder::svg::Node::render |
( |
Renderer & |
renderer | ) |
const |
|
inherited |
Renders the node and its descendants.
Paint cinder::svg::Node::findPaintInAncestors |
( |
const std::string & |
paintName | ) |
const |
|
inherited |
Finds the svg::Paint node with ID elementId amongst this Node's ancestors. Returns a default svg::Paint instance on failure.
bool cinder::svg::Node::specifiesTransform |
( |
| ) |
const |
|
inherited |
Returns whether this Node specifies a transformation.
mat3 cinder::svg::Node::getTransform |
( |
| ) |
const |
|
inherited |
Returns the local transformation of this node. Returns identity if the Node's transform isn't specified.
void cinder::svg::Node::setTransform |
( |
const mat3 & |
transform | ) |
|
|
inherited |
Sets the local transformation of this node.
void cinder::svg::Node::unspecifyTransform |
( |
| ) |
|
|
inherited |
Removes the local transformation of this node, effectively making it the identity matrix.
mat3 cinder::svg::Node::getTransformInverse |
( |
| ) |
const |
|
inherited |
Returns the inverse of the local transformation of this node. Returns identity if the Node's transform isn't specified.
mat3 cinder::svg::Node::getTransformAbsolute |
( |
| ) |
const |
|
inherited |
Returns the absolute transformation of this node, which includes inherited transformations.
mat3 cinder::svg::Node::getTransformAbsoluteInverse |
( |
| ) |
const |
|
inherited |
Returns the inverse of the absolute transformation of this node, which includes inherited transformations.
Rectf cinder::svg::Node::getBoundingBox |
( |
| ) |
const |
|
inherited |
Returns the local bounding box of the Node. Calculated and cached the first time it is requested.
Rectf cinder::svg::Node::getBoundingBoxAbsolute |
( |
| ) |
const |
|
inherited |
Returns the absolute bounding box of the Node. Calculated and cached the first time it is requested.
Shape2d cinder::svg::Node::getShapeAbsolute |
( |
| ) |
const |
|
inherited |
Returns a Shape2d representing the node in absolute coordinates. Not supported for Text.
const Paint & cinder::svg::Node::getFill |
( |
| ) |
const |
|
inherited |
Returns node's fill, or the first among its ancestors when it has none.
const Paint & cinder::svg::Node::getStroke |
( |
| ) |
const |
|
inherited |
Returns node's stroke, or the first among its ancestors when it has none.
float cinder::svg::Node::getOpacity |
( |
| ) |
const |
|
inherited |
Returns node's opacity, or the first among its ancestors when it has none.
float cinder::svg::Node::getFillOpacity |
( |
| ) |
const |
|
inherited |
Returns node's fill opacity, or the first among its ancestors when it has none.
float cinder::svg::Node::getStrokeOpacity |
( |
| ) |
const |
|
inherited |
Returns node's stroke opacity, or the first among its ancestors when it has none.
FillRule cinder::svg::Node::getFillRule |
( |
| ) |
const |
|
inherited |
Returns node's fill rule, or the first among its ancestors when it has none.
LineCap cinder::svg::Node::getLineCap |
( |
| ) |
const |
|
inherited |
Returns node's line cap, or the first among its ancestors when it has none.
LineJoin cinder::svg::Node::getLineJoin |
( |
| ) |
const |
|
inherited |
Returns node's line join, or the first among its ancestors when it has none.
float cinder::svg::Node::getStrokeWidth |
( |
| ) |
const |
|
inherited |
Returns node's stroke width, or the first among its ancestors when it has none.
const vector< string > & cinder::svg::Node::getFontFamilies |
( |
| ) |
const |
|
inherited |
Returns node's font families, or the first among its ancestors when it has none.
Value cinder::svg::Node::getFontSize |
( |
| ) |
const |
|
inherited |
Returns node's font size, or the first among its ancestors when it has none.
bool cinder::svg::Node::isVisible |
( |
| ) |
const |
|
inherited |
Returns whether this Node is visible, or the first among its ancestors when unspecified.
bool cinder::svg::Node::isDisplayNone |
( |
| ) |
const |
|
inherited |
Returns whether the Display property of this Node is set to 'None', preventing rendering of the node and its children.
void cinder::svg::Node::startRender |
( |
Renderer & |
renderer, |
|
|
const Style & |
style |
|
) |
| const |
|
protectedinherited |
void cinder::svg::Node::finishRender |
( |
Renderer & |
renderer, |
|
|
const Style & |
style |
|
) |
| const |
|
protectedinherited |
Paint cinder::svg::Node::parsePaint |
( |
const char * |
value, |
|
|
bool * |
specified, |
|
|
const Node * |
parentNode |
|
) |
| |
|
staticprotectedinherited |
mat3 cinder::svg::Node::parseTransform |
( |
const std::string & |
value | ) |
|
|
staticprotectedinherited |
bool cinder::svg::Node::parseTransformComponent |
( |
const char ** |
c, |
|
|
mat3 * |
result |
|
) |
| |
|
staticprotectedinherited |
std::string cinder::svg::Node::findStyleValue |
( |
const std::string & |
styleString, |
|
|
const std::string & |
key |
|
) |
| |
|
staticprotectedinherited |
void cinder::svg::Node::parseStyle |
( |
const std::string & |
value | ) |
|
|
protectedinherited |
std::list<Node*> cinder::svg::Group::mChildren |
|
protectedinherited |
std::shared_ptr<Group> cinder::svg::Group::mDefs |
|
protectedinherited |
const Node* cinder::svg::Node::mParent |
|
protectedinherited |
std::string cinder::svg::Node::mId |
|
protectedinherited |
Style cinder::svg::Node::mStyle |
|
protectedinherited |
bool cinder::svg::Node::mSpecifiesTransform |
|
protectedinherited |
mat3 cinder::svg::Node::mTransform |
|
protectedinherited |
bool cinder::svg::Node::mBoundingBoxCached |
|
mutableprotectedinherited |
Rectf cinder::svg::Node::mBoundingBox |
|
mutableprotectedinherited |
The documentation for this class was generated from the following files: