OLD | NEW |
(Empty) | |
| 1 #ifndef EXPERIMENTAL_PDFVIEWER_SKNULCANVAS_H_ |
| 2 #define EXPERIMENTAL_PDFVIEWER_SKNULCANVAS_H_ |
| 3 |
| 4 #include "SkCanvas.h" |
| 5 |
| 6 class SK_API SkNulCanvas : public SkCanvas { |
| 7 public: |
| 8 SK_DECLARE_INST_COUNT(SkNulCanvas); |
| 9 |
| 10 SkNulCanvas() {} |
| 11 explicit SkNulCanvas(SkDevice* device) : SkCanvas(device) {} |
| 12 |
| 13 explicit SkNulCanvas(const SkBitmap& bitmap) : SkCanvas(bitmap) {} |
| 14 virtual ~SkNulCanvas() {} |
| 15 |
| 16 virtual int save(SaveFlags flags = kMatrixClip_SaveFlag) {return 0;} |
| 17 virtual int saveLayer(const SkRect* bounds, const SkPaint* paint, |
| 18 SaveFlags flags = kARGB_ClipLayer_SaveFlag) {return 0;
} |
| 19 int saveLayerAlpha(const SkRect* bounds, U8CPU alpha, |
| 20 SaveFlags flags = kARGB_ClipLayer_SaveFlag) {return 0;} |
| 21 virtual void restore() {} |
| 22 int getSaveCount() const {return 0;} |
| 23 virtual bool isDrawingToLayer() const {return false;} |
| 24 virtual bool translate(SkScalar dx, SkScalar dy) {return true;} |
| 25 virtual bool scale(SkScalar sx, SkScalar sy) {return true;} |
| 26 virtual bool rotate(SkScalar degrees) {return true;} |
| 27 virtual bool skew(SkScalar sx, SkScalar sy) {return true;} |
| 28 virtual bool concat(const SkMatrix& matrix) {return true;} |
| 29 virtual void setMatrix(const SkMatrix& matrix) {} |
| 30 virtual bool clipRect(const SkRect& rect, |
| 31 SkRegion::Op op = SkRegion::kIntersect_Op, |
| 32 bool doAntiAlias = false) {return true;} |
| 33 virtual bool clipRRect(const SkRRect& rrect, |
| 34 SkRegion::Op op = SkRegion::kIntersect_Op, |
| 35 bool doAntiAlias = false) {return true;} |
| 36 virtual bool clipPath(const SkPath& path, |
| 37 SkRegion::Op op = SkRegion::kIntersect_Op, |
| 38 bool doAntiAlias = false) {return true;} |
| 39 virtual bool clipRegion(const SkRegion& deviceRgn, |
| 40 SkRegion::Op op = SkRegion::kIntersect_Op) {return t
rue;} |
| 41 virtual void clear(SkColor) {} |
| 42 virtual void drawPaint(const SkPaint& paint) {} |
| 43 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], |
| 44 const SkPaint& paint) {} |
| 45 virtual void drawRect(const SkRect& rect, const SkPaint& paint) {} |
| 46 virtual void drawOval(const SkRect& oval, const SkPaint&) {} |
| 47 virtual void drawRRect(const SkRRect& rrect, const SkPaint& paint) {} |
| 48 virtual void drawPath(const SkPath& path, const SkPaint& paint) {} |
| 49 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, |
| 50 const SkPaint* paint = NULL) {} |
| 51 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, |
| 52 const SkRect& dst, |
| 53 const SkPaint* paint) {} |
| 54 virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m, |
| 55 const SkPaint* paint = NULL) {} |
| 56 virtual void drawBitmapNine(const SkBitmap& bitmap, const SkIRect& center, |
| 57 const SkRect& dst, const SkPaint* paint = NULL)
{} |
| 58 virtual void drawSprite(const SkBitmap& bitmap, int left, int top, |
| 59 const SkPaint* paint = NULL) {} |
| 60 virtual void drawText(const void* text, size_t byteLength, SkScalar x, |
| 61 SkScalar y, const SkPaint& paint) {} |
| 62 virtual void drawPosText(const void* text, size_t byteLength, |
| 63 const SkPoint pos[], const SkPaint& paint) {} |
| 64 virtual void drawPosTextH(const void* text, size_t byteLength, |
| 65 const SkScalar xpos[], SkScalar constY, |
| 66 const SkPaint& paint) {} |
| 67 virtual void drawTextOnPath(const void* text, size_t byteLength, |
| 68 const SkPath& path, const SkMatrix* matrix, |
| 69 const SkPaint& paint) {} |
| 70 virtual void drawPicture(SkPicture& picture) {} |
| 71 virtual void drawVertices(VertexMode vmode, int vertexCount, |
| 72 const SkPoint vertices[], const SkPoint texs[], |
| 73 const SkColor colors[], SkXfermode* xmode, |
| 74 const uint16_t indices[], int indexCount, |
| 75 const SkPaint& paint) {} |
| 76 virtual void drawData(const void* data, size_t length) {} |
| 77 virtual void beginCommentGroup(const char* description) {} |
| 78 virtual void addComment(const char* kywd, const char* value) {} |
| 79 virtual void endCommentGroup() {} |
| 80 virtual SkBounder* setBounder(SkBounder* bounder) {return NULL;} |
| 81 virtual SkDrawFilter* setDrawFilter(SkDrawFilter* filter) {return NULL;} |
| 82 |
| 83 protected: |
| 84 virtual SkCanvas* canvasForDrawIter() {return NULL;} |
| 85 virtual SkDevice* setDevice(SkDevice* device) {return NULL;} |
| 86 |
| 87 private: |
| 88 typedef SkCanvas INHERITED; |
| 89 }; |
| 90 |
| 91 #endif // EXPERIMENTAL_PDFVIEWER_SKNULCANVAS_H_ |
OLD | NEW |