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

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

Issue 1608353002: resolution dependent path measure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add comment Created 4 years, 11 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 | « include/core/SkPathMeasure.h ('k') | src/core/SkDraw.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 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 #ifndef SkStrokeRec_DEFINED 8 #ifndef SkStrokeRec_DEFINED
9 #define SkStrokeRec_DEFINED 9 #define SkStrokeRec_DEFINED
10 10
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 * strokeAndFill==false -> new style will be Hairline 56 * strokeAndFill==false -> new style will be Hairline
57 */ 57 */
58 void setStrokeStyle(SkScalar width, bool strokeAndFill = false); 58 void setStrokeStyle(SkScalar width, bool strokeAndFill = false);
59 59
60 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) { 60 void setStrokeParams(SkPaint::Cap cap, SkPaint::Join join, SkScalar miterLim it) {
61 fCap = cap; 61 fCap = cap;
62 fJoin = join; 62 fJoin = join;
63 fMiterLimit = miterLimit; 63 fMiterLimit = miterLimit;
64 } 64 }
65 65
66 SkScalar getResScale() const {
67 return fResScale;
68 }
69
66 void setResScale(SkScalar rs) { 70 void setResScale(SkScalar rs) {
67 SkASSERT(rs > 0 && SkScalarIsFinite(rs)); 71 SkASSERT(rs > 0 && SkScalarIsFinite(rs));
68 fResScale = rs; 72 fResScale = rs;
69 } 73 }
70 74
71 /** 75 /**
72 * Returns true if this specifes any thick stroking, i.e. applyToPath() 76 * Returns true if this specifes any thick stroking, i.e. applyToPath()
73 * will return true. 77 * will return true.
74 */ 78 */
75 bool needToApply() const { 79 bool needToApply() const {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // 126 //
123 // fCap and fJoin are larger than needed to avoid having to initialize 127 // fCap and fJoin are larger than needed to avoid having to initialize
124 // any pad values 128 // any pad values
125 uint32_t fCap : 16; // SkPaint::Cap 129 uint32_t fCap : 16; // SkPaint::Cap
126 uint32_t fJoin : 15; // SkPaint::Join 130 uint32_t fJoin : 15; // SkPaint::Join
127 uint32_t fStrokeAndFill : 1; // bool 131 uint32_t fStrokeAndFill : 1; // bool
128 }; 132 };
129 SK_END_REQUIRE_DENSE 133 SK_END_REQUIRE_DENSE
130 134
131 #endif 135 #endif
OLDNEW
« no previous file with comments | « include/core/SkPathMeasure.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698