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

Side by Side Diff: include/core/SkPath.h

Issue 138703008: fix minor error between kStroke_PathAsRect and kFill_PathAsRect in SkPath::asRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 10 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/SkPath.cpp » ('j') | src/core/SkPath.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkPath_DEFINED 10 #ifndef SkPath_DEFINED
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 */ 551 */
552 bool cheapIsDirection(Direction dir) const { 552 bool cheapIsDirection(Direction dir) const {
553 Direction computedDir = kUnknown_Direction; 553 Direction computedDir = kUnknown_Direction;
554 (void)this->cheapComputeDirection(&computedDir); 554 (void)this->cheapComputeDirection(&computedDir);
555 return computedDir == dir; 555 return computedDir == dir;
556 } 556 }
557 557
558 enum PathAsRect { 558 enum PathAsRect {
559 /** The path can not draw the same as its bounds. */ 559 /** The path can not draw the same as its bounds. */
560 kNone_PathAsRect, 560 kNone_PathAsRect,
561 /** The path draws the same as its bounds when filled. */
562 kFill_PathAsRect,
561 /** The path draws the same as its bounds when stroked or filled. */ 563 /** The path draws the same as its bounds when stroked or filled. */
562 kStroke_PathAsRect, 564 kStroke_PathAsRect,
563 /** The path draws the same as its bounds when filled. */
564 kFill_PathAsRect,
565 }; 565 };
566 566
567 /** Returns kFill_PathAsRect or kStroke_PathAsRect if drawing the path (eith er filled or 567 /** Returns kFill_PathAsRect or kStroke_PathAsRect if drawing the path (eith er filled or
568 stroked) will be equivalent to filling/stroking the path's bounding rect . If 568 stroked) will be equivalent to filling/stroking the path's bounding rect . If
569 either is true, and direction is not null, sets the direction of the con tour. If the 569 either is true, and direction is not null, sets the direction of the con tour. If the
570 path is not drawn equivalent to a rect, returns kNone_PathAsRect and ign ores direction. 570 path is not drawn equivalent to a rect, returns kNone_PathAsRect and ign ores direction.
571 571
572 @param direction If not null, set to the contour's direction when it is drawn as a rect 572 @param direction If not null, set to the contour's direction when it is drawn as a rect
573 @return the path's PathAsRect type 573 @return the path's PathAsRect type
574 */ 574 */
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1024 } 1024 }
1025 1025
1026 friend class SkAutoPathBoundsUpdate; 1026 friend class SkAutoPathBoundsUpdate;
1027 friend class SkAutoDisableOvalCheck; 1027 friend class SkAutoDisableOvalCheck;
1028 friend class SkAutoDisableDirectionCheck; 1028 friend class SkAutoDisableDirectionCheck;
1029 friend class SkBench_AddPathTest; // perf test reversePathTo 1029 friend class SkBench_AddPathTest; // perf test reversePathTo
1030 friend class PathTest_Private; // unit test reversePathTo 1030 friend class PathTest_Private; // unit test reversePathTo
1031 }; 1031 };
1032 1032
1033 #endif 1033 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkPath.cpp » ('j') | src/core/SkPath.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698