aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkStrokeRec.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2014-12-01 08:38:55 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-01 08:38:55 -0800
commit20b373cf3116905fc5ca1928c9b504851335ca43 (patch)
tree62abbeec9b8e41fa3d4190b4cf9f550e057af97a /src/core/SkStrokeRec.cpp
parent371bcbcb9fa7f9acba265de9de5dd23f62a64a86 (diff)
Add color emoji fallback for nvpr text
Diffstat (limited to 'src/core/SkStrokeRec.cpp')
-rw-r--r--src/core/SkStrokeRec.cpp13
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);
+}