![]() |
Skia
2D Graphics Library
|
#include <SkSVGDOM.h>

Classes | |
| class | Builder |
Public Member Functions | |
| SkSVGSVG * | getRoot () const |
| Returns the root (outermost) SVG element. More... | |
| void | setContainerSize (const SkSize &) |
| Specify a "container size" for the SVG dom. More... | |
| const SkSize & | containerSize () const |
| DEPRECATED: use getRoot()->intrinsicSize() to query the root element intrinsic size. More... | |
| sk_sp< SkSVGNode > * | findNodeById (const char *id) |
| void | render (SkCanvas *) const |
| void | renderNode (SkCanvas *, SkSVGPresentationContext &, const char *id) const |
| Render the node with the given id as if it were the only child of the root. More... | |
| bool | unique () const |
| May return true if the caller is the only owner. More... | |
| void | ref () const |
| Increment the reference count. More... | |
| void | unref () const |
| Decrement the reference count. More... | |
Static Public Member Functions | |
| static sk_sp< SkSVGDOM > | MakeFromStream (SkStream &str) |
| const SkSize& SkSVGDOM::containerSize | ( | ) | const |
DEPRECATED: use getRoot()->intrinsicSize() to query the root element intrinsic size.
Returns the SVG dom container size.
If the client specified a container size via setContainerSize(), then the same size is returned.
When unspecified by clients, this returns the intrinsic size of the root element, as defined by its width/height attributes. If either width or height is specified in relative units (e.g. "100%"), then the corresponding intrinsic size dimension is zero.
|
inline |
Returns the root (outermost) SVG element.
|
inlineinherited |
Increment the reference count.
Must be balanced by a call to unref().
| void SkSVGDOM::render | ( | SkCanvas * | ) | const |
| void SkSVGDOM::renderNode | ( | SkCanvas * | , |
| SkSVGPresentationContext & | , | ||
| const char * | id | ||
| ) | const |
Render the node with the given id as if it were the only child of the root.
| void SkSVGDOM::setContainerSize | ( | const SkSize & | ) |
Specify a "container size" for the SVG dom.
This is used to resolve the initial viewport when the root SVG width/height are specified in relative units.
If the root dimensions are in absolute units, then the container size has no effect since the initial viewport is fixed.
|
inlineinherited |
May return true if the caller is the only owner.
Ensures that all previous owner's actions are complete.
|
inlineinherited |
Decrement the reference count.
If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.