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

Side by Side Diff: gm/glyph_pos.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/giantbitmap.cpp ('k') | gm/glyph_pos_align.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 2014 Google Inc. 2 * Copyright 2014 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 #include "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 } 131 }
132 132
133 // Black text is the testcase, eg. the text. 133 // Black text is the testcase, eg. the text.
134 paint.setColor(SK_ColorBLACK); 134 paint.setColor(SK_ColorBLACK);
135 paint.setStrokeWidth(fStrokeWidth); 135 paint.setStrokeWidth(fStrokeWidth);
136 paint.setStyle(fStrokeStyle); 136 paint.setStyle(fStrokeStyle);
137 canvas->drawText(kText, sizeof(kText) - 1, 0.0f, 0.0f, paint); 137 canvas->drawText(kText, sizeof(kText) - 1, 0.0f, 0.0f, paint);
138 138
139 if (drawRef) { 139 if (drawRef) {
140 SkScalar widths[sizeof(kText) - 1]; 140 SkScalar widths[sizeof(kText) - 1];
141 paint.getTextWidths(kText, sizeof(kText) - 1, widths, NULL); 141 paint.getTextWidths(kText, sizeof(kText) - 1, widths, nullptr);
142 142
143 paint.setStrokeWidth(0.0f); 143 paint.setStrokeWidth(0.0f);
144 paint.setStyle(SkPaint::kStroke_Style); 144 paint.setStyle(SkPaint::kStroke_Style);
145 145
146 // Magenta lines are the positions for the characters. 146 // Magenta lines are the positions for the characters.
147 paint.setColor(SK_ColorMAGENTA); 147 paint.setColor(SK_ColorMAGENTA);
148 SkScalar w = bounds.x(); 148 SkScalar w = bounds.x();
149 for (size_t i = 0; i < sizeof(kText) - 1; ++i) { 149 for (size_t i = 0; i < sizeof(kText) - 1; ++i) {
150 canvas->drawLine(w, 0.0f, w, 5.0f, paint); 150 canvas->drawLine(w, 0.0f, w, 5.0f, paint);
151 w += widths[i]; 151 w += widths[i];
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 183
184 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory); 184 static GMRegistry reg1(GlyphPosHairlineStrokeAndFillFactory);
185 static GMRegistry reg2(GlyphPosStrokeAndFillFactory); 185 static GMRegistry reg2(GlyphPosStrokeAndFillFactory);
186 static GMRegistry reg3(GlyphPosHairlineStrokeFactory); 186 static GMRegistry reg3(GlyphPosHairlineStrokeFactory);
187 static GMRegistry reg4(GlyphPosStrokeFactory); 187 static GMRegistry reg4(GlyphPosStrokeFactory);
188 static GMRegistry reg5(GlyphPosHairlineFillFactory); 188 static GMRegistry reg5(GlyphPosHairlineFillFactory);
189 static GMRegistry reg6(GlyphPosFillFactory); 189 static GMRegistry reg6(GlyphPosFillFactory);
190 190
191 191
192 } 192 }
OLDNEW
« no previous file with comments | « gm/giantbitmap.cpp ('k') | gm/glyph_pos_align.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698