12 std::optional<StrokeParameters> stroke) {
18 std::optional<StrokeParameters> adjusted_stroke =
28 .stroke = adjusted_stroke};
35 std::optional<StrokeParameters> stroke) {
51 std::optional<StrokeParameters> stroke) {
64 std::optional<StrokeParameters> stroke) {
77 Point superellipse_degree,
80 Point corner_angle_span,
81 Point corner_circle_center_top,
82 Point corner_circle_center_right,
84 Point superellipse_scale,
85 std::optional<StrokeParameters> stroke) {
A structure to store all of the parameters related to stroking a path or basic geometry object.
constexpr TSize< Type > GetSize() const
Returns the size of the rectangle which may be negative in either width or height and may have been c...
constexpr Point GetCenter() const
Get the center point as a |Point|.
Parameters for rendering shapes using the UberSDF shader.
Point superellipse_a
The semi-axes of the top (.x) and right (.y) superellipse segments.
Color color
The color used for filling or stroking the shape.
Point corner_circle_center_right
The center of the right circular arc in a RoundSuperellipse.
Point superellipse_degree
The degrees of the top (.x) and right (.y) octants of a RoundSuperellipse.
static UberSDFParameters MakeCircle(Color color, const Point ¢er, Scalar radius, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a circle.
static UberSDFParameters MakeOval(Color color, const Rect &bounds, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for an Oval.
Type type
The type of shape to render.
Point center
The center point of the shape in local coordinates.
static UberSDFParameters MakeRoundedRect(Color color, const Rect &rect, const RoundingRadii &radii, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a rounded rectangle.
Point corner_angle_span
The spans of the top (.x) and right (.y) circular arcs.
Point superellipse_scale
The scale of the superellipse.
std::optional< StrokeParameters > stroke
The stroke parameters. If std::nullopt, the shape is filled.
Point corner_circle_center_top
The center of the top circular arc in a RoundSuperellipse.
static UberSDFParameters MakeRect(Color color, const Rect &rect, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a rectangle.
static UberSDFParameters MakeRoundedSuperellipse(Color color, Rect bounds, Point superellipse_degree, Point superellipse_a, RoundingRadii radii, Point corner_angle_span, Point corner_circle_center_top, Point corner_circle_center_right, Scalar superellipse_c, Point superellipse_scale, std::optional< StrokeParameters > stroke)
Creates UberSDFParameters for a symmetric round superellipse.
Scalar superellipse_c
The offset of the octants in a RoundSuperellipse.