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

Unified Diff: src/core/SkScalerContext.h

Issue 1740163002: Improve horizontal baseline detection. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Just the bug fixes first. Created 4 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
Index: src/core/SkScalerContext.h
diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h
index 302698ee4e581548179bea34ed021af4bc4a87fa..9249bfb2a9dd1cffef099f5148259c587ac55f1e 100644
--- a/src/core/SkScalerContext.h
+++ b/src/core/SkScalerContext.h
@@ -20,6 +20,12 @@ class SkMaskFilter;
class SkPathEffect;
class SkRasterizer;
+enum SkAxisAlignment {
+ kNone_SkAxisAlignment,
+ kX_SkAxisAlignment,
+ kY_SkAxisAlignment
+};
+
/*
* To allow this to be forward-declared, it must be its own typename, rather
* than a nested struct inside SkScalerContext (where it started).
@@ -245,6 +251,13 @@ public:
const Rec& getRec() const { return fRec; }
+ /**
herb_g 2016/02/29 18:37:10 Do you want *'s aligned vertically?
bungeman-skia 2016/02/29 19:21:20 So while we have a vertical bit on paint and we ki
+ * Return the axis (if any) that the baseline for horizontal text should land on.
+ * As an example, the identity matrix will return kX_SkAxisAlignment
+ */
+ SkAxisAlignment computeAxisAlignmentForHText();
+
+
protected:
Rec fRec;
@@ -340,22 +353,6 @@ private:
///////////////////////////////////////////////////////////////////////////////
-enum SkAxisAlignment {
- kNone_SkAxisAlignment,
- kX_SkAxisAlignment,
- kY_SkAxisAlignment
-};
-
-/**
- * Return the axis (if any) that the baseline for horizontal text will land on
- * after running through the specified matrix.
- *
- * As an example, the identity matrix will return kX_SkAxisAlignment
- */
-SkAxisAlignment SkComputeAxisAlignmentForHText(const SkMatrix& matrix);
-
-///////////////////////////////////////////////////////////////////////////////
-
SkPaint::Hinting SkScalerContextRec::getHinting() const {
unsigned hint = (fFlags & SkScalerContext::kHinting_Mask) >>
SkScalerContext::kHinting_Shift;
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | src/core/SkScalerContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698