Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub
Drawing Functions

Drawing functions. 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...
 

Detailed Description

Drawing functions.

Function Documentation

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.
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.
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's frame.
[in]width- a width of the rectangle's frame. By default it is equal to 1.