skia2/modules
Florin Malita 2d059fcc22 [svg] Text rotate support
Implement support for text 'rotate' attribute:
https://www.w3.org/TR/SVG11/text.html#TSpanElementRotateAttribute.

Unlike other character-positioning attributes (x/y/dx/dy), rotate

  - is not cumulative
  - only applies to its respective node scope (does not affect other
    fragments in the current chunk)
  - has different padding semantics: if there are fewer rotate
    values than characters, the remaining characters use the last
    specified value from the closest ancestor

To the last point, we now have to discriminate three states:

  - unspecified (default -> 0)
  - explicit value for the given character index
  - implicit value (last value in the closest ancestor)

Local implicit values override implicit ancestor values -- but not
explicit ancestor values.

High level changes:

  - plumb 'rotate' attribute
  - expand per-character position info (ShapeBuffer) to include rotation
  - expand per-glyph position info (RunRec) to include rotation
  - expand PosAttrs to include rotation and add specific inheritance
    rules (see above)
  - pass computed rotation values to RSX blob buffers

Bug: skia:10840
Change-Id: Ia19ec5e8bb6fea06d49a9bd72ace575c2ffd100e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/348877
Commit-Queue: Florin Malita <fmalita@google.com>
Reviewed-by: Tyler Denniston <tdenniston@google.com>
2021-01-05 17:43:51 +00:00
..
audioplayer implement SkAudioPLayer for Android 2020-12-15 00:12:48 +00:00
canvaskit Reland "Add new virts, hide old ones" 2020-12-30 15:21:01 +00:00
particles Remove use of uint from particle random system 2020-12-23 16:21:17 +00:00
pathkit [canvaskit] Update to emsdk 2.0.10 2020-12-14 15:27:28 +00:00
skottie [skottie] Add text colorization GM 2020-12-10 17:10:48 +00:00
skparagraph Precompute the size of fClusters in ParagraphImpl::buildClusterTable 2020-12-17 20:02:15 +00:00
skplaintexteditor Enable ClangTidy check readability-const-return-type. 2020-08-07 17:42:38 +00:00
skresources Use bitmap.asImage() 2020-12-23 17:41:47 +00:00
sksg Work on hiding filter-quality 2020-12-23 17:05:17 +00:00
skshaper Remove static allocattion of UText 2020-12-17 15:06:15 +00:00
svg [svg] Text rotate support 2021-01-05 17:43:51 +00:00