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

Side by Side Diff: samplecode/Sample2PtRadial.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/OverView.cpp ('k') | samplecode/SampleAARectModes.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 #include "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 16 matching lines...) Expand all
27 27
28 virtual void onDrawContent(SkCanvas* canvas) { 28 virtual void onDrawContent(SkCanvas* canvas) {
29 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); 29 canvas->translate(SkIntToScalar(10), SkIntToScalar(20));
30 30
31 SkColor colors[] = { SK_ColorRED, SK_ColorBLUE }; 31 SkColor colors[] = { SK_ColorRED, SK_ColorBLUE };
32 SkPoint c0 = { 0, 0 }; 32 SkPoint c0 = { 0, 0 };
33 SkScalar r0 = 100; 33 SkScalar r0 = 100;
34 SkPoint c1 = { 100, 100 }; 34 SkPoint c1 = { 100, 100 };
35 SkScalar r1 = 100; 35 SkScalar r1 = 100;
36 SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, co lors, 36 SkShader* s = SkGradientShader::CreateTwoPointConical(c0, r0, c1, r1, co lors,
37 NULL, 2, 37 nullptr, 2,
38 SkShader::kClamp_Ti leMode); 38 SkShader::kClamp_Ti leMode);
39 39
40 SkPaint paint; 40 SkPaint paint;
41 paint.setShader(s)->unref(); 41 paint.setShader(s)->unref();
42 canvas->drawPaint(paint); 42 canvas->drawPaint(paint);
43 } 43 }
44 44
45 private: 45 private:
46 typedef SampleView INHERITED; 46 typedef SampleView INHERITED;
47 }; 47 };
48 48
49 ////////////////////////////////////////////////////////////////////////////// 49 //////////////////////////////////////////////////////////////////////////////
50 50
51 static SkView* MyFactory() { return new TwoPtConicalView; } 51 static SkView* MyFactory() { return new TwoPtConicalView; }
52 static SkViewRegister reg(MyFactory); 52 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/OverView.cpp ('k') | samplecode/SampleAARectModes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698