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

Side by Side Diff: gm/pathfill.cpp

Issue 1548643002: revised strokerect gm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: handle halfway case in scan converter Created 5 years 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/composeshader.cpp ('k') | gm/strokerect.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 #include "gm.h" 8 #include "gm.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 canvas->restore(); 206 canvas->restore();
207 canvas->translate(SkIntToScalar(110), 0); 207 canvas->translate(SkIntToScalar(110), 0);
208 } 208 }
209 } 209 }
210 } 210 }
211 211
212 private: 212 private:
213 typedef skiagm::GM INHERITED; 213 typedef skiagm::GM INHERITED;
214 }; 214 };
215 215
216 DEF_SIMPLE_GM(halfpathfill, canvas, 100, 100) {
217 SkPaint paint;
218 SkPath path;
219 path.moveTo(16365.5f, 1394);
220 path.lineTo(16365.5f, 1387.5f);
221 path.quadTo(16365.5f, 1385.43f, 16367, 1383.96f);
222 path.quadTo(16368.4f, 1382.5f, 16370.5f, 1382.5f);
223 path.lineTo(16465.5f, 1382.5f);
224 path.quadTo(16467.6f, 1382.5f, 16469, 1383.96f);
225 path.quadTo(16470.5f, 1385.43f, 16470.5f, 1387.5f);
226 path.lineTo(16470.5f, 1394);
227 path.quadTo(16470.5f, 1396.07f, 16469, 1397.54f);
228 path.quadTo(16467.6f, 1399, 16465.5f, 1399);
229 path.lineTo(16370.5f, 1399);
230 path.quadTo(16368.4f, 1399, 16367, 1397.54f);
231 path.quadTo(16365.5f, 1396.07f, 16365.5f, 1394);
232 path.close();
233 SkPath p2;
234 SkMatrix m;
235 m.reset();
236 m.postTranslate(0.001f, 0.001f);
237 path.transform(m, &p2);
238
239 canvas->translate(-16366, -1383);
240 canvas->drawPath(p2, paint);
241
242 m.reset();
243 m.postTranslate(-0.001f, -0.001f);
244 path.transform(m, &p2);
245 canvas->drawPath(p2, paint);
246
247 m.reset();
248 path.transform(m, &p2);
249 canvas->drawPath(p2, paint);
250 }
251
216 /////////////////////////////////////////////////////////////////////////////// 252 ///////////////////////////////////////////////////////////////////////////////
217 253
218 DEF_GM( return new PathFillGM; ) 254 DEF_GM( return new PathFillGM; )
219 DEF_GM( return new PathInverseFillGM; ) 255 DEF_GM( return new PathInverseFillGM; )
OLDNEW
« no previous file with comments | « gm/composeshader.cpp ('k') | gm/strokerect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698