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

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: remove debug 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
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | include/utils/SkLuaCanvas.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 SaveFlags) SK_OVERRIDE; 79 SaveFlags) SK_OVERRIDE;
80 virtual void restore() SK_OVERRIDE; 80 virtual void restore() SK_OVERRIDE;
81 81
82 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE; 82 virtual bool translate(SkScalar dx, SkScalar dy) SK_OVERRIDE;
83 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE; 83 virtual bool scale(SkScalar sx, SkScalar sy) SK_OVERRIDE;
84 virtual bool rotate(SkScalar degrees) SK_OVERRIDE; 84 virtual bool rotate(SkScalar degrees) SK_OVERRIDE;
85 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE; 85 virtual bool skew(SkScalar sx, SkScalar sy) SK_OVERRIDE;
86 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE; 86 virtual bool concat(const SkMatrix& matrix) SK_OVERRIDE;
87 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE; 87 virtual void setMatrix(const SkMatrix& matrix) SK_OVERRIDE;
88 88
89 virtual bool clipRect(const SkRect&, SkRegion::Op, bool) SK_OVERRIDE;
90 virtual bool clipRRect(const SkRRect&, SkRegion::Op, bool) SK_OVERRIDE;
91 virtual bool clipPath(const SkPath&, SkRegion::Op, bool) SK_OVERRIDE;
92 virtual bool clipRegion(const SkRegion& deviceRgn,
93 SkRegion::Op) SK_OVERRIDE;
94
95 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE; 89 virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
96 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[], 90 virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
97 const SkPaint& paint) SK_OVERRIDE; 91 const SkPaint& paint) SK_OVERRIDE;
98 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 92 virtual void drawOval(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
99 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE; 93 virtual void drawRect(const SkRect&, const SkPaint& paint) SK_OVERRIDE;
100 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE; 94 virtual void drawRRect(const SkRRect&, const SkPaint& paint) SK_OVERRIDE;
101 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE; 95 virtual void drawPath(const SkPath& path, const SkPaint& paint) SK_OVERRIDE;
102 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top, 96 virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
103 const SkPaint* paint) SK_OVERRIDE; 97 const SkPaint* paint) SK_OVERRIDE;
104 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src, 98 virtual void drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* src,
(...skipping 22 matching lines...) Expand all
127 virtual void drawData(const void*, size_t) SK_OVERRIDE; 121 virtual void drawData(const void*, size_t) SK_OVERRIDE;
128 virtual void beginCommentGroup(const char* description) SK_OVERRIDE; 122 virtual void beginCommentGroup(const char* description) SK_OVERRIDE;
129 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE; 123 virtual void addComment(const char* kywd, const char* value) SK_OVERRIDE;
130 virtual void endCommentGroup() SK_OVERRIDE; 124 virtual void endCommentGroup() SK_OVERRIDE;
131 125
132 protected: 126 protected:
133 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE; 127 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&) SK _OVERRIDE;
134 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE; 128 virtual void onPushCull(const SkRect& cullRect) SK_OVERRIDE;
135 virtual void onPopCull() SK_OVERRIDE; 129 virtual void onPopCull() SK_OVERRIDE;
136 130
131 virtual void onClipRect(const SkRect&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
132 virtual void onClipRRect(const SkRRect&, SkRegion::Op, ClipEdgeStyle) SK_OVE RRIDE;
133 virtual void onClipPath(const SkPath&, SkRegion::Op, ClipEdgeStyle) SK_OVERR IDE;
134 virtual void onClipRegion(const SkRegion&, SkRegion::Op) SK_OVERRIDE;
135
136 static const char* EdgeStyleToAAString(ClipEdgeStyle edgeStyle);
137
137 private: 138 private:
138 Dumper* fDumper; 139 Dumper* fDumper;
139 int fNestLevel; // for nesting recursive elements like pictures 140 int fNestLevel; // for nesting recursive elements like pictures
140 141
141 void dump(Verb, const SkPaint*, const char format[], ...); 142 void dump(Verb, const SkPaint*, const char format[], ...);
142 143
143 typedef SkCanvas INHERITED; 144 typedef SkCanvas INHERITED;
144 }; 145 };
145 146
146 /** Formats the draw commands, and send them to a function-pointer provided 147 /** Formats the draw commands, and send them to a function-pointer provided
(...skipping 21 matching lines...) Expand all
168 public: 169 public:
169 SkDebugfDumper(); 170 SkDebugfDumper();
170 171
171 private: 172 private:
172 typedef SkFormatDumper INHERITED; 173 typedef SkFormatDumper INHERITED;
173 }; 174 };
174 175
175 #endif 176 #endif
176 177
177 #endif 178 #endif
OLDNEW
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | include/utils/SkLuaCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698