Flutter Engine
The Flutter Engine
|
#include <SkSVGDOM.h>
Classes | |
class | Builder |
Public Member Functions | |
SkSVGSVG * | getRoot () const |
void | setContainerSize (const SkSize &) |
const SkSize & | containerSize () const |
sk_sp< SkSVGNode > * | findNodeById (const char *id) |
void | render (SkCanvas *) const |
void | renderNode (SkCanvas *, SkSVGPresentationContext &, const char *id) const |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Member Functions | |
static sk_sp< SkSVGDOM > | MakeFromStream (SkStream &str) |
Definition at line 26 of file SkSVGDOM.h.
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.
Definition at line 493 of file SkSVGDOM.cpp.
Definition at line 502 of file SkSVGDOM.cpp.
|
inline |
Returns the root (outermost) SVG element.
Definition at line 64 of file SkSVGDOM.h.
Definition at line 57 of file SkSVGDOM.h.
void SkSVGDOM::render | ( | SkCanvas * | canvas | ) | const |
Definition at line 460 of file SkSVGDOM.cpp.
void SkSVGDOM::renderNode | ( | SkCanvas * | canvas, |
SkSVGPresentationContext & | pctx, | ||
const char * | id | ||
) | const |
Render the node with the given id as if it were the only child of the root.
Definition at line 476 of file SkSVGDOM.cpp.
void SkSVGDOM::setContainerSize | ( | const SkSize & | containerSize | ) |
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.
Definition at line 497 of file SkSVGDOM.cpp.