SpatiumLib
Static Public Member Functions | Static Protected Member Functions | List of all members
spatium::gfx2d::Drawing Class Reference

2D drawing functions More...

#include <Drawing.h>

Static Public Member Functions

template<typename T , int N>
static void drawCurve (Image< T, N > &image, const BezierCurve &curve, std::array< T, N > val)
 Draw a Bezier curve. More...
 
template<typename T , int N>
static void drawCircle (Image< T, N > &image, std::array< int, 2 > center, int radius, std::array< T, N > val)
 Draw a circle. More...
 
template<typename T , int N>
static void drawLine (Image< T, N > &image, const std::array< int, 2 > &start, const std::array< int, 2 > &end, const std::array< T, N > &val)
 Draw a line. More...
 
template<typename T , int N>
static void drawRectangle (Image< T, N > &image, const std::array< int, 2 > &topLeft, const std::array< int, 2 > &bottomRight, const std::array< T, N > &val, bool fill=false)
 Draw a rectangle. More...
 

Static Protected Member Functions

template<typename T , int N>
static void drawLineLow (Image< T, N > &image, int &x0, int &y0, int &x1, int &y1, const std::array< T, N > &val)
 
template<typename T , int N>
static void drawLineHigh (Image< T, N > &image, int x0, int y0, int x1, int y1, const std::array< T, N > &val)
 

Detailed Description

2D drawing functions

Drawing is a non-instantiable class with various 2D drawing functions.

Member Function Documentation

◆ drawCircle()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawCircle ( Image< T, N > &  image,
std::array< int, 2 >  center,
int  radius,
std::array< T, N >  val 
)
inlinestatic

Draw a circle.

Parameters
[in,out]imageImage to draw in
[in]centerCenter point of the circle
[in]radiusRadius of the circle
[in]valValue to apply for each pixel on the circle

◆ drawCurve()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawCurve ( Image< T, N > &  image,
const BezierCurve curve,
std::array< T, N >  val 
)
inlinestatic

Draw a Bezier curve.

Parameters
[in,out]imageImage to draw in
[in]curveBezier curve
[in]valueValue to apply for each pixel on the curve

◆ drawLine()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawLine ( Image< T, N > &  image,
const std::array< int, 2 > &  start,
const std::array< int, 2 > &  end,
const std::array< T, N > &  val 
)
inlinestatic

Draw a line.

Parameters
[in,out]imageImage to draw in
[in]startStart point of the line
[in]endEnd point of the line
[in]valValue to apply for each pixel on the line

◆ drawLineHigh()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawLineHigh ( Image< T, N > &  image,
int  x0,
int  y0,
int  x1,
int  y1,
const std::array< T, N > &  val 
)
inlinestaticprotected

◆ drawLineLow()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawLineLow ( Image< T, N > &  image,
int &  x0,
int &  y0,
int &  x1,
int &  y1,
const std::array< T, N > &  val 
)
inlinestaticprotected

◆ drawRectangle()

template<typename T , int N>
static void spatium::gfx2d::Drawing::drawRectangle ( Image< T, N > &  image,
const std::array< int, 2 > &  topLeft,
const std::array< int, 2 > &  bottomRight,
const std::array< T, N > &  val,
bool  fill = false 
)
inlinestatic

Draw a rectangle.

Parameters
[in,out]imageImage to draw in
[in]topLeftTop left corner of the rectangle
[in]bottomRightBottom right corner of the rectangle
[in]valValue to apply for each pixel on the rectangle
[in]fillIndicator to fill the rectangle (default = false)

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