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

Fluent API for drawing lines. More...

#include <constixel.hpp>

Public Member Functions

constexpr line (image_type &image, int32_t x0_, int32_t y0_, int32_t x1_, int32_t y1_)
 Construct a line shape.
 
constexpr linestroke (uint8_t col, int32_t stroke_width=1)
 Draw the 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< T, W, H, GRAYSCALE, USE_SPAN >

Fluent API for drawing lines.

Provides a chainable interface for drawing stroked lines.

Constructor & Destructor Documentation

◆ line()

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

Construct a 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 & constixel::shapes::line< T, W, H, GRAYSCALE, USE_SPAN >::stroke ( uint8_t col,
int32_t stroke_width = 1 )
inlineconstexpr

Draw the line.

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

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