aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/utils/SkNWayCanvas.cpp
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-12 19:02:53 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-12 19:02:53 +0000
commit68d61ed83ec7b6e98e9623c2f5c9e7b1a32d25bb (patch)
tree1462843b0770736314438d38676b3dd542bd9d1a /src/utils/SkNWayCanvas.cpp
parent8cdf0f52ff395d4053f7ed5c20861c42eba25d31 (diff)
make RRect and Oval first-class drawing primitives in SkCanvas.
add RRect as a first-class clip primitive. Review URL: https://codereview.appspot.com/6923058 git-svn-id: http://skia.googlecode.com/svn/trunk@6762 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/utils/SkNWayCanvas.cpp')
-rw-r--r--src/utils/SkNWayCanvas.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/utils/SkNWayCanvas.cpp b/src/utils/SkNWayCanvas.cpp
index 3b781631a3..d59d559328 100644
--- a/src/utils/SkNWayCanvas.cpp
+++ b/src/utils/SkNWayCanvas.cpp
@@ -144,6 +144,14 @@ bool SkNWayCanvas::clipRect(const SkRect& rect, SkRegion::Op op, bool doAA) {
return this->INHERITED::clipRect(rect, op, doAA);
}
+bool SkNWayCanvas::clipRRect(const SkRRect& rrect, SkRegion::Op op, bool doAA) {
+ Iter iter(fList);
+ while (iter.next()) {
+ iter->clipRRect(rrect, op, doAA);
+ }
+ return this->INHERITED::clipRRect(rrect, op, doAA);
+}
+
bool SkNWayCanvas::clipPath(const SkPath& path, SkRegion::Op op, bool doAA) {
Iter iter(fList);
while (iter.next()) {
@@ -175,6 +183,13 @@ void SkNWayCanvas::drawPoints(PointMode mode, size_t count, const SkPoint pts[],
}
}
+void SkNWayCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
+ Iter iter(fList);
+ while (iter.next()) {
+ iter->drawOval(rect, paint);
+ }
+}
+
void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
Iter iter(fList);
while (iter.next()) {
@@ -182,6 +197,13 @@ void SkNWayCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
}
}
+void SkNWayCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
+ Iter iter(fList);
+ while (iter.next()) {
+ iter->drawRRect(rrect, paint);
+ }
+}
+
void SkNWayCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
Iter iter(fList);
while (iter.next()) {