Skia
2D Graphics Library
sksg::Matrix< T > Class Template Referencefinal

Concrete, matrix-backed Transform. More...

#include <SkSGTransform.h>

Inheritance diagram for sksg::Matrix< T >:

Public Member Functions

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...
 

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 sk_sp< TransformMakeConcat (sk_sp< Transform > a, sk_sp< Transform > b)
 
static sk_sp< TransformMakeInverse (sk_sp< Transform > t)
 

Protected Types

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

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
 
const SkRectbounds () const
 
bool hasInval () const
 
void observeInval (const sk_sp< Node > &)
 
void unobserveInval (const sk_sp< Node > &)
 

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));

Member Enumeration Documentation

◆ InvalTraits

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

Constructor & Destructor Documentation

◆ Matrix()

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

Member Function Documentation

◆ asM44()

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

Implements sksg::Transform.

◆ asMatrix()

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

Implements sksg::Transform.

◆ bounds()

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

◆ hasInval()

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

◆ invalidate()

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

◆ is44()

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

Implements sksg::Transform.

◆ 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

◆ MakeConcat()

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

◆ MakeInverse()

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

◆ observeInval()

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

◆ onRevalidate()

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

Implements sksg::Node.

◆ 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: