FastLED 3.9.15
Loading...
Searching...
No Matches

◆ drawLine()

template<typename PixelT, typename Coord>
void fl::gfx::drawLine ( Canvas< PixelT > & canvas,
const PixelT & color,
Coord x0,
Coord y0,
Coord x1,
Coord y1,
fl::DrawMode mode = fl::DrawMode::DRAW_MODE_BLEND )
inline

============================================================================

CANVAS API (Primary - Cache Optimal)

Graphics operations work on rectangular Canvas objects with direct row-major indexing. All drawing functions use row-major indexing for cache-optimal performance.

Wu antialiased line drawing

Parameters
canvasCanvas with pixel buffer and dimensions
x0,y0,x1,y1Line start and end coordinates (any arithmetic type)
colorPixel color

Definition at line 643 of file primitives.h.

645 {
647 detail::drawLineCore<PixelT, Coord, true>(canvas, color, x0, y0, x1, y1);
648 else
649 detail::drawLineCore<PixelT, Coord, false>(canvas, color, x0, y0, x1, y1);
650}
void drawLineCore(Canvas< PixelT > &canvas, const PixelT &color, Coord x0, Coord y0, Coord x1, Coord y1)
Definition primitives.h:530
@ DRAW_MODE_OVERWRITE
Definition draw_mode.h:5

References fl::DRAW_MODE_OVERWRITE, and fl::gfx::detail::drawLineCore().

Referenced by fl::gfx::Canvas< RGB_T >::drawLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: