 |
Flutter Impeller
|
|
Go to the documentation of this file.
13 #include "flutter/fml/macros.h"
71 std::optional<Rect> bounds = std::nullopt,
72 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr);
117 void DrawImage(
const std::shared_ptr<Image>& image,
143 void DrawTextFrame(
const std::shared_ptr<TextFrame>& text_frame,
147 void DrawVertices(
const std::shared_ptr<VerticesGeometry>& vertices,
151 void DrawAtlas(
const std::shared_ptr<Image>& atlas,
152 std::vector<Matrix> transforms,
153 std::vector<Rect> texture_coordinates,
154 std::vector<Color> colors,
156 SamplerDescriptor sampler,
157 std::optional<Rect> cull_rect,
163 std::unique_ptr<EntityPass> base_pass_;
164 EntityPass* current_pass_ =
nullptr;
165 std::deque<CanvasStackEntry> xformation_stack_;
166 std::optional<Rect> initial_cull_rect_;
168 void Initialize(std::optional<Rect> cull_rect);
172 EntityPass& GetCurrentPass();
174 size_t GetStencilDepth()
const;
176 void ClipGeometry(std::unique_ptr<Geometry> geometry,
179 void IntersectCulling(
Rect clip_bounds);
180 void SubtractCulling(
Rect clip_bounds);
182 void Save(
bool create_subpass,
184 const std::shared_ptr<ImageFilter>& backdrop_filter =
nullptr);
188 bool AttemptDrawBlurredRRect(
const Rect& rect,
192 FML_DISALLOW_COPY_AND_ASSIGN(
Canvas);
Picture EndRecordingAsPicture()
void RestoreToCount(size_t count)
std::optional< Rect > cull_rect
void Skew(Scalar sx, Scalar sy)
void DrawTextFrame(const std::shared_ptr< TextFrame > &text_frame, Point position, const Paint &paint)
@ kRound
Points are drawn as squares.
void DrawVertices(const std::shared_ptr< VerticesGeometry > &vertices, BlendMode blend_mode, const Paint &paint)
bool offscreen_texture_checkerboard
struct impeller::Canvas::DebugOptions debug_options
void SaveLayer(const Paint &paint, std::optional< Rect > bounds=std::nullopt, const std::shared_ptr< ImageFilter > &backdrop_filter=nullptr)
Entity::RenderingMode rendering_mode
void DrawImage(const std::shared_ptr< Image > &image, Point offset, const Paint &paint, SamplerDescriptor sampler={})
void DrawPicture(const Picture &picture)
void DrawImageRect(const std::shared_ptr< Image > &image, Rect source, Rect dest, const Paint &paint, SamplerDescriptor sampler={})
@ kSquare
Points are drawn as circles.
void Scale(const Vector2 &scale)
Paths are lightweight objects that describe a collection of linear, quadratic, or cubic segments....
void DrawCircle(Point center, Scalar radius, const Paint &paint)
void DrawRRect(Rect rect, Scalar corner_radius, const Paint &paint)
void DrawAtlas(const std::shared_ptr< Image > &atlas, std::vector< Matrix > transforms, std::vector< Rect > texture_coordinates, std::vector< Color > colors, BlendMode blend_mode, SamplerDescriptor sampler, std::optional< Rect > cull_rect, const Paint &paint)
void DrawPath(const Path &path, const Paint &paint)
void DrawPaint(const Paint &paint)
size_t GetSaveCount() const
void PreConcat(const Matrix &xformation)
void Transform(const Matrix &xformation)
void ClipRRect(const Rect &rect, Scalar corner_radius, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
void Rotate(Radians radians)
const Matrix & GetCurrentTransformation() const
const std::optional< Rect > GetCurrentLocalCullingBounds() const
void Concat(const Matrix &xformation)
void DrawRect(Rect rect, const Paint &paint)
void DrawPoints(std::vector< Point >, Scalar radius, const Paint &paint, PointStyle point_style)
void ClipRect(const Rect &rect, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)
A 4x4 matrix using column-major storage.
void Translate(const Vector3 &offset)
void ClipPath(const Path &path, Entity::ClipOperation clip_op=Entity::ClipOperation::kIntersect)