Flutter Engine
txt::TextShadow Class Reference

#include <text_shadow.h>

Public Member Functions

 TextShadow ()
 
 TextShadow (SkColor color, SkPoint offset, double blur_radius)
 
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_radius = 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_radius 
)

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.

References blur_radius, and offset.

41  {
42  if (!offset.isZero())
43  return true;
44  if (blur_radius != 0.0)
45  return true;
46 
47  return false;
48 }
SkPoint offset
Definition: text_shadow.h:28
double blur_radius
Definition: text_shadow.h:29

◆ 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.

References blur_radius, color, and offset.

26  {
27  if (color != other.color)
28  return false;
29  if (offset != other.offset)
30  return false;
31  if (blur_radius != other.blur_radius)
32  return false;
33 
34  return true;
35 }
SkPoint offset
Definition: text_shadow.h:28
double blur_radius
Definition: text_shadow.h:29

Member Data Documentation

◆ blur_radius

double txt::TextShadow::blur_radius = 0.0

Definition at line 29 of file text_shadow.h.

Referenced by hasShadow(), and operator==().

◆ color

SkColor txt::TextShadow::color = SK_ColorBLACK

Definition at line 27 of file text_shadow.h.

Referenced by operator==().

◆ offset

SkPoint txt::TextShadow::offset

Definition at line 28 of file text_shadow.h.

Referenced by hasShadow(), and operator==().


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