diff options
author | 2014-12-01 08:38:55 -0800 | |
---|---|---|
committer | 2014-12-01 08:38:55 -0800 | |
commit | 20b373cf3116905fc5ca1928c9b504851335ca43 (patch) | |
tree | 62abbeec9b8e41fa3d4190b4cf9f550e057af97a /src/core/SkStrokeRec.cpp | |
parent | 371bcbcb9fa7f9acba265de9de5dd23f62a64a86 (diff) |
Add color emoji fallback for nvpr text
BUG=skia:
Review URL: https://codereview.chromium.org/759613005
Diffstat (limited to 'src/core/SkStrokeRec.cpp')
-rw-r--r-- | src/core/SkStrokeRec.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/SkStrokeRec.cpp b/src/core/SkStrokeRec.cpp index 22f0562fe2..95f56b76a6 100644 --- a/src/core/SkStrokeRec.cpp +++ b/src/core/SkStrokeRec.cpp @@ -114,3 +114,16 @@ bool SkStrokeRec::applyToPath(SkPath* dst, const SkPath& src) const { stroker.strokePath(src, dst); return true; } + +void SkStrokeRec::applyToPaint(SkPaint* paint) const { + if (fWidth < 0) { // fill + paint->setStyle(SkPaint::kFill_Style); + return; + } + + paint->setStyle(fStrokeAndFill ? SkPaint::kStrokeAndFill_Style : SkPaint::kStroke_Style); + paint->setStrokeWidth(fWidth); + paint->setStrokeMiter(fMiterLimit); + paint->setStrokeCap(fCap); + paint->setStrokeJoin(fJoin); +} |