#include <SkGroupShape.h>
Inherits SkShape.
Classes | |
struct | Rec |
Public Member Functions | |
SkGroupShape () | |
virtual | ~SkGroupShape () |
int | countShapes () const |
SkShape * | getShape (int index, SkMatrixRef **=NULL) const |
SkMatrixRef * | getShapeMatrixRef (int index) const |
void | addShape (int index, SkShape *, SkMatrixRef *=NULL) |
void | addShape (int index, SkShape *shape, const SkMatrix &matrix) |
SkShape * | appendShape (SkShape *shape, SkMatrixRef *mr=NULL) |
SkShape * | appendShape (SkShape *shape, const SkMatrix &matrix) |
void | removeShape (int index) |
void | removeAllShapes () |
virtual Factory | getFactory () |
virtual void | flatten (SkFlattenableWriteBuffer &) |
Static Public Member Functions | |
static SkFlattenable * | CreateProc (SkFlattenableReadBuffer &) |
Protected Member Functions | |
virtual void | onDraw (SkCanvas *) |
SkGroupShape (SkFlattenableReadBuffer &) |
Definition at line 67 of file SkGroupShape.h.
SkGroupShape::SkGroupShape | ( | ) |
virtual SkGroupShape::~SkGroupShape | ( | ) | [virtual] |
SkGroupShape::SkGroupShape | ( | SkFlattenableReadBuffer & | ) | [protected] |
Definition at line 100 of file SkGroupShape.h.
void SkGroupShape::addShape | ( | int | index, | |
SkShape * | , | |||
SkMatrixRef * | = NULL | |||
) |
Ref the specified shape, and insert it into the child list at the specified index. If index == countShapes(), then the shape will be appended to the child list, otherwise if index is out of range, the shape is not added. Either way, the shape parameter is returned.
Child shapes are drawn in order, after the parent, so the shape at index 0 will be drawn first, and the shape at index countShapes() - 1 will be drawn last.
Definition at line 113 of file SkGroupShape.h.
SkShape* SkGroupShape::appendShape | ( | SkShape * | shape, | |
SkMatrixRef * | mr = NULL | |||
) | [inline] |
Helper method to append a shape, passing countShapes() for the index
Definition at line 108 of file SkGroupShape.h.
int SkGroupShape::countShapes | ( | ) | const |
Return the number of child shapes in this group
static SkFlattenable* SkGroupShape::CreateProc | ( | SkFlattenableReadBuffer & | ) | [static] |
Reimplemented from SkShape.
virtual void SkGroupShape::flatten | ( | SkFlattenableWriteBuffer & | ) | [virtual] |
Override this to write data specific to your subclass into the buffer, being sure to call your super-class' version first. This data will later be passed to your Factory function, returned by getFactory().
Reimplemented from SkShape.
virtual Factory SkGroupShape::getFactory | ( | ) | [virtual] |
SkShape* SkGroupShape::getShape | ( | int | index, | |
SkMatrixRef ** | = NULL | |||
) | const |
Return the shape at the specified index. Note this does not affect the owner count of the index'd shape. If index is out of range, returns NULL
SkMatrixRef* SkGroupShape::getShapeMatrixRef | ( | int | index | ) | const [inline] |
Helper function to return the matrixref of the specified shape.
Definition at line 83 of file SkGroupShape.h.
void SkGroupShape::removeAllShapes | ( | ) |
Unrefs and removes all of the child shapes
void SkGroupShape::removeShape | ( | int | index | ) |
Unref the specified index, and remove it from the child list. If index is out of range, does nothing.