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

Side by Side Diff: samplecode/SamplePath.cpp

Issue 1813553005: switch patheffects over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: try to fix xpsdevice Created 4 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
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | samplecode/SamplePathEffects.cpp » ('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 8
9 #include "SampleCode.h" 9 #include "SampleCode.h"
10 #include "SkAnimTimer.h" 10 #include "SkAnimTimer.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 const SkScalar rad = 50; 247 const SkScalar rad = 50;
248 248
249 fPtsPaint.setAntiAlias(true); 249 fPtsPaint.setAntiAlias(true);
250 fPtsPaint.setStrokeWidth(15); 250 fPtsPaint.setStrokeWidth(15);
251 fPtsPaint.setStrokeCap(SkPaint::kRound_Cap); 251 fPtsPaint.setStrokeCap(SkPaint::kRound_Cap);
252 252
253 fArcToPaint.setAntiAlias(true); 253 fArcToPaint.setAntiAlias(true);
254 fArcToPaint.setStyle(SkPaint::kStroke_Style); 254 fArcToPaint.setStyle(SkPaint::kStroke_Style);
255 fArcToPaint.setStrokeWidth(9); 255 fArcToPaint.setStrokeWidth(9);
256 fArcToPaint.setColor(0x800000FF); 256 fArcToPaint.setColor(0x800000FF);
257 fArcToPaint.setPathEffect(SkArcToPathEffect::Create(rad))->unref(); 257 fArcToPaint.setPathEffect(SkArcToPathEffect::Make(rad));
258 258
259 fCornerPaint.setAntiAlias(true); 259 fCornerPaint.setAntiAlias(true);
260 fCornerPaint.setStyle(SkPaint::kStroke_Style); 260 fCornerPaint.setStyle(SkPaint::kStroke_Style);
261 fCornerPaint.setStrokeWidth(13); 261 fCornerPaint.setStrokeWidth(13);
262 fCornerPaint.setColor(SK_ColorGREEN); 262 fCornerPaint.setColor(SK_ColorGREEN);
263 fCornerPaint.setPathEffect(SkCornerPathEffect::Create(rad*2))->unref(); 263 fCornerPaint.setPathEffect(SkCornerPathEffect::Make(rad*2));
264 264
265 fSkeletonPaint.setAntiAlias(true); 265 fSkeletonPaint.setAntiAlias(true);
266 fSkeletonPaint.setStyle(SkPaint::kStroke_Style); 266 fSkeletonPaint.setStyle(SkPaint::kStroke_Style);
267 fSkeletonPaint.setColor(SK_ColorRED); 267 fSkeletonPaint.setColor(SK_ColorRED);
268 } 268 }
269 269
270 void toggle(bool& value) { 270 void toggle(bool& value) {
271 value = !value; 271 value = !value;
272 this->inval(nullptr); 272 this->inval(nullptr);
273 } 273 }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 } 341 }
342 return this->INHERITED::onFindClickHandler(x, y, modi); 342 return this->INHERITED::onFindClickHandler(x, y, modi);
343 } 343 }
344 344
345 private: 345 private:
346 typedef SampleView INHERITED; 346 typedef SampleView INHERITED;
347 }; 347 };
348 DEF_SAMPLE( return new ArcToView; ) 348 DEF_SAMPLE( return new ArcToView; )
349 349
OLDNEW
« no previous file with comments | « samplecode/SampleFilterFuzz.cpp ('k') | samplecode/SamplePathEffects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698