Flutter Engine
The Flutter Engine
Static Public Member Functions | Protected Member Functions | Friends | List of all members
sksg::Transform Class Referenceabstract

#include <SkSGTransform.h>

Inheritance diagram for sksg::Transform:
sksg::Node SkRefCnt SkRefCntBase sksg::Matrix< SkMatrix > sksg::Matrix< SkM44 > sksg::Matrix< T >

Static Public Member Functions

static sk_sp< TransformMakeConcat (sk_sp< Transform > a, sk_sp< Transform > b)
 
static sk_sp< TransformMakeInverse (sk_sp< Transform > t)
 

Protected Member Functions

 Transform ()
 
virtual bool is44 () const =0
 
virtual SkMatrix asMatrix () const =0
 
virtual SkM44 asM44 () const =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 > &)
 

Friends

class TransformPriv
 

Additional Inherited Members

- 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
 
- Protected Types inherited from sksg::Node
enum  InvalTraits { kBubbleDamage_Trait = 1 << 0 , kOverrideDamage_Trait = 1 << 1 }
 

Detailed Description

Transformations base class.

Definition at line 31 of file SkSGTransform.h.

Constructor & Destructor Documentation

◆ Transform()

sksg::Transform::Transform ( )
protected

Definition at line 144 of file SkSGTransform.cpp.

144: INHERITED(kBubbleDamage_Trait) {}
@ kBubbleDamage_Trait
Definition: SkSGNode.h:46

Member Function Documentation

◆ asM44()

virtual SkM44 sksg::Transform::asM44 ( ) const
protectedpure virtual

◆ asMatrix()

virtual SkMatrix sksg::Transform::asMatrix ( ) const
protectedpure virtual

◆ is44()

virtual bool sksg::Transform::is44 ( ) const
protectedpure virtual

◆ MakeConcat()

sk_sp< Transform > sksg::Transform::MakeConcat ( sk_sp< Transform a,
sk_sp< Transform b 
)
static

Definition at line 146 of file SkSGTransform.cpp.

146 {
147 if (!a) {
148 return b;
149 }
150
151 if (!b) {
152 return a;
153 }
154
156 ? sk_sp<Transform>(new Concat<SkM44 >(std::move(a), std::move(b)))
157 : sk_sp<Transform>(new Concat<SkMatrix>(std::move(a), std::move(b)));
158}
static bool Is44(const sk_sp< Transform > &t)
static bool b
struct MyStruct a[10]
static const char * Concat(const char *a, const char *b)
Definition: file_test.cc:86
Definition: ref_ptr.h:256

◆ MakeInverse()

sk_sp< Transform > sksg::Transform::MakeInverse ( sk_sp< Transform t)
static

Definition at line 160 of file SkSGTransform.cpp.

160 {
161 if (!t) {
162 return nullptr;
163 }
164
165 return TransformPriv::Is44(t)
166 ? sk_sp<Transform>(new Inverse<SkM44 >(std::move(t)))
167 : sk_sp<Transform>(new Inverse<SkMatrix>(std::move(t)));
168}

Friends And Related Function Documentation

◆ TransformPriv

friend class TransformPriv
friend

Definition at line 48 of file SkSGTransform.h.


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