12 : arc_(arc), stroke_width_(-1.0f), cap_(
Cap::
kButt) {}
15 : arc_(arc), stroke_width_(stroke.width), cap_(stroke.cap) {
24 if (stroke_width_ < 0) {
35 if (stroke_width_ < 0) {
54 std::optional<Rect> ArcGeometry::GetCoverage(
const Matrix&
transform)
const {
bool IsAxisAlignedRect() const override
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...
ArcGeometry(const Arc &arc)
virtual bool SupportsTriangleFan() const =0
Whether the primitive type TriangleFan is supported by the backend.
const Capabilities & GetDeviceCapabilities() 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...
ArcVertexGenerator StrokedArc(const Matrix &view_transform, const Arc &arc, Cap cap, Scalar half_width)
Create a |VertexGenerator| that can produce vertices for a stroked arc inscribed within the given ova...
ArcVertexGenerator FilledArc(const Matrix &view_transform, const Arc &arc, bool supports_triangle_fans)
Create a |VertexGenerator| that can produce vertices for a stroked arc inscribed within the given ova...
Vector2 padding
The halo padding in source space.
Cap
An enum that describes ways to decorate the end of a path contour.
Rect GetTightArcBounds() const
constexpr bool IncludeCenter() const
constexpr bool IsFullCircle() const
constexpr bool IsPerfectCircle() const
const Rect & GetOvalBounds() const
Return the bounds of the oval in which this arc is inscribed.
A 4x4 matrix using column-major storage.
A structure to store all of the parameters related to stroking a path or basic geometry object.
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 TRect TransformAndClipBounds(const Matrix &transform) const
Creates a new bounding box that contains this transformed rectangle, clipped against the near clippin...