add shape flatten so they work properly in pictures
add flatten/unflatten to matrix
git-svn-id: http://skia.googlecode.com/svn/trunk@242 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/include/core/SkShape.h b/include/core/SkShape.h
index abe4e26..6cee70e 100644
--- a/include/core/SkShape.h
+++ b/include/core/SkShape.h
@@ -9,7 +9,8 @@
class SkShape : public SkFlattenable {
public:
- SkShape() {}
+ SkShape();
+ virtual ~SkShape();
void draw(SkCanvas*);
@@ -24,15 +25,18 @@
void drawMatrix(SkCanvas*, const SkMatrix&);
// overrides
+ virtual Factory getFactory();
virtual void flatten(SkFlattenableWriteBuffer&);
-protected:
- virtual void onDraw(SkCanvas*) = 0;
+ // public for Registrar
+ static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
- SkShape(SkFlattenableReadBuffer&) {}
+protected:
+ virtual void onDraw(SkCanvas*);
+
+ SkShape(SkFlattenableReadBuffer&);
private:
- static SkFlattenable* CreateProc(SkFlattenableReadBuffer&);
typedef SkFlattenable INHERITED;
};