|
constexpr | round_rect_aa (image_type &image, int32_t x_, int32_t y_, int32_t w_, int32_t h_, int32_t radius_) |
| Construct an anti-aliased rounded rectangle shape.
|
|
constexpr round_rect_aa & | fill (uint8_t col) |
| Fill the rounded rectangle with a solid color.
|
|
template<typename shader_func>
requires std::is_invocable_r_v<std::array<float, 4>, shader_func, float, float, int32_t, int32_t> |
constexpr auto | fill_shader (const shader_func &shader) -> round_rect_aa & |
| Fill the rounded rectangle using a shader function.
|
|
constexpr round_rect_aa & | stroke (uint8_t col, int32_t stroke_width=1) |
| Draw the rounded rectangle outline.
|
|
template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
class constixel::shapes::round_rect_aa< T, W, H, GRAYSCALE, USE_SPAN >
Fluent API for drawing anti-aliased rounded rectangles.
Provides a chainable interface for drawing filled and stroked rounded rectangles with anti-aliasing.
template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
Construct an anti-aliased rounded rectangle shape.
- Parameters
-
image | Target image to draw on |
x_ | X coordinate of top-left corner |
y_ | Y coordinate of top-left corner |
w_ | Width of rectangle |
h_ | Height of rectangle |
radius_ | Corner radius |
template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
template<typename shader_func>
requires std::is_invocable_r_v<std::array<float, 4>, shader_func, float, float, int32_t, int32_t>
Fill the rounded rectangle using a shader function.
- Parameters
-
shader | Function that returns RGBA values based on normalized coordinates |
- Returns
- Reference to this rounded rectangle for chaining