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

Unified Diff: src/core/SkGlyphCache.h

Issue 1654883003: add helper to create fancy underlines (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: correct comment to multiply by two 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
« no previous file with comments | « src/core/SkGlyph.h ('k') | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGlyphCache.h
diff --git a/src/core/SkGlyphCache.h b/src/core/SkGlyphCache.h
index 2f1f417250eda9aae45b62e614eb158afdb37048..cd0b05c6e960adc862d94946efa95046c8dafb23 100644
--- a/src/core/SkGlyphCache.h
+++ b/src/core/SkGlyphCache.h
@@ -77,6 +77,12 @@ public:
*/
const void* findImage(const SkGlyph&);
+ /** If the advance axis intersects the glyph's path, append the positions scaled and offset
+ to the array (if non-null), and set the count to the updated array length.
+ */
+ void findIntercepts(const SkScalar bounds[2], SkScalar scale, SkScalar xPos,
+ bool yAxis, SkGlyph* , SkScalar* array, int* count);
+
/** Return the Path associated with the glyph. If it has not been generated this will trigger
that.
*/
@@ -232,6 +238,20 @@ private:
inline static SkGlyphCache* FindTail(SkGlyphCache* head);
+ static void OffsetResults(const SkGlyph::Intercept* intercept, SkScalar scale,
+ SkScalar xPos, SkScalar* array, int* count);
+ static void AddInterval(SkScalar val, SkGlyph::Intercept* intercept);
+ static void AddPoints(const SkPoint* pts, int ptCount, const SkScalar bounds[2],
+ bool yAxis, SkGlyph::Intercept* intercept);
+ static void AddLine(const SkPoint pts[2], SkScalar axis, bool yAxis,
+ SkGlyph::Intercept* intercept);
+ static void AddQuad(const SkPoint pts[2], SkScalar axis, bool yAxis,
+ SkGlyph::Intercept* intercept);
+ static void AddCubic(const SkPoint pts[3], SkScalar axis, bool yAxis,
+ SkGlyph::Intercept* intercept);
+ static const SkGlyph::Intercept* MatchBounds(const SkGlyph* glyph,
+ const SkScalar bounds[2]);
+
SkGlyphCache* fNext;
SkGlyphCache* fPrev;
SkDescriptor* const fDesc;
« no previous file with comments | « src/core/SkGlyph.h ('k') | src/core/SkGlyphCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698