Skia
2D Graphics Library
sksg::GeometryEffect Class Referenceabstract

Base class for geometry effects. More...

#include <SkSGGeometryEffect.h>

Inheritance diagram for sksg::GeometryEffect:

Public Member Functions

void clip (SkCanvas *, bool antiAlias) const
 
void draw (SkCanvas *, const SkPaint &) const
 
bool contains (const SkPoint &) const
 
SkPath asPath () const
 
const SkRectrevalidate (InvalidationController *, const SkMatrix &)
 
void invalidate (bool damage=true)
 
bool unique () const
 May return true if the caller is the only owner. More...
 
void ref () const
 Increment the reference count. More...
 
void unref () const
 Decrement the reference count. More...
 

Protected Types

enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 

Protected Member Functions

 GeometryEffect (sk_sp< GeometryNode >)
 
 ~GeometryEffect () override
 
void onClip (SkCanvas *, bool antiAlias) const final
 
void onDraw (SkCanvas *, const SkPaint &) const final
 
bool onContains (const SkPoint &) const final
 
SkRect onRevalidate (InvalidationController *, const SkMatrix &) final
 
SkPath onAsPath () const final
 
virtual SkPath onRevalidateEffect (const sk_sp< GeometryNode > &)=0
 
const SkRectbounds () const
 
bool hasInval () const
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

Detailed Description

Base class for geometry effects.

Member Enumeration Documentation

◆ InvalTraits

enum sksg::Node::InvalTraits
protectedinherited
Enumerator
kBubbleDamage_Trait 
kOverrideDamage_Trait 

Constructor & Destructor Documentation

◆ GeometryEffect()

sksg::GeometryEffect::GeometryEffect ( sk_sp< GeometryNode )
explicitprotected

◆ ~GeometryEffect()

sksg::GeometryEffect::~GeometryEffect ( )
overrideprotected

Member Function Documentation

◆ asPath()

SkPath sksg::GeometryNode::asPath ( ) const
inherited

◆ bounds()

const SkRect& sksg::Node::bounds ( ) const
inlineprotectedinherited

◆ clip()

void sksg::GeometryNode::clip ( SkCanvas ,
bool  antiAlias 
) const
inherited

◆ contains()

bool sksg::GeometryNode::contains ( const SkPoint &  ) const
inherited

◆ draw()

void sksg::GeometryNode::draw ( SkCanvas ,
const SkPaint  
) const
inherited

◆ hasInval()

bool sksg::Node::hasInval ( ) const
inlineprotectedinherited

◆ invalidate()

void sksg::Node::invalidate ( bool  damage = true)
inherited

◆ observeInval()

void sksg::Node::observeInval ( const sk_sp< Node > &  )
protectedinherited

◆ onAsPath()

SkPath sksg::GeometryEffect::onAsPath ( ) const
finalprotectedvirtual

Implements sksg::GeometryNode.

◆ onClip()

void sksg::GeometryEffect::onClip ( SkCanvas ,
bool  antiAlias 
) const
finalprotectedvirtual

Implements sksg::GeometryNode.

◆ onContains()

bool sksg::GeometryEffect::onContains ( const SkPoint &  ) const
finalprotectedvirtual

Implements sksg::GeometryNode.

◆ onDraw()

void sksg::GeometryEffect::onDraw ( SkCanvas ,
const SkPaint  
) const
finalprotectedvirtual

Implements sksg::GeometryNode.

◆ onRevalidate()

SkRect sksg::GeometryEffect::onRevalidate ( InvalidationController ,
const SkMatrix  
)
finalprotectedvirtual

Implements sksg::Node.

◆ onRevalidateEffect()

virtual SkPath sksg::GeometryEffect::onRevalidateEffect ( const sk_sp< GeometryNode > &  )
protectedpure virtual

◆ ref()

void SkRefCntBase::ref ( ) const
inlineinherited

Increment the reference count.

Must be balanced by a call to unref().

◆ revalidate()

const SkRect& sksg::Node::revalidate ( InvalidationController ,
const SkMatrix  
)
inherited

◆ unique()

bool SkRefCntBase::unique ( ) const
inlineinherited

May return true if the caller is the only owner.

Ensures that all previous owner's actions are complete.

◆ unobserveInval()

void sksg::Node::unobserveInval ( const sk_sp< Node > &  )
protectedinherited

◆ unref()

void SkRefCntBase::unref ( ) const
inlineinherited

Decrement the reference count.

If the reference count is 1 before the decrement, then delete the object. Note that if this is the case, then the object needs to have been allocated via new, and not on the stack.

Member Data Documentation

◆ fInvalObserver

Node* sksg::Node::fInvalObserver
inherited

◆ fInvalObserverArray

std::vector<Node*>* sksg::Node::fInvalObserverArray
inherited

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