TouchCPLib  1.0.0
A touch-enabled GUI interface based on SDL and libTS. It provides a simple desktop-free UI for your embedded Raspberry projects.
XiaolinWu Class Reference

#include <XiaolinWu.h>

Static Public Member Functions

static void drawLine (float x0, float y0, float x1, float y1, std::function< void(int, int, float)> plot)
 Draw a line using the XiaolinWu antialiasing algorithm. More...
 

Member Function Documentation

◆ drawLine()

static void XiaolinWu::drawLine ( float  x0,
float  y0,
float  x1,
float  y1,
std::function< void(int, int, float)>  plot 
)
inlinestatic

Draw a line using the XiaolinWu antialiasing algorithm.

Parameters
x0X coordinate of the starting point
y0Y coordinate of the starting point
x1X coordinate of the end point
y1Y coordinate of the end point
plotA function that will plot the antialiased points to the screen. It will be called with the X coordinate, the Y coordinate, and the brightness that the point has to have (0.0 - 1.0)

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