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
8
namespace
txt
{
9
10
TextShadow::TextShadow
() {}
11
TextShadow::TextShadow
(SkColor color, SkPoint offset,
double
blur_sigma)
12
: color(color), offset(offset), blur_sigma(blur_sigma) {}
13
14
bool
TextShadow::operator==
(
const
TextShadow
& other)
const
=
default
;
15
16
bool
TextShadow::hasShadow
()
const
{
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
txt::TextShadow
Definition
text_shadow.h:13
txt::TextShadow::hasShadow
bool hasShadow() const
Definition
text_shadow.cc:16
txt::TextShadow::TextShadow
TextShadow()
Definition
text_shadow.cc:10
txt::TextShadow::offset
SkPoint offset
Definition
text_shadow.h:16
txt::TextShadow::blur_sigma
double blur_sigma
Definition
text_shadow.h:17
txt::TextShadow::operator==
bool operator==(const TextShadow &other) const
txt
Definition
paragraph_builder_skia.cc:15
text_shadow.h
txt
src
txt
text_shadow.cc
Generated on Thu Nov 6 2025 16:11:30 for Flutter Engine by
1.9.8