Represents a texture and its intended draw transform/sampler configuration. More...
#include <snapshot.h>
Public Member Functions | |
std::optional< Rect > | GetCoverage () const |
std::optional< Matrix > | GetUVTransform () const |
Get the transform that converts screen space coordinates to the UV space of this snapshot. More... | |
std::optional< std::array< Point, 4 > > | GetCoverageUVs (const Rect &coverage) const |
Map a coverage rect to this filter input's UV space. Result order: Top left, top right, bottom left, bottom right. More... | |
Public Attributes | |
std::shared_ptr< Texture > | texture |
Matrix | transform |
The transform that should be applied to this texture for rendering. More... | |
SamplerDescriptor | sampler_descriptor |
Scalar | opacity = 1.0f |
Represents a texture and its intended draw transform/sampler configuration.
Definition at line 24 of file snapshot.h.
std::optional< Rect > impeller::Snapshot::GetCoverage | ( | ) | const |
Definition at line 11 of file snapshot.cc.
References impeller::TRect< Scalar >::MakeSize(), texture, transform, and impeller::TRect< T >::TransformBounds().
std::optional< std::array< Point, 4 > > impeller::Snapshot::GetCoverageUVs | ( | const Rect & | coverage | ) | const |
Map a coverage rect to this filter input's UV space. Result order: Top left, top right, bottom left, bottom right.
Definition at line 26 of file snapshot.cc.
References impeller::TRect< T >::GetTransformedPoints(), and GetUVTransform().
std::optional< Matrix > impeller::Snapshot::GetUVTransform | ( | ) | const |
Get the transform that converts screen space coordinates to the UV space of this snapshot.
Definition at line 18 of file snapshot.cc.
References impeller::Matrix::Invert(), impeller::Matrix::MakeScale(), texture, and transform.
Referenced by GetCoverageUVs().
Scalar impeller::Snapshot::opacity = 1.0f |
Definition at line 35 of file snapshot.h.
Referenced by impeller::Entity::FromSnapshot().
SamplerDescriptor impeller::Snapshot::sampler_descriptor |
Definition at line 29 of file snapshot.h.
Referenced by impeller::Entity::FromSnapshot(), and impeller::Canvas::SaveLayer().
std::shared_ptr<Texture> impeller::Snapshot::texture |
Definition at line 25 of file snapshot.h.
Referenced by impeller::AdvancedBlend(), impeller::Entity::FromSnapshot(), GetCoverage(), impeller::TextureFilterInput::GetSnapshot(), GetUVTransform(), impeller::PipelineBlend(), impeller::Contents::RenderToSnapshot(), impeller::TextureContents::RenderToSnapshot(), impeller::TiledTextureContents::RenderToSnapshot(), and impeller::Canvas::SaveLayer().
Matrix impeller::Snapshot::transform |
The transform that should be applied to this texture for rendering.
Definition at line 27 of file snapshot.h.
Referenced by impeller::Entity::FromSnapshot(), GetCoverage(), GetUVTransform(), and impeller::Canvas::SaveLayer().