Flutter Engine
The Flutter Engine
Public Member Functions | Public Attributes | List of all members
txt::TextShadow Class Reference

#include <text_shadow.h>

Public Member Functions

 TextShadow ()
 
 TextShadow (SkColor color, SkPoint offset, double blur_sigma)
 
bool operator== (const TextShadow &other) const
 
bool operator!= (const TextShadow &other) const
 
bool hasShadow () const
 

Public Attributes

SkColor color = SK_ColorBLACK
 
SkPoint offset
 
double blur_sigma = 0.0
 

Detailed Description

Definition at line 25 of file text_shadow.h.

Constructor & Destructor Documentation

◆ TextShadow() [1/2]

txt::TextShadow::TextShadow ( )

Definition at line 22 of file text_shadow.cc.

22{}

◆ TextShadow() [2/2]

txt::TextShadow::TextShadow ( SkColor  color,
SkPoint  offset,
double  blur_sigma 
)

Definition at line 23 of file text_shadow.cc.

Member Function Documentation

◆ hasShadow()

bool txt::TextShadow::hasShadow ( ) const

Definition at line 41 of file text_shadow.cc.

41 {
42 if (!offset.isZero())
43 return true;
44 if (blur_sigma > 0.5)
45 return true;
46
47 return false;
48}
bool isZero() const
Definition: SkPoint_impl.h:193

◆ operator!=()

bool txt::TextShadow::operator!= ( const TextShadow other) const

Definition at line 37 of file text_shadow.cc.

37 {
38 return !(*this == other);
39}

◆ operator==()

bool txt::TextShadow::operator== ( const TextShadow other) const

Definition at line 26 of file text_shadow.cc.

26 {
27 if (color != other.color)
28 return false;
29 if (offset != other.offset)
30 return false;
31 if (blur_sigma != other.blur_sigma)
32 return false;
33
34 return true;
35}
void offset(float dx, float dy)
Definition: SkPoint_impl.h:269

Member Data Documentation

◆ blur_sigma

double txt::TextShadow::blur_sigma = 0.0

Definition at line 29 of file text_shadow.h.

◆ color

SkColor txt::TextShadow::color = SK_ColorBLACK

Definition at line 27 of file text_shadow.h.

◆ offset

SkPoint txt::TextShadow::offset

Definition at line 28 of file text_shadow.h.


The documentation for this class was generated from the following files: