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

Side by Side Diff: samplecode/SampleDash.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/SampleCull.cpp ('k') | samplecode/SampleDither.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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 for (size_t i = 0; i < SK_ARRAY_COUNT(gStr); i++) { 66 for (size_t i = 0; i < SK_ARRAY_COUNT(gStr); i++) {
67 SkScalar interval[12]; 67 SkScalar interval[12];
68 size_t len = SkMin32(strlen(gStr[i]), SK_ARRAY_COUNT(interval)); 68 size_t len = SkMin32(strlen(gStr[i]), SK_ARRAY_COUNT(interval));
69 for (size_t j = 0; j < len; j++) { 69 for (size_t j = 0; j < len; j++) {
70 interval[j] = SkIntToScalar(gStr[i][j] - '0'); 70 interval[j] = SkIntToScalar(gStr[i][j] - '0');
71 } 71 }
72 72
73 SkDashPathEffect dash(interval, len, 0); 73 SkDashPathEffect dash(interval, len, 0);
74 paint.setPathEffect(&dash); 74 paint.setPathEffect(&dash);
75 canvas->drawLine(x0, y0, x1, y0, paint); 75 canvas->drawLine(x0, y0, x1, y0, paint);
76 paint.setPathEffect(NULL); 76 paint.setPathEffect(nullptr);
77 77
78 y0 += paint.getStrokeWidth() * 3; 78 y0 += paint.getStrokeWidth() * 3;
79 } 79 }
80 80
81 setBitmapDash(&paint, 3); 81 setBitmapDash(&paint, 3);
82 canvas->drawLine(x0, y0, x1, y0, paint); 82 canvas->drawLine(x0, y0, x1, y0, paint);
83 } 83 }
84 84
85 private: 85 private:
86 typedef SampleView INHERITED; 86 typedef SampleView INHERITED;
87 }; 87 };
88 88
89 ////////////////////////////////////////////////////////////////////////////// 89 //////////////////////////////////////////////////////////////////////////////
90 90
91 static SkView* MyFactory() { return new DashView; } 91 static SkView* MyFactory() { return new DashView; }
92 static SkViewRegister reg(MyFactory); 92 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleCull.cpp ('k') | samplecode/SampleDither.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698