constixel
Loading...
Searching...
No Matches
constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN > Class Template Reference

Fluent API for drawing anti-aliased circles. More...

#include <constixel.hpp>

Public Member Functions

constexpr circle_aa (image_type &image, int32_t cx_, int32_t cy_, int32_t r_)
 Construct an anti-aliased circle shape.
 
constexpr circle_aafill (uint8_t col)
 Fill the circle 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) -> circle_aa &
 Fill the circle using a shader function.
 
constexpr circle_aastroke (uint8_t col, int32_t stroke_width=1)
 Draw the circle outline.
 

Detailed Description

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
class constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN >

Fluent API for drawing anti-aliased circles.

Provides a chainable interface for drawing filled and stroked circles with anti-aliasing.

Constructor & Destructor Documentation

◆ circle_aa()

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN >::circle_aa ( image_type & image,
int32_t cx_,
int32_t cy_,
int32_t r_ )
inlineconstexpr

Construct an anti-aliased circle shape.

Parameters
imageTarget image to draw on
cx_X coordinate of center
cy_Y coordinate of center
r_Radius of circle

Member Function Documentation

◆ fill()

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
circle_aa & constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN >::fill ( uint8_t col)
inlineconstexpr

Fill the circle with a solid color.

Parameters
colColor value
Returns
Reference to this circle for chaining

◆ fill_shader()

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>
auto constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN >::fill_shader ( const shader_func & shader) -> circle_aa &
inlineconstexpr

Fill the circle using a shader function.

Parameters
shaderFunction that returns RGBA values based on normalized coordinates
Returns
Reference to this circle for chaining

◆ stroke()

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
circle_aa & constixel::shapes::circle_aa< T, W, H, GRAYSCALE, USE_SPAN >::stroke ( uint8_t col,
int32_t stroke_width = 1 )
inlineconstexpr

Draw the circle outline.

Parameters
colColor value
stroke_widthWidth of the stroke (default: 1)
Returns
Reference to this circle for chaining

The documentation for this class was generated from the following file: