 |
Flutter Impeller
|
|
Go to the documentation of this file.
11 #include "flutter/fml/macros.h"
38 void SetTexture(std::shared_ptr<Texture> texture);
48 void SetColors(std::vector<Color> colors);
62 const std::vector<Color>&
GetColors()
const;
78 Rect ComputeBoundingBox()
const;
80 std::shared_ptr<Texture> texture_;
81 std::vector<Rect> texture_coords_;
82 std::vector<Color> colors_;
83 std::vector<Matrix> transforms_;
85 std::optional<Rect> cull_rect_;
88 mutable std::optional<Rect> bounding_box_cache_;
111 void SetTexture(std::shared_ptr<Texture> texture);
115 void SetSubAtlas(
const std::shared_ptr<SubAtlasResult>& subatlas);
121 std::shared_ptr<Texture> texture_;
122 bool use_destination_ =
false;
123 std::shared_ptr<SubAtlasResult> subatlas_;
146 void SetSubAtlas(
const std::shared_ptr<SubAtlasResult>& subatlas);
152 std::shared_ptr<SubAtlasResult> subatlas_;
void SetTextureCoordinates(std::vector< Rect > texture_coords)
void SetAlpha(Scalar alpha)
void SetSamplerDescriptor(SamplerDescriptor desc)
std::vector< Matrix > result_transforms
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
AtlasColorContents(const AtlasContents &parent)
void SetCoverage(Rect coverage)
void SetAlpha(Scalar alpha)
void SetBlendMode(BlendMode blend_mode)
std::shared_ptr< SubAtlasResult > GenerateSubAtlas() const
Compress a drawAtlas call with blending into a smaller sized atlas. This atlas has no overlapping to ...
~AtlasContents() override
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
const std::vector< Matrix > & GetTransforms() const
const std::vector< Rect > & GetTextureCoordinates() const
bool Render(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the screen space bounding rectangle that this contents affects.
std::shared_ptr< Texture > GetTexture() const
std::vector< Matrix > sub_transforms
std::vector< Color > sub_colors
void SetSubAtlas(const std::shared_ptr< SubAtlasResult > &subatlas)
void SetColors(std::vector< Color > colors)
~AtlasColorContents() override
Render passes encode render commands directed as one specific render target into an underlying comman...
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the screen space bounding rectangle that this contents affects.
void SetUseDestination(bool value)
~AtlasTextureContents() override
void SetAlpha(Scalar alpha)
AtlasTextureContents(const AtlasContents &parent)
void SetCullRect(std::optional< Rect > cull_rect)
void SetTexture(std::shared_ptr< Texture > texture)
std::vector< Rect > sub_texture_coords
void SetTransforms(std::vector< Matrix > transforms)
std::optional< Rect > GetCoverage(const Entity &entity) const override
Get the screen space bounding rectangle that this contents affects.
const SamplerDescriptor & GetSamplerDescriptor() const
void SetCoverage(Rect coverage)
void SetTexture(std::shared_ptr< Texture > texture)
std::vector< Rect > result_texture_coords
const std::vector< Color > & GetColors() const
void SetSubAtlas(const std::shared_ptr< SubAtlasResult > &subatlas)