1 // Copyright 2019 Google LLC.
2 #include "include/core/SkColor.h"
3 #include "modules/skparagraph/include/TextShadow.h"
8 TextShadow::TextShadow() = default;
9 TextShadow::TextShadow(SkColor color, SkPoint offset, double blurSigma)
10 : fColor(color), fOffset(offset), fBlurSigma(blurSigma) {}
12 bool TextShadow::operator==(const TextShadow& other) const {
13 if (fColor != other.fColor) return false;
14 if (fOffset != other.fOffset) return false;
15 if (fBlurSigma != other.fBlurSigma) return false;
20 bool TextShadow::operator!=(const TextShadow& other) const { return !(*this == other); }
22 bool TextShadow::hasShadow() const {
23 if (!fOffset.isZero()) return true;
24 if (fBlurSigma != 0.0) return true;
29 } // namespace textlayout