Flutter Engine
The Flutter Engine
Static Public Member Functions | Protected Member Functions | List of all members
sksg::Matrix< T > Class Template Referencefinal

#include <SkSGTransform.h>

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

Static Public Member Functions

template<typename = std::enable_if<std::is_same<T, SkMatrix>::value || std::is_same<T, SkM44 >::value>>
static sk_sp< MatrixMake (const T &m)
 
- Static Public Member Functions inherited from sksg::Transform
static sk_sp< TransformMakeConcat (sk_sp< Transform > a, sk_sp< Transform > b)
 
static sk_sp< TransformMakeInverse (sk_sp< Transform > t)
 

Protected Member Functions

 Matrix (const T &m)
 
SkRect onRevalidate (InvalidationController *, const SkMatrix &) override
 
bool is44 () const override
 
SkMatrix asMatrix () const override
 
SkM44 asM44 () const override
 
SkMatrix asMatrix () const
 
SkM44 asM44 () const
 
SkMatrix asMatrix () const
 
SkM44 asM44 () const
 
- Protected Member Functions inherited from sksg::Transform
 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 > &)
 

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

template<typename T>
class sksg::Matrix< T >

Concrete, matrix-backed Transform.

Supported instantiations: SkMatrix, SkM44.

Sample use:

auto m33 = Matrix<SkMatrix>::Make(SkMatrix::I()); ... m33->setMatrix(SkMatrix::Translate(10, 10));

Definition at line 66 of file SkSGTransform.h.

Constructor & Destructor Documentation

◆ Matrix()

template<typename T >
sksg::Matrix< T >::Matrix ( const T m)
inlineexplicitprotected

Definition at line 75 of file SkSGTransform.h.

Member Function Documentation

◆ asM44() [1/3]

SkM44 sksg::Matrix< SkMatrix >::asM44 ( ) const
protectedvirtual

Implements sksg::Transform.

Definition at line 135 of file SkSGTransform.cpp.

135{ return SkM44(fMatrix); }
Definition: SkM44.h:150

◆ asM44() [2/3]

SkM44 sksg::Matrix< SkM44 >::asM44 ( ) const
protectedvirtual

Implements sksg::Transform.

Definition at line 141 of file SkSGTransform.cpp.

141{ return fMatrix; }

◆ asM44() [3/3]

template<typename T >
SkM44 sksg::Matrix< T >::asM44 ( ) const
overrideprotectedvirtual

Implements sksg::Transform.

◆ asMatrix() [1/3]

SkMatrix sksg::Matrix< SkMatrix >::asMatrix ( ) const
protectedvirtual

Implements sksg::Transform.

Definition at line 132 of file SkSGTransform.cpp.

132{ return fMatrix; }

◆ asMatrix() [2/3]

SkMatrix sksg::Matrix< SkM44 >::asMatrix ( ) const
protectedvirtual

Implements sksg::Transform.

Definition at line 138 of file SkSGTransform.cpp.

138{ return fMatrix.asM33(); }

◆ asMatrix() [3/3]

template<typename T >
SkMatrix sksg::Matrix< T >::asMatrix ( ) const
overrideprotectedvirtual

Implements sksg::Transform.

◆ is44()

template<typename T >
bool sksg::Matrix< T >::is44 ( ) const
inlineoverrideprotectedvirtual

Implements sksg::Transform.

Definition at line 81 of file SkSGTransform.h.

◆ Make()

template<typename T >
template<typename = std::enable_if<std::is_same<T, SkMatrix>::value || std::is_same<T, SkM44 >::value>>
static sk_sp< Matrix > sksg::Matrix< T >::Make ( const T m)
inlinestatic

Definition at line 70 of file SkSGTransform.h.

70{ return sk_sp<Matrix>(new Matrix(m)); }
Matrix(const T &m)
Definition: SkSGTransform.h:75

◆ onRevalidate()

template<typename T >
SkRect sksg::Matrix< T >::onRevalidate ( InvalidationController ,
const SkMatrix< T > &   
)
inlineoverrideprotectedvirtual

Implements sksg::Node.

Definition at line 77 of file SkSGTransform.h.

77 {
78 return SkRect::MakeEmpty();
79 }
static constexpr SkRect MakeEmpty()
Definition: SkRect.h:595

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