SkGroupShape Class Reference

#include <SkGroupShape.h>

Inherits SkShape.

Collaboration diagram for SkGroupShape:
Collaboration graph
[legend]

List of all members.

Classes

struct  Rec

Public Member Functions

 SkGroupShape ()
virtual ~SkGroupShape ()
int countShapes () const
SkShapegetShape (int index, SkMatrixRef **=NULL) const
SkMatrixRefgetShapeMatrixRef (int index) const
void addShape (int index, SkShape *, SkMatrixRef *=NULL)
void addShape (int index, SkShape *shape, const SkMatrix &matrix)
SkShapeappendShape (SkShape *shape, SkMatrixRef *mr=NULL)
SkShapeappendShape (SkShape *shape, const SkMatrix &matrix)
void removeShape (int index)
void removeAllShapes ()
virtual Factory getFactory ()
virtual void flatten (SkFlattenableWriteBuffer &)

Static Public Member Functions

static SkFlattenableCreateProc (SkFlattenableReadBuffer &)

Protected Member Functions

virtual void onDraw (SkCanvas *)
 SkGroupShape (SkFlattenableReadBuffer &)

Detailed Description

Definition at line 67 of file SkGroupShape.h.


Constructor & Destructor Documentation

SkGroupShape::SkGroupShape (  ) 
virtual SkGroupShape::~SkGroupShape (  )  [virtual]
SkGroupShape::SkGroupShape ( SkFlattenableReadBuffer  )  [protected]

Member Function Documentation

void SkGroupShape::addShape ( int  index,
SkShape shape,
const SkMatrix matrix 
) [inline]

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.

SkShape* SkGroupShape::appendShape ( SkShape shape,
const SkMatrix matrix 
) [inline]

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]

Implement this to return a factory function pointer that can be called to recreate your class given a buffer (previously written to by your override of flatten().

Reimplemented from SkShape.

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.

virtual void SkGroupShape::onDraw ( SkCanvas  )  [protected, virtual]

Reimplemented from SkShape.

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.


The documentation for this class was generated from the following file:

Generated on Tue Oct 20 11:03:42 2009 for Skia by  doxygen 1.6.1