Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
sksg::DropShadowImageFilter Class Referencefinal

#include <SkSGRenderEffect.h>

Inheritance diagram for sksg::DropShadowImageFilter:
sksg::ImageFilter sksg::Node SkRefCnt SkRefCntBase

Public Types

enum class  Mode { kShadowAndForeground , kShadowOnly }
 

Public Member Functions

 ~DropShadowImageFilter () override
 
- Public Member Functions inherited from sksg::ImageFilter
 ~ImageFilter () override
 
const sk_sp< SkImageFilter > & getFilter () const
 
- Public Member Functions inherited from sksg::Node
const SkRectrevalidate (InvalidationController *, const SkMatrix &)
 
void invalidate (bool damage=true)
 
- Public Member Functions inherited from SkRefCntBase
 SkRefCntBase ()
 
virtual ~SkRefCntBase ()
 
bool unique () const
 
void ref () const
 
void unref () const
 

Static Public Member Functions

static sk_sp< DropShadowImageFilterMake ()
 

Protected Member Functions

sk_sp< SkImageFilteronRevalidateFilter () override
 
- Protected Member Functions inherited from sksg::ImageFilter
 ImageFilter ()
 
SkRect onRevalidate (InvalidationController *, const SkMatrix &) final
 
virtual sk_sp< SkImageFilteronRevalidateFilter ()=0
 
- Protected Member Functions inherited from sksg::Node
 Node (uint32_t invalTraits)
 
 ~Node () override
 
const SkRectbounds () const
 
bool hasInval () const
 
virtual SkRect onRevalidate (InvalidationController *, const SkMatrix &ctm)=0
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

Additional Inherited Members

- Protected Types inherited from sksg::Node
enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 

Detailed Description

SkDropShadowImageFilter node.

Definition at line 188 of file SkSGRenderEffect.h.

Member Enumeration Documentation

◆ Mode

Enumerator
kShadowAndForeground 
kShadowOnly 

Definition at line 194 of file SkSGRenderEffect.h.

194{ kShadowAndForeground, kShadowOnly };

Constructor & Destructor Documentation

◆ ~DropShadowImageFilter()

sksg::DropShadowImageFilter::~DropShadowImageFilter ( )
overridedefault

Member Function Documentation

◆ Make()

sk_sp< DropShadowImageFilter > sksg::DropShadowImageFilter::Make ( )
static

Definition at line 165 of file SkSGRenderEffect.cpp.

165 {
166 return sk_sp<DropShadowImageFilter>(new DropShadowImageFilter());
167}

◆ onRevalidateFilter()

sk_sp< SkImageFilter > sksg::DropShadowImageFilter::onRevalidateFilter ( )
overrideprotectedvirtual

Implements sksg::ImageFilter.

Definition at line 174 of file SkSGRenderEffect.cpp.

174 {
175 if (fMode == Mode::kShadowOnly) {
176 return SkImageFilters::DropShadowOnly(fOffset.x(), fOffset.y(), fSigma.x(), fSigma.y(),
177 fColor, nullptr, this->getCropRect());
178 } else {
179 return SkImageFilters::DropShadow(fOffset.x(), fOffset.y(), fSigma.x(), fSigma.y(),
180 fColor, nullptr, this->getCropRect());
181 }
182}
static sk_sp< SkImageFilter > DropShadow(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkImageFilter > DropShadowOnly(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY, SkColor color, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
constexpr float y() const
Definition: SkPoint_impl.h:187
constexpr float x() const
Definition: SkPoint_impl.h:181

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