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

Unified Diff: samplecode/SampleAll.cpp

Issue 822953003: Revert of remove unused SkAvoidXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samplecode/ClockFaceView.cpp ('k') | samplecode/SampleAvoid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleAll.cpp
diff --git a/samplecode/SampleAll.cpp b/samplecode/SampleAll.cpp
index 16c79c9dbfe3bb2b5e7f53cf3aa6b402cf5f6f6f..537659e0e612d3b6b69893bcbeb74b3d62340f9c 100644
--- a/samplecode/SampleAll.cpp
+++ b/samplecode/SampleAll.cpp
@@ -11,6 +11,7 @@
#include "SkView.h"
#include "Sk1DPathEffect.h"
#include "Sk2DPathEffect.h"
+#include "SkAvoidXfermode.h"
#include "SkBlurMaskFilter.h"
#include "SkColorFilter.h"
#include "SkColorPriv.h"
@@ -572,6 +573,18 @@
}
canvas->restore();
+
+ if (1) {
+ SkAutoTUnref<SkAvoidXfermode> mode(SkAvoidXfermode::Create(SK_ColorWHITE, 0xFF,
+ SkAvoidXfermode::kTargetColor_Mode));
+ SkPaint paint;
+ x += SkIntToScalar(20);
+ SkRect r = { x, 0, x + SkIntToScalar(360), SkIntToScalar(700) };
+ paint.setXfermode(mode);
+ paint.setColor(SK_ColorGREEN);
+ paint.setAntiAlias(true);
+ canvas->drawOval(r, paint);
+ }
}
private:
« no previous file with comments | « samplecode/ClockFaceView.cpp ('k') | samplecode/SampleAvoid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698