16 : center_(center), radius_(radius), stroke_width_(-1.0f) {
27 stroke_width_(
std::max(stroke_width, 0.0f)) {
34 if (stroke_width_ < 0) {
57 Scalar half_width = stroke_width_ < 0 ? 0.0
70 Scalar half_width = stroke_width_ < 0 ? 0.0 : stroke_width_ * 0.5f;
71 Scalar outer_radius = radius_ + half_width;
73 +outer_radius, +outer_radius)
79 const Rect& rect)
const {
Scalar ComputeAlphaCoverage(const Matrix &transform) const override
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...
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool IsAxisAlignedRect() const override
CircleGeometry(const Point ¢er, Scalar radius)
std::optional< Rect > GetCoverage(const Matrix &transform) const override
~CircleGeometry() override
Scalar GetStrokeWidth() const
Tessellator & GetTessellator() const
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
static Scalar ComputeStrokeAlphaCoverage(const Matrix &entity, Scalar stroke_width)
Compute an alpha value to simulate lower coverage of fractional pixel strokes.
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...
EllipticalVertexGenerator StrokedCircle(const Matrix &view_transform, const Point ¢er, Scalar radius, Scalar half_width)
Create a |VertexGenerator| that can produce vertices for a stroked circle of the given radius and hal...
#define FML_DCHECK(condition)
A 4x4 matrix using column-major storage.
constexpr TRect< T > Shift(T dx, T dy) const
Returns a new rectangle translated by the given offset.
static constexpr TRect MakeLTRB(Type left, Type top, Type right, Type bottom)