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::RectangleBuilder Class Reference

#include <builders.hpp>

Public Member Functions

 RectangleBuilder () noexcept=default
 Default constructor creates a builder with default values.
 
auto top_left (Point pt) noexcept -> RectangleBuilder &
 Set the top-left corner of the rectangle.
 
auto top_left (std::size_t x, std::size_t y) noexcept -> RectangleBuilder &
 Set the top-left corner using coordinates.
 
auto bottom_right (Point pt) noexcept -> RectangleBuilder &
 Set the bottom-right corner of the rectangle.
 
auto bottom_right (std::size_t x, std::size_t y) noexcept -> RectangleBuilder &
 Set the bottom-right corner using coordinates.
 
auto at (Point pt) noexcept -> RectangleBuilder &
 Set the position (top-left corner) of the rectangle.
 
auto at (std::size_t x, std::size_t y) noexcept -> RectangleBuilder &
 Set the position using coordinates.
 
auto size (Size sz) noexcept -> RectangleBuilder &
 Set the size of the rectangle.
 
auto size (std::size_t w, std::size_t h) noexcept -> RectangleBuilder &
 Set the size using width and height.
 
auto color (Color c) noexcept -> RectangleBuilder &
 Set the rectangle color.
 
auto border_width (DotPixel w) noexcept -> RectangleBuilder &
 Set the border width.
 
auto fill (DrawFill f) noexcept -> RectangleBuilder &
 Set the fill mode.
 
auto with_style (const ShapeStyleSpec &shape_style) noexcept -> RectangleBuilder &
 Apply a reusable shape style.
 
auto build () const noexcept -> RectangleCommand
 Build the final RectangleCommand.
 

Constructor & Destructor Documentation

◆ RectangleBuilder()

epaper::RectangleBuilder::RectangleBuilder ( )
defaultnoexcept

Default constructor creates a builder with default values.

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

Member Function Documentation

◆ at() [1/2]

auto epaper::RectangleBuilder::at ( Point  pt) -> RectangleBuilder &
inlinenoexcept

Set the position (top-left corner) of the rectangle.

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

◆ at() [2/2]

auto epaper::RectangleBuilder::at ( std::size_t  x,
std::size_t  y 
) -> RectangleBuilder &
inlinenoexcept

Set the position using coordinates.

Parameters
xX coordinate
yY coordinate
Returns
Reference to this builder for chaining

◆ border_width()

auto epaper::RectangleBuilder::border_width ( DotPixel  w) -> RectangleBuilder &
inlinenoexcept

Set the border width.

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

◆ bottom_right() [1/2]

auto epaper::RectangleBuilder::bottom_right ( Point  pt) -> RectangleBuilder &
inlinenoexcept

Set the bottom-right corner of the rectangle.

Parameters
ptBottom-right corner
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ bottom_right() [2/2]

auto epaper::RectangleBuilder::bottom_right ( std::size_t  x,
std::size_t  y 
) -> RectangleBuilder &
inlinenoexcept

Set the bottom-right corner using coordinates.

Parameters
xBottom-right X coordinate
yBottom-right Y coordinate
Returns
Reference to this builder for chaining

◆ build()

auto epaper::RectangleBuilder::build ( ) const -> RectangleCommand
inlinenoexcept

◆ color()

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

Set the rectangle color.

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

◆ fill()

auto epaper::RectangleBuilder::fill ( DrawFill  f) -> RectangleBuilder &
inlinenoexcept

Set the fill mode.

Parameters
fFill mode (Empty or Full)
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ size() [1/2]

auto epaper::RectangleBuilder::size ( Size  sz) -> RectangleBuilder &
inlinenoexcept

Set the size of the rectangle.

This method calculates the bottom-right corner based on the current top-left position and the specified size.

Parameters
szSize of the rectangle
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ size() [2/2]

auto epaper::RectangleBuilder::size ( std::size_t  w,
std::size_t  h 
) -> RectangleBuilder &
inlinenoexcept

Set the size using width and height.

Parameters
wWidth
hHeight
Returns
Reference to this builder for chaining

◆ top_left() [1/2]

auto epaper::RectangleBuilder::top_left ( Point  pt) -> RectangleBuilder &
inlinenoexcept

Set the top-left corner of the rectangle.

Parameters
ptTop-left corner
Returns
Reference to this builder for chaining
Examples
/mnt/nas/libepaper/include/epaper/draw/builders.hpp.

◆ top_left() [2/2]

auto epaper::RectangleBuilder::top_left ( std::size_t  x,
std::size_t  y 
) -> RectangleBuilder &
inlinenoexcept

Set the top-left corner using coordinates.

Parameters
xTop-left X coordinate
yTop-left Y coordinate
Returns
Reference to this builder for chainingsrc include/epaper

◆ with_style()

auto epaper::RectangleBuilder::with_style ( const ShapeStyleSpec shape_style) -> RectangleBuilder &
inlinenoexcept

Apply a reusable shape style.

Parameters
shape_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: