e09b314405
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> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
demos.skia.org | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.