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

Unified Diff: src/core/SkStroke.h

Issue 911053005: optional res-scale parameter to getFillPath (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkStroke.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkStroke.h
diff --git a/src/core/SkStroke.h b/src/core/SkStroke.h
index cb329399a91952e67d0f097e59825d5890f8bfc6..a5446a4178fe991e06fefa296e9329c71c38097f 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;
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkStroke.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698