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

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

#include <constixel.hpp>

Public Member Functions

constexpr line_aa (image_type &image, int32_t x0_, int32_t y0_, int32_t x1_, int32_t y1_)
 Construct an anti-aliased line shape.
 
constexpr line_aastroke (uint8_t col, float stroke_width=1.0f)
 Draw the anti-aliased line.
 

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::line_aa< T, W, H, GRAYSCALE, USE_SPAN >

Fluent API for drawing anti-aliased lines.

Provides a chainable interface for drawing stroked lines with anti-aliasing.

Constructor & Destructor Documentation

◆ line_aa()

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
constixel::shapes::line_aa< T, W, H, GRAYSCALE, USE_SPAN >::line_aa ( image_type & image,
int32_t x0_,
int32_t y0_,
int32_t x1_,
int32_t y1_ )
inlineconstexpr

Construct an anti-aliased line shape.

Parameters
imageTarget image to draw on
x0_X coordinate of start point
y0_Y coordinate of start point
x1_X coordinate of end point
y1_Y coordinate of end point

Member Function Documentation

◆ stroke()

template<template< size_t, size_t, bool, bool > class T, size_t W, size_t H, bool GRAYSCALE, bool USE_SPAN>
line_aa & constixel::shapes::line_aa< T, W, H, GRAYSCALE, USE_SPAN >::stroke ( uint8_t col,
float stroke_width = 1.0f )
inlineconstexpr

Draw the anti-aliased line.

Parameters
colColor value
stroke_widthWidth of the stroke (default: 1.0f)
Returns
Reference to this line for chaining

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