skia2/modules
Nathaniel Nifong e09b314405 Add ParagraphBuilder.pushPaintStyle to allow text to be colors with paints.
Previously one could not color text with paints, even though TextStyle's foregroundColor and
backgroundColor fields are SkPaints. Canvaskit only exposed these as colors in order to allow
SimpleTextStyle to be a value object that would not have to be deleted by the user.

CanvasKit.Paint is a bound SkPaint. I wanted to allow a user to pass a paint to be used
in a text style without alterting SimpleTextStyle's status as a value-object.

So I've added a new bound method, pushPaintStyle which acts just like pushStyle but allows
a foreground and background paint to be supplied which are used to override the existing paints.

The user is responsible for deleting these paints.

Sorry for the kludgy design, if you have got a more elegant way, I'm open to suggestions.

Change-Id: Ib78464171346fe9f717f6d5b9d9428b1d0278498
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/307596
Commit-Queue: Nathaniel Nifong <nifong@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Julia Lavrova <jlavrova@google.com>
2020-08-04 13:23:06 +00:00
..
canvaskit Add ParagraphBuilder.pushPaintStyle to allow text to be colors with paints. 2020-08-04 13:23:06 +00:00
particles Always use Skia's Vulkan headers when compiling particles module 2020-07-07 20:44:34 +00:00
pathkit [canvaskit] Update to 0.17.1 2020-07-21 14:48:20 +00:00
skottie Use more of pathbuilder 2020-08-03 21:04:55 +00:00
skparagraph Enable ClangTidy check modernize-make-unique. 2020-08-03 17:53:52 +00:00
skplaintexteditor Hide ICU C++ API from Skia users. 2020-05-29 21:43:19 +00:00
skresources [skottie] Avoid image data duplication when pre-decoding 2020-07-30 22:09:41 +00:00
sksg [skottie] More masking fixes 2020-07-21 13:58:45 +00:00
skshaper Enable ClangTidy check modernize-make-unique. 2020-08-03 17:53:52 +00:00