libepaper 2.0.0
A C++23 library for controlling Waveshare e-paper displays on Raspberry Pi, featuring transparent sleep/wake management and a fluent builder API.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
epaper::LineBuilder Class Reference

#include <builders.hpp>

Public Member Functions

 LineBuilder () noexcept=default
 Default constructor creates a builder with default values.
 
auto from (Point pt) noexcept -> LineBuilder &
 Set the starting point of the line.
 
auto from (std::size_t x, std::size_t y) noexcept -> LineBuilder &
 Set the starting point of the line using coordinates.
 
auto to (Point pt) noexcept -> LineBuilder &
 Set the ending point of the line.
 
auto to (std::size_t x, std::size_t y) noexcept -> LineBuilder &
 Set the ending point of the line using coordinates.
 
auto color (Color c) noexcept -> LineBuilder &
 Set the line color.
 
auto width (DotPixel w) noexcept -> LineBuilder &
 Set the line width.
 
auto style (LineStyle s) noexcept -> LineBuilder &
 Set the line style.
 
auto with_style (const LineStyleSpec &line_style) noexcept -> LineBuilder &
 Apply a reusable line style.
 
auto build () const noexcept -> LineCommand
 Build the final LineCommand.
 

Constructor & Destructor Documentation

◆ LineBuilder()

epaper::LineBuilder::LineBuilder ( )
defaultnoexcept

Default constructor creates a builder with default values.

Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

Member Function Documentation

◆ build()

auto epaper::LineBuilder::build ( ) const -> LineCommand
inlinenoexcept

Build the final LineCommand.

Returns
LineCommand ready to be passed to Display::draw()
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ color()

auto epaper::LineBuilder::color ( Color  c) -> LineBuilder &
inlinenoexcept

Set the line color.

Parameters
cLine color
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ from() [1/2]

auto epaper::LineBuilder::from ( Point  pt) -> LineBuilder &
inlinenoexcept

Set the starting point of the line.

Parameters
ptStarting point
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ from() [2/2]

auto epaper::LineBuilder::from ( std::size_t  x,
std::size_t  y 
) -> LineBuilder &
inlinenoexcept

Set the starting point of the line using coordinates.

Parameters
xStarting X coordinate
yStarting Y coordinate
Returns
Reference to this builder for chaining

◆ style()

auto epaper::LineBuilder::style ( LineStyle  s) -> LineBuilder &
inlinenoexcept

Set the line style.

Parameters
sLine style (solid/dotted)
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ to() [1/2]

auto epaper::LineBuilder::to ( Point  pt) -> LineBuilder &
inlinenoexcept

Set the ending point of the line.

Parameters
ptEnding point
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ to() [2/2]

auto epaper::LineBuilder::to ( std::size_t  x,
std::size_t  y 
) -> LineBuilder &
inlinenoexcept

Set the ending point of the line using coordinates.

Parameters
xEnding X coordinate
yEnding Y coordinate
Returns
Reference to this builder for chaining

◆ width()

auto epaper::LineBuilder::width ( DotPixel  w) -> LineBuilder &
inlinenoexcept

Set the line width.

Parameters
wLine width
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ with_style()

auto epaper::LineBuilder::with_style ( const LineStyleSpec line_style) -> LineBuilder &
inlinenoexcept

Apply a reusable line style.

Parameters
line_styleStyle specification to apply
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

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