Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub
Drawing Functions

Drawing functions to annotate debug information. More...

Data Structures

class  Font
 The Font class provides text drawing. More...
 

Functions

template<template< class > class A, class Color >
SIMD_INLINE void DrawLine (View< A > &canvas, ptrdiff_t x1, ptrdiff_t y1, ptrdiff_t x2, ptrdiff_t y2, const Color &color, size_t width=1)
 Draws a line at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawLine (View< A > &canvas, const Point< ptrdiff_t > &p1, const Point< ptrdiff_t > &p2, const Color &color, size_t width=1)
 Draws a line at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawRectangle (View< A > &canvas, const Rectangle< ptrdiff_t > &rect, const Color &color, size_t width=1)
 Draws a rectangle at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawRectangle (View< A > &canvas, const Point< ptrdiff_t > &topLeft, const Point< ptrdiff_t > &bottomRight, const Color &color, size_t width=1)
 Draws a rectangle at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawRectangle (View< A > &canvas, ptrdiff_t left, ptrdiff_t top, ptrdiff_t right, ptrdiff_t bottom, const Color &color, size_t width=1)
 Draws a rectangle at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawFilledRectangle (View< A > &canvas, Rectangle< ptrdiff_t > rect, const Color &color)
 Draws a filled rectangle at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawPolygon (View< A > &canvas, const std::vector< Simd::Point< ptrdiff_t > > &polygon, const Color &color, size_t width=1)
 Draws a polygon at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawFilledPolygon (View< A > &canvas, const std::vector< Simd::Point< ptrdiff_t > > &polygon, const Color &color)
 Draws a filled polygon at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawEllipse (View< A > &canvas, const Point< ptrdiff_t > &center, const Point< ptrdiff_t > &axes, double slope, const Color &color, size_t width=1)
 Draws an ellipse at the image. More...
 
template<template< class > class A, class Color >
SIMD_INLINE void DrawCircle (View< A > &canvas, const Point< ptrdiff_t > &center, ptrdiff_t radius, const Color &color, size_t width=1)
 Draws a circle at the image. More...
 

Detailed Description

Drawing functions to annotate debug information.

Function Documentation

◆ DrawLine() [1/2]

void DrawLine ( View< A > &  canvas,
ptrdiff_t  x1,
ptrdiff_t  y1,
ptrdiff_t  x2,
ptrdiff_t  y2,
const Color &  color,
size_t  width = 1 
)

Draws a line at the image.

Parameters
[out]canvas- a canvas (image where we draw line).
[in]x1- X coordinate of the first point of the line.
[in]y1- Y coordinate of the first point of the line.
[in]x2- X coordinate of the second point of the line.
[in]y2- Y coordinate of the second point of the line.
[in]color- a color of the line.
[in]width- a width of the line. By default it is equal to 1.

◆ DrawLine() [2/2]

void DrawLine ( View< A > &  canvas,
const Point< ptrdiff_t > &  p1,
const Point< ptrdiff_t > &  p2,
const Color &  color,
size_t  width = 1 
)

Draws a line at the image.

Parameters
[out]canvas- a canvas (image where we draw line).
[in]p1- the first point of the line.
[in]p2- the second point of the line.
[in]color- a color of the line.
[in]width- a width of the line. By default it is equal to 1.

◆ DrawRectangle() [1/3]

void DrawRectangle ( View< A > &  canvas,
const Rectangle< ptrdiff_t > &  rect,
const Color &  color,
size_t  width = 1 
)

Draws a rectangle at the image.

Parameters
[out]canvas- a canvas (image where we draw rectangle).
[in]rect- a rectangle.
[in]color- a color of the rectangle frame.
[in]width- a width of the rectangle frame. By default it is equal to 1.

◆ DrawRectangle() [2/3]

void DrawRectangle ( View< A > &  canvas,
const Point< ptrdiff_t > &  topLeft,
const Point< ptrdiff_t > &  bottomRight,
const Color &  color,
size_t  width = 1 
)

Draws a rectangle at the image.

Parameters
[out]canvas- a canvas (image where we draw rectangle).
[in]topLeft- a top-left corner of the rectangle.
[in]bottomRight- a bottom-right corner of the rectangle.
[in]color- a color of the rectangle frame.
[in]width- a width of the rectangle frame. By default it is equal to 1.

◆ DrawRectangle() [3/3]

void DrawRectangle ( View< A > &  canvas,
ptrdiff_t  left,
ptrdiff_t  top,
ptrdiff_t  right,
ptrdiff_t  bottom,
const Color &  color,
size_t  width = 1 
)

Draws a rectangle at the image.

Parameters
[out]canvas- a canvas (image where we draw rectangle).
[in]left- a left of the rectangle.
[in]top- a top of the rectangl.
[in]right- a right of the rectangl.
[in]bottom- a bottom of the rectangl.
[in]color- a color of the rectangle frame.
[in]width- a width of the rectangle frame. By default it is equal to 1.

◆ DrawFilledRectangle()

void DrawFilledRectangle ( View< A > &  canvas,
Rectangle< ptrdiff_t >  rect,
const Color &  color 
)

Draws a filled rectangle at the image.

Parameters
[out]canvas- a canvas (image where we draw filled rectangle).
[in]rect- a rectangle to fill.
[in]color- a color of the filled rectangle.

◆ DrawPolygon()

void DrawPolygon ( View< A > &  canvas,
const std::vector< Simd::Point< ptrdiff_t > > &  polygon,
const Color &  color,
size_t  width = 1 
)

Draws a polygon at the image.

Parameters
[out]canvas- a canvas (image where we draw polygon).
[in]polygon- a polygon.
[in]color- a color of the polygon.
[in]width- a width of the polygon. By default it is equal to 1.

◆ DrawFilledPolygon()

void DrawFilledPolygon ( View< A > &  canvas,
const std::vector< Simd::Point< ptrdiff_t > > &  polygon,
const Color &  color 
)

Draws a filled polygon at the image.

Parameters
[out]canvas- a canvas (image where we draw filled polygon).
[in]polygon- a polygon.
[in]color- a color of the polygon frame.

◆ DrawEllipse()

void DrawEllipse ( View< A > &  canvas,
const Point< ptrdiff_t > &  center,
const Point< ptrdiff_t > &  axes,
double  slope,
const Color &  color,
size_t  width = 1 
)

Draws an ellipse at the image.

Parameters
[out]canvas- a canvas (image where we draw ellipse).
[in]center- a center of the ellipse.
[in]axes- axes of the ellipse.
[in]slope- a slope of the ellipse.
[in]color- a color of the ellipse.
[in]width- a width of the ellipse.

◆ DrawCircle()

void DrawCircle ( View< A > &  canvas,
const Point< ptrdiff_t > &  center,
ptrdiff_t  radius,
const Color &  color,
size_t  width = 1 
)

Draws a circle at the image.

Parameters
[out]canvas- a canvas (image where we draw circle).
[in]center- a center of the circle.
[in]radius- a radius of the circle.
[in]color- a color of the circle.
[in]width- a width of the circle.