8 #ifndef SkDrawable_DEFINED
9 #define SkDrawable_DEFINED
11 #include "SkFlattenable.h"
67 virtual SkRect onGetBounds() = 0;
79 int32_t fGenerationID;
void notifyDrawingChanged()
Calling this invalidates the previous generation ID, and causes a new one to be computed the next tim...
void draw(SkCanvas *, const SkMatrix *=NULL)
Draws into the specified content.
A Canvas encapsulates all of the state about drawing into a device (bitmap).
Definition: SkCanvas.h:59
The SkMatrix class holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:28
Factory getFactory() const override
Implement this to return a factory function pointer that can be called to recreate your class given a...
Definition: SkDrawable.h:64
An SkPicture records drawing commands made to a canvas to be played back at a later time...
Definition: SkPicture.h:38
SkFlattenable is the base class for objects that need to be flattened into a data stream for either t...
Definition: SkFlattenable.h:70
Base-class for objects that draw into SkCanvas.
Definition: SkDrawable.h:26
uint32_t getGenerationID()
Return a unique value for this instance.
SkRect getBounds()
Return the (conservative) bounds of what the drawable will draw.
virtual SkPicture * onNewPictureSnapshot()
Default implementation calls onDraw() with a canvas that records into a picture.