36 const IRect& rect)
const {
75 Size device_pixel_size = {
76 transform_scaling.
x != 0 ? 1.0f / transform_scaling.
x : 0,
77 transform_scaling.
y != 0 ? 1.0f / transform_scaling.
y : 0};
85 Size effective_stroke_width =
87 stroke_padding = effective_stroke_width * 0.5f;
94 .
Expand(stroke_padding + aa_padding);
const Matrix & GetTransform() const
Get the global transform matrix for this Entity.
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
Render passes encode render commands directed as one specific render target into an underlying comman...
GeometryResult GetPositionBuffer(const ContentContext &renderer, const Entity &entity, RenderPass &pass) const override
bool IsAxisAlignedRect() const override
bool CoversArea(const Matrix &transform, const IRect &rect) const override
Determines if this geometry, transformed by the given transform, will completely cover all of the pix...
UberSDFGeometry(const UberSDFParameters ¶ms)
std::optional< Rect > GetCoverage(const Matrix &transform) const override
The coverage rectangle of this geometry, transformed by the transform argument.
~UberSDFGeometry() override
const EmbeddedViewParams * params
A 4x4 matrix using column-major storage.
constexpr TRect TransformBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle.
static constexpr TRect MakeEllipseBounds(const TPoint< Type > ¢er, const TSize< Type > &radii)
constexpr bool Contains(const TPoint< Type > &p) const
Returns true iff the provided point |p| is inside the half-open interior of this rectangle.
constexpr TRect TransformAndClipBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle, clipped against the near clippin...
constexpr TRect< T > Expand(T left, T top, T right, T bottom) const
Returns a rectangle with expanded edges. Negative expansion results in shrinking.
constexpr TSize Max(const TSize &o) const
Parameters for rendering shapes using the UberSDF shader.
Type type
The type of shape to render.
Point center
The center point of the shape in local coordinates.
static constexpr Scalar kAntialiasPixels
std::optional< StrokeParameters > stroke
The stroke parameters. If std::nullopt, the shape is filled.