aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPaint.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkPaint.h')
-rw-r--r--include/core/SkPaint.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/core/SkPaint.h b/include/core/SkPaint.h
index 50fcdd825e..16b1b84c90 100644
--- a/include/core/SkPaint.h
+++ b/include/core/SkPaint.h
@@ -668,6 +668,20 @@ public:
*/
void setTextSkewX(SkScalar skewX);
+#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
+ /** Return the paint's scale factor used for correctly rendering
+ glyphs in high DPI mode without text subpixel positioning.
+ @return the scale factor used for rendering glyphs in high DPI mode.
+ */
+ SkScalar getHintingScaleFactor() const { return fHintingScaleFactor; }
+
+ /** Set the paint's scale factor used for correctly rendering
+ glyphs in high DPI mode without text subpixel positioning.
+ @param the scale factor used for rendering glyphs in high DPI mode.
+ */
+ void setHintingScaleFactor(SkScalar hintingScaleFactor);
+#endif
+
/** Describes how to interpret the text parameters that are passed to paint
methods like measureText() and getTextWidths().
*/
@@ -910,6 +924,9 @@ private:
SkScalar fTextSize;
SkScalar fTextScaleX;
SkScalar fTextSkewX;
+#ifdef SK_SUPPORT_HINTING_SCALE_FACTOR
+ SkScalar fHintingScaleFactor;
+#endif
SkPathEffect* fPathEffect;
SkShader* fShader;