 |
Flutter Impeller
|
|
Go to the documentation of this file.
16 : center_(center), radius_(radius), stroke_width_(-1.0f) {
17 FML_DCHECK(radius >= 0);
28 FML_DCHECK(radius >= 0);
34 if (stroke_width_ < 0) {
45 Scalar half_width = stroke_width_ < 0
51 const std::shared_ptr<Tessellator>& tessellator = renderer.
GetTessellator();
56 tessellator->StrokedCircle(
transform, center_, radius_, half_width);
61 std::optional<Rect> CircleGeometry::GetCoverage(
const Matrix&
transform)
const {
63 {center_.
x, center_.
y - radius_},
64 {center_.
x + radius_, center_.
y},
65 {center_.
x, center_.
y + radius_},
66 {center_.
x - radius_, center_.
y},
69 for (
int i = 0; i < 4; i++) {
76 const Rect& rect)
const {
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...
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
Scalar ComputeAlphaCoverage(const Matrix &transform) const override
~CircleGeometry() override
const Scalar stroke_width
static Scalar ComputePixelHalfWidth(const Matrix &transform, Scalar width, bool msaa)
constexpr static std::optional< TRect > MakePointBounds(const U &value)
static GeometryResult ComputePositionGeometry(const ContentContext &renderer, const Tessellator::VertexGenerator &generator, const Entity &entity, RenderPass &pass)
SampleCount GetSampleCount() const
The sample count of the attached render target.
bool IsAxisAlignedRect() const override
std::shared_ptr< Tessellator > GetTessellator() const
Render passes encode render commands directed as one specific render target into an underlying comman...
static Scalar ComputeStrokeAlphaCoverage(const Matrix &entity, Scalar stroke_width)
Compute an alpha value to simulate lower coverage of fractional pixel strokes.
CircleGeometry(const Point ¢er, Scalar radius)
A 4x4 matrix using column-major storage.