2D drawing functions
More...
#include <Drawing.h>
|
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...
|
|
|
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) |
|
2D drawing functions
Drawing is a non-instantiable class with various 2D drawing functions.
◆ 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] | image | Image to draw in |
[in] | center | Center point of the circle |
[in] | radius | Radius of the circle |
[in] | val | Value 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] | image | Image to draw in |
[in] | curve | Bezier curve |
[in] | value | Value 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] | image | Image to draw in |
[in] | start | Start point of the line |
[in] | end | End point of the line |
[in] | val | Value 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] | image | Image to draw in |
[in] | topLeft | Top left corner of the rectangle |
[in] | bottomRight | Bottom right corner of the rectangle |
[in] | val | Value to apply for each pixel on the rectangle |
[in] | fill | Indicator to fill the rectangle (default = false) |
The documentation for this class was generated from the following file:
- /home/martijn/Development/Projects/SpatiumLib/include/spatium/gfx2d/Drawing.h