aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkStroke.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-02-12 13:35:52 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-12 13:35:52 -0800
commit05d9044de4f1c6e791df66a425638752daac4c6b (patch)
tree1ee2691252aedf8475578ecb0f5c0e1e558a9094 /src/core/SkStroke.h
parent3a092042bce0a8b7c43bf621cacdb2c644febeb2 (diff)
optional res-scale parameter to getFillPath
BUG=skia: NOTREECHECKS=True TBR= Review URL: https://codereview.chromium.org/911053005
Diffstat (limited to 'src/core/SkStroke.h')
-rw-r--r--src/core/SkStroke.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/SkStroke.h b/src/core/SkStroke.h
index cb329399a9..a5446a4178 100644
--- a/src/core/SkStroke.h
+++ b/src/core/SkStroke.h
@@ -53,6 +53,20 @@ public:
void setDoFill(bool doFill) { fDoFill = SkToU8(doFill); }
/**
+ * ResScale is the "intended" resolution for the output.
+ * Default is 1.0.
+ * Larger values (res > 1) indicate that the result should be more precise, since it will
+ * be zoomed up, and small errors will be magnified.
+ * Smaller values (0 < res < 1) indicate that the result can be less precise, since it will
+ * be zoomed down, and small errors may be invisible.
+ */
+ SkScalar getResScale() const { return fResScale; }
+ void setResScale(SkScalar rs) {
+ SkASSERT(rs > 0 && SkScalarIsFinite(rs));
+ fResScale = rs;
+ }
+
+ /**
* Stroke the specified rect, winding it in the specified direction..
*/
void strokeRect(const SkRect& rect, SkPath* result,
@@ -66,6 +80,7 @@ private:
SkScalar fError;
#endif
SkScalar fWidth, fMiterLimit;
+ SkScalar fResScale;
uint8_t fCap, fJoin;
SkBool8 fDoFill;