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

Side by Side Diff: gm/verttext.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 | « gm/vertices.cpp ('k') | gm/verttext2.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 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #include "gm.h" 9 #include "gm.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 SkPaint p; 63 SkPaint p;
64 p.setAntiAlias(true); 64 p.setAntiAlias(true);
65 p.setColor(0x80FF0000); 65 p.setColor(0x80FF0000);
66 canvas->drawLine(x, y, 66 canvas->drawLine(x, y,
67 paint.isVerticalText() ? x : x + total, 67 paint.isVerticalText() ? x : x + total,
68 paint.isVerticalText() ? y + total : y, 68 paint.isVerticalText() ? y + total : y,
69 p); 69 p);
70 70
71 p.setColor(0xFF0000FF); 71 p.setColor(0xFF0000FF);
72 SkScalar adv[gLen]; 72 SkScalar adv[gLen];
73 int numChars = paint.getTextWidths(gText, gLen, adv, NULL); 73 int numChars = paint.getTextWidths(gText, gLen, adv, nullptr);
74 for (int i = 0; i < numChars; ++i) { 74 for (int i = 0; i < numChars; ++i) {
75 canvas->drawCircle(x, y, SK_Scalar1 * 3 / 2, p); 75 canvas->drawCircle(x, y, SK_Scalar1 * 3 / 2, p);
76 if (paint.isVerticalText()) { 76 if (paint.isVerticalText()) {
77 y += adv[i]; 77 y += adv[i];
78 } else { 78 } else {
79 x += adv[i]; 79 x += adv[i];
80 } 80 }
81 } 81 }
82 canvas->drawCircle(x, y, SK_Scalar1 * 3 / 2, p); 82 canvas->drawCircle(x, y, SK_Scalar1 * 3 / 2, p);
83 } 83 }
(...skipping 27 matching lines...) Expand all
111 private: 111 private:
112 typedef GM INHERITED; 112 typedef GM INHERITED;
113 }; 113 };
114 114
115 /////////////////////////////////////////////////////////////////////////////// 115 ///////////////////////////////////////////////////////////////////////////////
116 116
117 static GM* MyFactory(void*) { return new VertTextGM; } 117 static GM* MyFactory(void*) { return new VertTextGM; }
118 static GMRegistry reg(MyFactory); 118 static GMRegistry reg(MyFactory);
119 119
120 } 120 }
OLDNEW
« no previous file with comments | « gm/vertices.cpp ('k') | gm/verttext2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698