7#include "flutter/impeller/entity/geometry/circle_geometry.h"
9#include "flutter/impeller/entity/geometry/line_geometry.h"
14 : center_(center), radius_(radius), stroke_width_(-1.0f) {
33 Scalar half_width = stroke_width_ < 0 ? 0.0
37 std::shared_ptr<Tessellator> tessellator =
renderer.GetTessellator();
42 tessellator->StrokedCircle(
transform, center_, radius_, half_width);
47std::optional<Rect> CircleGeometry::GetCoverage(
const Matrix&
transform)
const {
49 {center_.
x, center_.
y - radius_},
50 {center_.
x + radius_, center_.
y},
51 {center_.
x, center_.
y + radius_},
52 {center_.
x - radius_, center_.
y},
55 for (
int i = 0;
i < 4;
i++) {
bool CoversArea(const Matrix &transform, const Rect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all surface ar...
bool IsAxisAlignedRect() const override
CircleGeometry(const Point ¢er, Scalar radius)
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
static Scalar ComputePixelHalfWidth(const Matrix &transform, Scalar width)
Render passes encode render commands directed as one specific render target into an underlying comman...
static const char * begin(const StringSlice &s)
#define FML_DCHECK(condition)
static float max(float r, float g, float b)
sk_sp< SkBlender > blender SkRect rect
SK_API sk_sp< PrecompileColorFilter > Matrix()
static SkColor4f transform(SkColor4f c, SkColorSpace *src, SkColorSpace *dst)
const Scalar stroke_width
A 4x4 matrix using column-major storage.
static constexpr std::optional< TRect > MakePointBounds(const U &value)