Flutter Engine
 
Loading...
Searching...
No Matches
text_shadow.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "text_shadow.h"
6#include "third_party/skia/include/core/SkColor.h"
7
8namespace txt {
9
11TextShadow::TextShadow(SkColor color, SkPoint offset, double blur_sigma)
12 : color(color), offset(offset), blur_sigma(blur_sigma) {}
13
14bool TextShadow::operator==(const TextShadow& other) const = default;
15
17 if (!offset.isZero()) {
18 return true;
19 }
20 if (blur_sigma > 0.5) {
21 return true;
22 }
23
24 return false;
25}
26
27} // namespace txt
bool hasShadow() const
bool operator==(const TextShadow &other) const