39 static std::shared_ptr<TextureContents>
MakeRect(
Rect destination);
47 void SetLabel(std::string_view label);
131 Rect destination_rect_;
132 bool stencil_enabled_ =
true;
134 std::shared_ptr<Texture> texture_;
137 bool strict_source_rect_enabled_ =
false;
139 Scalar inherited_opacity_ = 1.0f;
140 bool defer_applying_opacity_ =
false;
std::shared_ptr< Texture > GetTexture() const
void SetSourceRect(const Rect &source_rect)
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
void SetSamplerDescriptor(const SamplerDescriptor &desc)
Scalar GetOpacity() const
void SetStrictSourceRect(bool strict)
void SetDeferApplyingOpacity(bool defer_applying_opacity)
const SamplerDescriptor & GetSamplerDescriptor() const
void SetOpacity(Scalar opacity)
bool GetStrictSourceRect() const
static std::shared_ptr< TextureContents > MakeRect(Rect destination)
const Rect & GetSourceRect() const
void SetInheritedOpacity(Scalar opacity) override
Inherit the provided opacity.
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the area of the render pass that will be affected when this contents is rendered.
void SetTexture(std::shared_ptr< Texture > texture)
~TextureContents() override
void SetLabel(std::string_view label)
std::optional< Snapshot > RenderToSnapshot(const ContentContext &renderer, const Entity &entity, const SnapshotOptions &options) const override
Render this contents to a snapshot, respecting the entity's transform, path, clip depth,...
void SetStencilEnabled(bool enabled)
void SetDestinationRect(Rect rect)