Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
sksg::GeometryTransform Class Referencefinal

#include <SkSGGeometryEffect.h>

Inheritance diagram for sksg::GeometryTransform:
sksg::GeometryEffect sksg::GeometryNode sksg::Node SkRefCnt SkRefCntBase

Public Member Functions

 ~GeometryTransform () override
 
const sk_sp< Transform > & getTransform () const
 
- Public Member Functions inherited from sksg::GeometryNode
void clip (SkCanvas *, bool antiAlias) const
 
void draw (SkCanvas *, const SkPaint &) const
 
bool contains (const SkPoint &) const
 
SkPath asPath () 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< GeometryTransformMake (sk_sp< GeometryNode > child, sk_sp< Transform > transform)
 

Private Member Functions

SkPath onRevalidateEffect (const sk_sp< GeometryNode > &) override
 

Additional Inherited Members

- Protected Types inherited from sksg::Node
enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 
- Protected Member Functions inherited from sksg::GeometryEffect
 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
 
- Protected Member Functions inherited from sksg::GeometryNode
 GeometryNode ()
 
- Protected Member Functions inherited from sksg::Node
 Node (uint32_t invalTraits)
 
 ~Node () override
 
const SkRectbounds () const
 
bool hasInval () const
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

Detailed Description

Apply a transform to a GeometryNode.

Definition at line 83 of file SkSGGeometryEffect.h.

Constructor & Destructor Documentation

◆ ~GeometryTransform()

sksg::GeometryTransform::~GeometryTransform ( )
override

Definition at line 92 of file SkSGGeometryEffect.cpp.

92 {
93 this->unobserveInval(fTransform);
94}
void unobserveInval(const sk_sp< Node > &)
Definition SkSGNode.cpp:84

Member Function Documentation

◆ getTransform()

const sk_sp< Transform > & sksg::GeometryTransform::getTransform ( ) const
inline

Definition at line 94 of file SkSGGeometryEffect.h.

94{ return fTransform; }

◆ Make()

static sk_sp< GeometryTransform > sksg::GeometryTransform::Make ( sk_sp< GeometryNode child,
sk_sp< Transform transform 
)
inlinestatic

Definition at line 85 of file SkSGGeometryEffect.h.

85 {
86 return child && transform
87 ? sk_sp<GeometryTransform>(new GeometryTransform(std::move(child),
88 std::move(transform)))
89 : nullptr;
90 }
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
Definition p3.cpp:47

◆ onRevalidateEffect()

SkPath sksg::GeometryTransform::onRevalidateEffect ( const sk_sp< GeometryNode > &  child)
overrideprivatevirtual

Implements sksg::GeometryEffect.

Definition at line 96 of file SkSGGeometryEffect.cpp.

96 {
97 fTransform->revalidate(nullptr, SkMatrix::I());
98 const auto m = TransformPriv::As<SkMatrix>(fTransform);
99
100 SkPath path = child->asPath();
101 path.transform(m);
102
103 return path;
104}
static const SkMatrix & I()
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

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