aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/c/sk_canvas.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-02-09 13:25:45 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-09 13:25:45 -0800
commit0449bcfb2fa1dd33cb3a4c0c8b17960d17edf01a (patch)
tree8c9e8f7e7b02e5a337636a5f41e981ba4e363d59 /include/c/sk_canvas.h
parent3cb954245cecf262d740a83913681b9fe4b41555 (diff)
add helper to create fancy underlines
Add a couple of utility functions to SkPaint that return the bounds of glyphs between a pair of lines. The common use case envisioned generates the edges of descenders between the top and bottom bounds of an underline to allow computing a stroke that skips those descenders. The implementation stores a linked list in each glyph containing the bounds of the lines parallel to the advance and the outermost intersections within those bounds. When the glyph cache is constructed, the glyph path is intersected with the bounds and the extreme min and max values within the bounds is added to an intercept. Share the text to path iter to construct the data. Make a half-hearted attempt to support vertical text; while the vertical implementation is complete; surrounding code (e.g. paint align) has short-comings with vertical. R=fmalita@chromium.org, reed@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1654883003 Review URL: https://codereview.chromium.org/1654883003
Diffstat (limited to 'include/c/sk_canvas.h')
0 files changed, 0 insertions, 0 deletions