8 #ifndef SkDrawable_DEFINED
9 #define SkDrawable_DEFINED
11 #include "SkFlattenable.h"
66 virtual SkRect onGetBounds() = 0;
78 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:58
The SkMatrix class holds a 3x3 matrix for transforming coordinates.
Definition: SkMatrix.h:26
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:63
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:25
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.