Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: include/utils/SkDumpCanvas.h

Issue 183453002: add new onClip* methods to SkCanvas (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: more cleanup Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #ifndef SkDumpCanvas_DEFINED 8 #ifndef SkDumpCanvas_DEFINED
9 #define SkDumpCanvas_DEFINED 9 #define SkDumpCanvas_DEFINED
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 SaveFlags) SK_OVERRIDE; 77 SaveFlags) SK_OVERRIDE;
78 virtual void restore() SK_OVERRIDE; 78 virtual void restore() SK_OVERRIDE;
79 79
80 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; 80 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
81 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; 81 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
82 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; 82 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
83 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; 83 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
84 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; 84 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
85 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 85 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
86 86
87 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE;
88 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE;
89 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE;
90 virtual bool clipRegion(const SkRegion& deviceRgn,
91 SkRegion::Op) SK_OVERRIDE;
92
93 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 87 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
94 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 88 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
95 const SkPaint& paint) SK_OVERRIDE; 89 const SkPaint& paint) SK_OVERRIDE;
96 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 90 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
97 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 91 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
98 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 92 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
99 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; 93 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
100 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 94 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
101 const SkPaint* paint) SK_OVERRIDE; 95 const SkPaint* paint) SK_OVERRIDE;
102 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 96 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
(...skipping 20 matching lines...) Expand all
123 const uint16_t indices[], int indexCount, 117 const uint16_t indices[], int indexCount,
124 const SkPaint& paint) SK_OVERRIDE; 118 const SkPaint& paint) SK_OVERRIDE;
125 virtual void drawData(const void*, size_t) SK_OVERRIDE; 119 virtual void drawData(const void*, size_t) SK_OVERRIDE;
126 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 120 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
127 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 121 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
128 virtual void endCommentGroup() SK_OVERRIDE; 122 virtual void endCommentGroup() SK_OVERRIDE;
129 123
130 protected: 124 protected:
131 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 125 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
132 126
127 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
128 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
129 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
130 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
131
132 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle);
133
133 private: 134 private:
134 Dumper* fDumper; 135 Dumper* fDumper;
135 int fNestLevel; // for nesting recursive elements like pictures 136 int fNestLevel; // for nesting recursive elements like pictures
136 137
137 void dump(Verb, const SkPaint*, const char format[], ...); 138 void dump(Verb, const SkPaint*, const char format[], ...);
138 139
139 typedef SkCanvas INHERITED; 140 typedef SkCanvas INHERITED;
140 }; 141 };
141 142
142 /** Formats the draw commands, and send them to a function-pointer provided 143 /** Formats the draw commands, and send them to a function-pointer provided
(...skipping 21 matching lines...) Expand all
164 public: 165 public:
165 SkDebugfDumper(); 166 SkDebugfDumper();
166 167
167 private: 168 private:
168 typedef SkFormatDumper INHERITED; 169 typedef SkFormatDumper INHERITED;
169 }; 170 };
170 171
171 #endif 172 #endif
172 173
173 #endif 174 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698