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

Side by Side Diff: tests/StrokeTest.cpp

Issue 1073473002: change isNestedRect to isNestedFillRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix lua Created 5 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 | « tests/PathTest.cpp ('k') | tools/lua/scrape.lua » ('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 2012 Google Inc. 2 * Copyright 2012 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 "SkPaint.h" 8 #include "SkPaint.h"
9 #include "SkPath.h" 9 #include "SkPath.h"
10 #include "SkRect.h" 10 #include "SkRect.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 paint.setStrokeJoin(joins[i]); 67 paint.setStrokeJoin(joins[i]);
68 68
69 SkPath path, fillPath; 69 SkPath path, fillPath;
70 path.addRect(r); 70 path.addRect(r);
71 paint.getFillPath(path, &fillPath); 71 paint.getFillPath(path, &fillPath);
72 72
73 REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds())); 73 REPORTER_ASSERT(reporter, equal(outer, fillPath.getBounds()));
74 74
75 bool isMiter = SkPaint::kMiter_Join == joins[i]; 75 bool isMiter = SkPaint::kMiter_Join == joins[i];
76 SkRect nested[2]; 76 SkRect nested[2];
77 REPORTER_ASSERT(reporter, fillPath.isNestedRects(nested) == isMiter); 77 REPORTER_ASSERT(reporter, fillPath.isNestedFillRects(nested) == isMiter) ;
78 if (isMiter) { 78 if (isMiter) {
79 SkRect inner(r); 79 SkRect inner(r);
80 inner.inset(width/2, width/2); 80 inner.inset(width/2, width/2);
81 REPORTER_ASSERT(reporter, equal(nested[0], outer)); 81 REPORTER_ASSERT(reporter, equal(nested[0], outer));
82 REPORTER_ASSERT(reporter, equal(nested[1], inner)); 82 REPORTER_ASSERT(reporter, equal(nested[1], inner));
83 } 83 }
84 } 84 }
85 } 85 }
86 86
87 DEF_TEST(Stroke, reporter) { 87 DEF_TEST(Stroke, reporter) {
88 test_strokecubic(reporter); 88 test_strokecubic(reporter);
89 test_strokerect(reporter); 89 test_strokerect(reporter);
90 } 90 }
OLDNEW
« no previous file with comments | « tests/PathTest.cpp ('k') | tools/lua/scrape.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698