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

Side by Side Diff: gm/cubicpaths.cpp

Issue 1862753002: cubic stroke fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | src/core/SkStroke.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 "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 canvas->restore(); 406 canvas->restore();
407 } 407 }
408 canvas->restore(); 408 canvas->restore();
409 canvas->restore(); 409 canvas->restore();
410 } 410 }
411 411
412 private: 412 private:
413 typedef skiagm::GM INHERITED; 413 typedef skiagm::GM INHERITED;
414 }; 414 };
415 415
416 DEF_SIMPLE_GM(bug5099, canvas, 50, 50) {
417 SkPaint p;
418 p.setColor(SK_ColorRED);
419 p.setAntiAlias(true);
420 p.setStyle(SkPaint::kStroke_Style);
421 p.setStrokeWidth(10);
422
423 SkPath path;
424 path.moveTo(6, 27);
425 path.cubicTo(31.5f, 1.5f, 3.5f, 4.5f, 29, 29);
426 canvas->drawPath(path, p);
427 }
428
416 ////////////////////////////////////////////////////////////////////////////// 429 //////////////////////////////////////////////////////////////////////////////
417 430
418 DEF_GM( return new CubicPathGM; ) 431 DEF_GM( return new CubicPathGM; )
419 DEF_GM( return new CubicClosePathGM; ) 432 DEF_GM( return new CubicClosePathGM; )
420 DEF_GM( return new ClippedCubicGM; ) 433 DEF_GM( return new ClippedCubicGM; )
421 DEF_GM( return new ClippedCubic2GM; ) 434 DEF_GM( return new ClippedCubic2GM; )
OLDNEW
« no previous file with comments | « no previous file | src/core/SkStroke.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698