0456e0b7b8
http://codereview.appspot.com/6355043/ git-svn-id: http://skia.googlecode.com/svn/trunk@4359 2bbb7eff-a529-9590-31e7-b0007b416f81
49 lines
964 B
C++
49 lines
964 B
C++
|
|
/*
|
|
* Copyright 2011 Google Inc.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
#ifndef SkShape_DEFINED
|
|
#define SkShape_DEFINED
|
|
|
|
#include "SkFlattenable.h"
|
|
|
|
class SkCanvas;
|
|
class SkMatrix;
|
|
class SkWStream;
|
|
|
|
class SkShape : public SkFlattenable {
|
|
public:
|
|
SK_DECLARE_INST_COUNT(SkShape)
|
|
|
|
SkShape();
|
|
virtual ~SkShape();
|
|
|
|
void draw(SkCanvas*);
|
|
|
|
/** Draw the shape translated by (dx,dy), which is applied before the
|
|
shape's matrix (if any).
|
|
*/
|
|
void drawXY(SkCanvas*, SkScalar dx, SkScalar dy);
|
|
|
|
/** Draw the shape with the specified matrix, applied before the shape's
|
|
matrix (if any).
|
|
*/
|
|
void drawMatrix(SkCanvas*, const SkMatrix&);
|
|
|
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkShape)
|
|
|
|
protected:
|
|
virtual void onDraw(SkCanvas*);
|
|
|
|
SkShape(SkFlattenableReadBuffer&);
|
|
|
|
private:
|
|
|
|
typedef SkFlattenable INHERITED;
|
|
};
|
|
|
|
#endif
|