Simple++
Powerfull and lightning fast C++ Library
|
Image Class T Type of one pixel F Format of the image. More...
#include <Image.h>
Public Types | |
enum | ResamplingMode { ResamplingMode::Nearest, ResamplingMode::Linear, ResamplingMode::Lanczos } |
enum | ConvolutionMode { ConvolutionMode::NormalSize, ConvolutionMode::ExtendedSize } |
enum | ConversionMode { ConversionMode::Luminance, ConversionMode::Trunquate, ConversionMode::Alpha } |
enum | StrokeType { StrokeType::Outside, StrokeType::Inside, StrokeType::Middle } |
typedef _ImageSumType< T >::Type | SumType |
Type used to sum multiple pixels components. More... | |
Public Member Functions | |
template<typename C > | |
_Image (const _Image< C > &image) | |
copy constructor with an another storage type More... | |
_Image (Format format=Format::RGB) | |
Empty constructor, create an image unallocated of size (0:0) More... | |
_Image (const Math::Vec2< Size > &size, Format format=Format::RGB) | |
Constructor to create an initialized image of specified size. More... | |
_Image (std::fstream *fileStream) | |
create a new image data from a file stream. More... | |
_Image (const T *data, const Math::Vec2< Size > &size, LoadingFormat loadingFormat=LoadingFormat::RGB, bool invertY=false, size_t stride=0) | |
Constructor to create an image from a data buffer. More... | |
_Image (const _Image< T > &image) | |
copy constructor More... | |
_Image (_Image< T > &&image) | |
move constructor More... | |
~_Image () | |
const Math::Vec2< Size > & | getSize () const |
get the actual size (width:height) of the image More... | |
Size | getWidth () const |
get the actual width of the image More... | |
Size | getHeight () const |
get the actual height of the image More... | |
size_t | getNbPixels () const |
get the number of pixels of this image More... | |
void | clear (const Math::Vec2< Size > &size) |
reset this image with a new size. More... | |
void | clear (const Math::Vec2< Size > &size, Format format) |
reset this image with a new size and a new format More... | |
void | setDatas (const T *data, const Math::Vec2< Size > &size, LoadingFormat loadingFormat=LoadingFormat::RGB, bool invertY=false, size_t stride=0) |
set the data from an another data buffer. More... | |
_Image< T > * | createMipmap () |
create a new image from this one with a size of width / 2 and height / 2 More... | |
const T * | getDatas () const |
get the data buffer of this image More... | |
T * | getDatas () |
get the data buffer of this image More... | |
const T * | getDatas (Size x, Size y) const |
get the data buffer of this image starting with the selected pixel More... | |
T * | getDatas (Size x, Size y) |
get the data buffer of this image starting with the selected pixel More... | |
const T * | getPixel (Size x, Size y) const |
get a pixel from this image More... | |
T * | getPixel (Size x, Size y) |
get a pixel from this image More... | |
size_t | getDataOffset (Size x, Size y) const |
get the offset of pixel from the beginning of the data More... | |
void | setPixel (Size x, Size y, const T *p) |
set a pixel inside this image More... | |
template<typename C > | |
_Image< T > & | operator= (const _Image< C > &image) |
copy operator with another type More... | |
_Image< T > & | operator= (const _Image< T > &image) |
copy operator More... | |
_Image< T > & | operator= (_Image< T > &&image) |
move operator More... | |
bool | read (std::fstream *fileStream) |
read from a file stream More... | |
bool | write (std::fstream *fileStream) const |
write this object as binary into a file stream More... | |
Format | getFormat () const |
get the format of this image More... | |
unsigned int | getNbComponents () const |
get the number of components per pixels of this image. More... | |
_Image< T > | toFormat (Format newFormat, ConversionMode conversionMode=ConversionMode::Luminance) const |
Create a new Image from this one with a new format. More... | |
template<typename C , typename InterFunc > | |
size_t | computeInterpolation (const GradientHorizontal< C, InterFunc > &gradient, C **buffer, const Rectangle &rectangle, Math::Rectangle< Size > *clampedRectangle) const |
Compute the interpolation for horizontal gradient. More... | |
template<typename C , typename InterFunc > | |
size_t | computeInterpolation (const GradientVertical< C, InterFunc > &gradient, C **buffer, const Rectangle &rectangle, Math::Rectangle< Size > *clampedRectangle) const |
Compute the interpolation for vertical gradient. More... | |
template<typename C , typename InterFunc > | |
size_t | computeInterpolation (const GradientLinear< C, InterFunc > &gradient, C **buffer, const Rectangle &rectangle, Math::Rectangle< Size > *clampedRectangle) const |
Compute the interpolation for Linear gradient. More... | |
template<typename C , typename InterFunc > | |
size_t | computeInterpolation (const GradientRadial< C, InterFunc > &gradient, C **buffer, const Rectangle &rectangle, Math::Rectangle< Size > *clampedRectangle) const |
Compute the interpolation for Radial gradient. More... | |
template<typename ThreshFunc > | |
void | threshold (const ColorRGBA< T > &colorTrue, const ColorRGBA< T > &colorFalse, const ThreshFunc &threshFunc) |
Threshold the image with a specified functor. More... | |
void | threshold (const ColorRGBA< T > &colorOver, const ColorRGBA< T > &colorUnder, const ColorRGBA< T > &limit) |
Threshold the image with a specified threshold. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawLine (const LineF &l, const ColorR< T > &color, unsigned int thickness=1, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an anti aliased line from point p1 to point p2 More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawLine (const LineF &l, const ColorRGB< T > &color, unsigned int thickness=1, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an anti aliased line from point p1 to point p2 More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawLine (const LineF &l, const ColorRGBA< T > &color, unsigned int thickness=1, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an anti aliased line from point p1 to point p2 More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawLineFunctor (const LineF &l, ColorFunc &colorFunc, unsigned int thickness=1, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an anti aliased line from point p1 to point p2 More... | |
template<typename Functor > | |
void | setPixels (Functor &functor, const Rectangle &rectangle) |
Set a functor to each pixels in the rectangle of this image. More... | |
template<typename Functor > | |
void | setPixels (Functor &functor) |
Set a functor to each pixels of this image. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const ColorR< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const ColorRGB< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const ColorRGBA< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename C , typename InterFunc > | |
void | drawRectangle (const Rectangle &rectangle, const GradientHorizontal< C, InterFunc > &gradient) |
draw a rectangle inside this image. More... | |
template<typename C , typename InterFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const GradientLinear< C, InterFunc > &gradient, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename C , typename InterFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const GradientRadial< C, InterFunc > &gradient, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename C , typename InterFunc , typename BlendFunc > | |
void | drawRectangle (const Rectangle &rectangle, const GradientHorizontal< C, InterFunc > &gradient, const BlendFunc &blendFunc) |
draw a rectangle inside this image. More... | |
template<typename C , typename InterFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangle (const Rectangle &rectangle, const GradientVertical< C, InterFunc > &gradient, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangleFunctor (const Rectangle &rectangle, ColorFunc &colorFunc, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a rectangle inside this image. More... | |
void | fillImage (const T *color) |
fill the complete image with a color. param color pointer to a color with the same number of component of this image More... | |
void | fillImage (const T *color, const Rectangle &rectangle) |
fill the complete image with a color. More... | |
void | fillImage (const ColorR< T > &color) |
fill the complete image with a color. More... | |
void | fillImage (const ColorRGB< T > &color) |
fill the complete image with a color. More... | |
void | fillImage (const ColorRGBA< T > &color) |
fill the complete image with a color. More... | |
void | fillImage (const ColorR< T > &color, const Rectangle &rectangle) |
fill the complete image with a color. More... | |
void | fillImage (const ColorRGB< T > &color, const Rectangle &rectangle) |
fill the complete image with a color. More... | |
void | fillImage (const ColorRGBA< T > &color, const Rectangle &rectangle) |
fill the complete image with a color. More... | |
template<typename C , typename InterFunc > | |
void | fillImage (const GradientHorizontal< C, InterFunc > &gradient, const Rectangle &rectangle) |
fill the complete image with a horizontal gradient. More... | |
template<typename C , typename InterFunc > | |
void | fillImage (const GradientVertical< C, InterFunc > &gradient, const Rectangle &rectangle) |
fill the complete image with a vertical gradient. More... | |
template<typename C , typename InterFunc > | |
void | fillImage (const GradientLinear< C, InterFunc > &gradient, const Rectangle &rectangle) |
fill the complete image with a Linear gradient. More... | |
template<typename C , typename InterFunc > | |
void | fillImage (const GradientRadial< C, InterFunc > &gradient, const Rectangle &rectangle) |
fill the complete image with a Radial gradient. More... | |
void | fillImage (const Point &point, const _Image< T > &image) |
fill an another image into this one (no blending will be applied) More... | |
void | fillImage (const Point &point, const Rectangle &rectangle, const _Image< T > &image) |
fill an another image into this one (no blending will be applied) More... | |
void | drawImage (const Point &point, const _Image< T > &image) |
draw an another image into this one More... | |
void | drawImage (const Point &point, const Rectangle &rectangle, const _Image< T > &image) |
draw an another image into this one More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const Rectangle &rectangle, const _Image< T > &image, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an another image into this one with a custom blending function More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorR< T > &color, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorRGB< T > &color, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorRGBA< T > &color, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorR< T > &color, const Rectangle &rectangle, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorRGB< T > &color, const Rectangle &rectangle, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const ColorRGBA< T > &color, const Rectangle &rectangle, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use. More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawImageFunctor (const Point &point, ColorFunc &colorFunc, const Rectangle &rectangle, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use. More... | |
void | drawImage (const Point &point, const _Image< T > &image, const _Image< T > &maskImage) |
draw an another image into this one with a mask image More... | |
void | drawImage (const Point &point, const _Image< T > &image, const Point &maskPoint, const _Image< T > &maskImage) |
draw an another image into this one with a mask image More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawImage (const Point &point, const Rectangle &rectangle, const _Image< T > &image, const Point &maskPoint, const _Image< T > &maskImage, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw an another image into this one with a mask image More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawStrokeFunctor (const Point &point, const _Image< T > &image, unsigned int thickness, ColorFunc &colorFunc, StrokeType strokeType=StrokeType::Middle, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
Stroke the image with a specified color functor. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawStroke (const Point &point, const _Image< T > &image, unsigned int thickness, const ColorR< T > &color, StrokeType strokeType=StrokeType::Middle, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
Stroke the image with a specified color. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawStroke (const Point &point, const _Image< T > &image, unsigned int thickness, const ColorRGB< T > &color, StrokeType strokeType=StrokeType::Middle, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
Stroke the image with a specified color. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawStroke (const Point &point, const _Image< T > &image, unsigned int thickness, const ColorRGBA< T > &color, StrokeType strokeType=StrokeType::Middle, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
Stroke the image with a specified color. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawBezierCurve (const PointF &p0, const PointF &p1, const PointF p2, const PointF &p3, unsigned int thickness, ColorR< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a Cubic Bezier curve. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawBezierCurve (const PointF &p0, const PointF &p1, const PointF p2, const PointF &p3, unsigned int thickness, ColorRGB< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawBezierCurve (const PointF &p0, const PointF &p1, const PointF p2, const PointF &p3, unsigned int thickness, ColorRGBA< T > &color, const BlendFunc &blendFunc=BlendingFunc::Normal()) |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawGraphValuesFunctor (const Vector< Math::Vec2< float >> &values, const Rectangle &rectangle, ColorFunc &colorFunc, BlendFunc &blendFunc=BlendingFunc::Normal()) |
draw points (x,y) as a graph inside a rectangle More... | |
template<typename F , int N> | |
_Image< T > | applyFilter (const F(&filter)[N], ConvolutionMode convolutionMode=ConvolutionMode::ExtendedSize, const ColorRGBA< T > &color=ColorRGBA< T >::null) const |
apply a symmetrical convolution filter (Gaussian blur for example) More... | |
template<typename F > | |
_Image< T > | applyFilter (const F *filter, size_t size, ConvolutionMode convolutionMode=ConvolutionMode::ExtendedSize, const ColorRGBA< T > &color=ColorRGBA< T >::null) const |
apply a symmetrical convolution filter (Gaussian blur for example) More... | |
_Image< T > | applyGaussianBlur (size_t radius, ConvolutionMode convolutionMode=ConvolutionMode::ExtendedSize, const ColorRGBA< T > &color=ColorRGBA< T >::null) const |
apply a Gaussian Blur Filter More... | |
Math::Rectangle< Size > | clampRectangle (const Rectangle &rectangle) const |
Clamp a rectangle inside the image. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangleRounded (const Rectangle &rectangle, unsigned int radius, const ColorR< T > &color, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a rounded rectangle with a color. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangleRounded (const Rectangle &rectangle, unsigned int radius, const ColorRGB< T > &color, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a rounded rectangle with a color. More... | |
template<typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangleRounded (const Rectangle &rectangle, unsigned int radius, const ColorRGBA< T > &color, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a rounded rectangle with a color. More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawRectangleRoundedFunctor (const Rectangle &rectangle, unsigned int radius, ColorFunc &colorFunc, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a rounded rectangle with a color Functor. More... | |
_Image< T > | resample (const Math::Vec2< Size > &newSize, ResamplingMode resamplingMode=ResamplingMode::Nearest) const |
Resize the image with re sampling and return the new one. More... | |
template<typename ColorFunc , typename BlendFunc = BlendingFunc::Normal> | |
void | drawPolygonFunctor (const Math::Vec2< float > *vertices, typename Vector< Math::Vec2< float >>::Size nbVertices, const Rectangle &rectangle, ColorFunc &colorFunc, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a filed Polygon. More... | |
template<typename ColorFunc , typename BlendFunc > | |
void | drawDiskFunctor (const Point &p, float radius, ColorR< T > &c, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a filed Disk. More... | |
template<typename ColorFunc , typename BlendFunc > | |
void | drawDiskFunctor (const Point &p, float radius, ColorRGB< T > &c, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a filed Disk. More... | |
template<typename ColorFunc , typename BlendFunc > | |
void | drawDiskFunctor (const Point &p, float radius, ColorRGBA< T > &c, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a filed Disk. More... | |
template<typename ColorFunc , typename BlendFunc > | |
void | drawDiskFunctor (const Point &p, float radius, ColorFunc &colorFunc, BlendFunc &blendFunc=BlendingFunc::Normal()) |
Draw a filed Disk. More... | |
template<typename K > | |
K | computeGaussianKernel (K *kernel, size_t size, const float &sigma) |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel ) More... | |
template<> | |
float | getComponentMaxValue () |
template<> | |
double | getComponentMaxValue () |
Public Member Functions inherited from BasicSimpleIO | |
bool | read (std::fstream *fileStream) |
read from a file stream More... | |
bool | write (std::fstream *fileStream) const |
write this object as binary into a file stream More... | |
Static Public Member Functions | |
static T | getComponentMaxValue () |
get the maximum value of a color component More... | |
static T | getComponentMinValue () |
get the maximum value of a color component More... | |
template<typename K > | |
static K | getKernelSumNbBits () |
Get the number of bits of the sum of a kernel depending of the types used. More... | |
template<typename K , size_t N> | |
static K | computeGaussianKernel (K(&kernel)[N], const float &sigma) |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel, N : Size of your kernel (has to be odd)) More... | |
template<typename K , size_t N> | |
static K | computeGaussianKernel (K(&kernel)[N]) |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel, N : Size of your kernel (has to be odd)) More... | |
static float | computeGaussianKernel (float *kernel, size_t size, const float &sigma) |
static double | computeGaussianKernel (double *kernel, size_t size, const double &sigma) |
template<typename K > | |
static K | computeGaussianKernel (K *kernel, size_t size) |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel ) More... | |
static float | computeGaussianKernel (float *kernel, size_t size) |
static double | computeGaussianKernel (double *kernel, size_t size) |
Image Class T Type of one pixel F Format of the image.
typedef _ImageSumType<T>::Type Graphic::_Image< T >::SumType |
Type used to sum multiple pixels components.
|
strong |
|
strong |
|
strong |
|
strong |
Graphic::_Image< T >::_Image | ( | const _Image< C > & | image | ) |
copy constructor with an another storage type
image | image to copy |
Graphic::_Image< T >::_Image | ( | Format | format = Format::RGB | ) |
Empty constructor, create an image unallocated of size (0:0)
format | of the image |
Graphic::_Image< T >::_Image | ( | const Math::Vec2< Size > & | size, |
Format | format = Format::RGB |
||
) |
Constructor to create an initialized image of specified size.
size | size of the image to create. |
format | of the image |
Graphic::_Image< T >::_Image | ( | std::fstream * | fileStream | ) |
create a new image data from a file stream.
fileStream | Stream to read |
format | of the image |
Graphic::_Image< T >::_Image | ( | const T * | data, |
const Math::Vec2< Size > & | size, | ||
LoadingFormat | loadingFormat = LoadingFormat::RGB , |
||
bool | invertY = false , |
||
size_t | stride = 0 |
||
) |
Constructor to create an image from a data buffer.
data | Data buffer to copy |
size | size of the new image |
format | of the image |
invertY | if the image has to be flipped vertically or not. |
stride | width of ONE line of the image data in bytes, if stride == 0, the lines are supposed to be contiguous without any padding |
Graphic::_Image< T >::_Image | ( | const _Image< T > & | image | ) |
copy constructor
Graphic::_Image< T >::_Image | ( | _Image< T > && | image | ) |
move constructor
Graphic::_Image< T >::~_Image | ( | ) |
_Image< T > Graphic::_Image< T >::applyFilter | ( | const F(&) | filter[N], |
ConvolutionMode | convolutionMode = ConvolutionMode::ExtendedSize , |
||
const ColorRGBA< T > & | color = ColorRGBA<T>::null |
||
) | const |
apply a symmetrical convolution filter (Gaussian blur for example)
filter | Filter table (the table has to have an odd size) ( |
convolutionMode | Mode of the convolution (if the convolution will create a bigger image or crop it to keep the original size.) |
color | Color of the background |
_Image< T > Graphic::_Image< T >::applyFilter | ( | const F * | filter, |
size_t | size, | ||
ConvolutionMode | convolutionMode = ConvolutionMode::ExtendedSize , |
||
const ColorRGBA< T > & | color = ColorRGBA<T>::null |
||
) | const |
apply a symmetrical convolution filter (Gaussian blur for example)
filter | Filter table (the table has to have an odd size) ( |
convolutionMode | Mode of the convolution (if the convolution will create a bigger image or crop it to keep the original size.) |
color | Color of the background |
_Image< T > Graphic::_Image< T >::applyGaussianBlur | ( | size_t | radius, |
ConvolutionMode | convolutionMode = ConvolutionMode::ExtendedSize , |
||
const ColorRGBA< T > & | color = ColorRGBA<T>::null |
||
) | const |
apply a Gaussian Blur Filter
radius | Radius of the blur |
convolutionMode | Mode of the convolution (if the convolution will create a bigger image or crop it to keep the original size.) |
color | Color of the background |
|
inline |
Clamp a rectangle inside the image.
rectangle | rectangle to be clamped |
void Graphic::_Image< T >::clear | ( | const Math::Vec2< Size > & | size | ) |
reset this image with a new size.
size | new size |
void Graphic::_Image< T >::clear | ( | const Math::Vec2< Size > & | size, |
Format | format | ||
) |
reset this image with a new size and a new format
size | new size |
format | new format of the image |
|
static |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel, N : Size of your kernel (has to be odd))
kernel | table to be filled (has to be already allocated) |
sigma | Sigma used during the computation |
|
static |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel, N : Size of your kernel (has to be odd))
kernel | table to be filled (has to be already allocated) |
K Graphic::_Image< T >::computeGaussianKernel | ( | K * | kernel, |
size_t | size, | ||
const float & | sigma | ||
) |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel )
kernel | table to be filled (has to be already allocated) |
size | (Radius * 2 + 1) of the kernel (must be odd) |
sigma | Sigma used during the computation |
|
static |
|
static |
|
static |
compute the Vertical/Horizontal Gaussian Kernel (K : Type of Values in your Kernel )
kernel | table to be filled (has to be already allocated) |
size | (Radius * 2 + 1) of the kernel (must be odd) |
|
static |
|
static |
size_t Graphic::_Image< T >::computeInterpolation | ( | const GradientHorizontal< C, InterFunc > & | gradient, |
C ** | buffer, | ||
const Rectangle & | rectangle, | ||
Math::Rectangle< Size > * | clampedRectangle | ||
) | const |
Compute the interpolation for horizontal gradient.
out | buffer Pointer to a buffer that will be allocated (will be deletable with delete []) |
in | rectangle used to specify the size of the gradient |
out | clampedRectangle Rectangle clamped inside this image return size of the freshly allocated buffer |
size_t Graphic::_Image< T >::computeInterpolation | ( | const GradientVertical< C, InterFunc > & | gradient, |
C ** | buffer, | ||
const Rectangle & | rectangle, | ||
Math::Rectangle< Size > * | clampedRectangle | ||
) | const |
Compute the interpolation for vertical gradient.
out | buffer Pointer to a buffer that will be allocated (will be deletable with delete []) |
in | rectangle used to specify the size of the gradient |
out | clampedRectangle Rectangle clamped inside this image return size of the freshly allocated buffer |
size_t Graphic::_Image< T >::computeInterpolation | ( | const GradientLinear< C, InterFunc > & | gradient, |
C ** | buffer, | ||
const Rectangle & | rectangle, | ||
Math::Rectangle< Size > * | clampedRectangle | ||
) | const |
Compute the interpolation for Linear gradient.
out | buffer Pointer to a buffer that will be allocated (will be deletable with delete []) |
in | rectangle used to specify the size of the gradient |
out | clampedRectangle Rectangle clamped inside this image return size of the freshly allocated buffer |
size_t Graphic::_Image< T >::computeInterpolation | ( | const GradientRadial< C, InterFunc > & | gradient, |
C ** | buffer, | ||
const Rectangle & | rectangle, | ||
Math::Rectangle< Size > * | clampedRectangle | ||
) | const |
Compute the interpolation for Radial gradient.
out | buffer Pointer to a buffer that will be allocated (will be deletable with delete []) |
in | rectangle used to specify the size of the gradient |
out | clampedRectangle Rectangle clamped inside this image return size of the freshly allocated buffer |
_Image< T > * Graphic::_Image< T >::createMipmap | ( | ) |
create a new image from this one with a size of width / 2 and height / 2
void Graphic::_Image< T >::drawBezierCurve | ( | const PointF & | p0, |
const PointF & | p1, | ||
const PointF | p2, | ||
const PointF & | p3, | ||
unsigned int | thickness, | ||
ColorR< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Draw a Cubic Bezier curve.
drawBezierCurve
p0 | Point 0 |
p1 | Point 1 |
p2 | Point 2 |
p3 | Point 3 |
thickness | Thickness of the curve |
color | Color to be used |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, T alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, T alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, T alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawBezierCurve | ( | const PointF & | p0, |
const PointF & | p1, | ||
const PointF | p2, | ||
const PointF & | p3, | ||
unsigned int | thickness, | ||
ColorRGB< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
void Graphic::_Image< T >::drawBezierCurve | ( | const PointF & | p0, |
const PointF & | p1, | ||
const PointF | p2, | ||
const PointF & | p3, | ||
unsigned int | thickness, | ||
ColorRGBA< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
void Graphic::_Image< T >::drawDiskFunctor | ( | const Point & | p, |
float | radius, | ||
ColorR< T > & | c, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal() |
||
) |
Draw a filed Disk.
p | Center point of the disk |
radius | Radius of the circle in pixels |
c | Color used to fill the disk |
blendFunc | Blending Functor to be used with operator() overloaded with : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawDiskFunctor | ( | const Point & | p, |
float | radius, | ||
ColorRGB< T > & | c, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal() |
||
) |
Draw a filed Disk.
p | Center point of the disk |
radius | Radius of the circle in pixels |
c | Color used to fill the disk |
blendFunc | Blending Functor to be used with operator() overloaded with : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorRGB<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawDiskFunctor | ( | const Point & | p, |
float | radius, | ||
ColorRGBA< T > & | c, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal() |
||
) |
Draw a filed Disk.
p | Center point of the disk |
radius | Radius of the circle in pixels |
c | Color used to fill the disk |
blendFunc | Blending Functor to be used with operator() overloaded with : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorRGBA<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawDiskFunctor | ( | const Point & | p, |
float | radius, | ||
ColorFunc & | colorFunc, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal() |
||
) |
Draw a filed Disk.
p | Center point of the disk |
radius | Radius of the circle in pixels |
colorFunc | Color Functor to be used ( |
blendFunc | Blending Functor to be used with operator() overloaded with : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawGraphValuesFunctor | ( | const Vector< Math::Vec2< float >> & | values, |
const Rectangle & | rectangle, | ||
ColorFunc & | colorFunc, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw points (x,y) as a graph inside a rectangle
values | Vector of floating points (points has to be between 0.0 and 1.0) (the points has to be ascending ordered using their x coordinate) |
rectangle | Rectangle where to draw the graph |
colorFunc | Color Functor used to draw |
blendFunc | Blending Functor used to draw |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const _Image< T > & | image | ||
) |
draw an another image into this one
point | Position where to draw. |
image | Another image to draw |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const Rectangle & | rectangle, | ||
const _Image< T > & | image | ||
) |
draw an another image into this one
point | Position where to draw. |
rectangle | rectangle of the second image to draw. (The rectangle HAS TO BE smaller or equal of the given image) |
image | Another image to draw |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const Rectangle & | rectangle, | ||
const _Image< T > & | image, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an another image into this one with a custom blending function
point | Position where to draw. |
rectangle | rectangle of the second image to draw. (The rectangle HAS TO BE smaller or equal of the given image) |
image | Another image to draw |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" |
"template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;"
"template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;"
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorR< T > & | color, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask
point | Position where to draw. |
color | Color to draw |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorRGB< T > & | color, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask
point | Position where to draw. |
color | Color to draw |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorRGBA< T > & | color, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask
point | Position where to draw. |
color | Color to draw |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorR< T > & | color, | ||
const Rectangle & | rectangle, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use.
point | Position where to draw. |
color | Color to draw |
rectangle | Rectangle of the maskImage to draw. (the rectangle has to be positive and smaller than the size of the maskImage) |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorRGB< T > & | color, | ||
const Rectangle & | rectangle, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use.
point | Position where to draw. |
color | Color to draw |
rectangle | Rectangle of the maskImage to draw. (the rectangle has to be positive and smaller than the size of the maskImage) |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const ColorRGBA< T > & | color, | ||
const Rectangle & | rectangle, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use.
point | Position where to draw. |
color | Color to draw |
rectangle | Rectangle of the maskImage to draw. (the rectangle has to be positive and smaller than the size of the maskImage) |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const _Image< T > & | image, | ||
const _Image< T > & | maskImage | ||
) |
draw an another image into this one with a mask image
point | Position where to draw. |
image | Another image to draw. |
maskImage | mask to use (only the first component will be used to determine the luminance) |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const _Image< T > & | image, | ||
const Point & | maskPoint, | ||
const _Image< T > & | maskImage | ||
) |
draw an another image into this one with a mask image
point | Position where to draw. |
image | Another image to draw. |
maskPoint | Point inside the mask to use. |
maskImage | mask to use (only the first component will be used to determine the luminance) |
void Graphic::_Image< T >::drawImage | ( | const Point & | point, |
const Rectangle & | rectangle, | ||
const _Image< T > & | image, | ||
const Point & | maskPoint, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an another image into this one with a mask image
point | Position where to draw. |
rectangle | rectangle of the second image to draw. (The rectangle HAS TO BE smaller or equal of the given image) |
image | Another image to draw. |
maskPoint | Point inside the mask to use. |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
"template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;"
"template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;"
void Graphic::_Image< T >::drawImageFunctor | ( | const Point & | point, |
ColorFunc & | colorFunc, | ||
const Rectangle & | rectangle, | ||
const _Image< T > & | maskImage, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a color to this image using a mask and a rectangle to know the part of the mask to use.
point | Position where to draw. |
colorFunc | functor that will generate the color for each pixels (see Graphic::ColorFunc::Template), width the methods : "inline void init(const Rectangle & rectangle);" "inline const C & operator()(const Math::Vec2<Size> & p) const;" |
rectangle | Rectangle of the maskImage to draw. (the rectangle has to be positive and smaller than the size of the maskImage) |
maskImage | mask to use (only the first component will be used to determine the luminance) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, const Graphic::ColorR<T> & colorMask)const;" |
void Graphic::_Image< T >::drawLine | ( | const LineF & | l, |
const ColorR< T > & | color, | ||
unsigned int | thickness = 1 , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an anti aliased line from point p1 to point p2
l | Line |
color | Color to draw |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawLine | ( | const LineF & | l, |
const ColorRGB< T > & | color, | ||
unsigned int | thickness = 1 , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an anti aliased line from point p1 to point p2
l | Line |
color | Color to draw |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawLine | ( | const LineF & | l, |
const ColorRGBA< T > & | color, | ||
unsigned int | thickness = 1 , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an anti aliased line from point p1 to point p2
l | Line |
color | Color to draw |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawLineFunctor | ( | const LineF & | l, |
ColorFunc & | colorFunc, | ||
unsigned int | thickness = 1 , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw an anti aliased line from point p1 to point p2
l | Line |
colorFunc | functor that will generate the color for each pixels (see Graphic::ColorFunc::Template), width the methods : "inline void init(const Rectangle & rectangle);" "inline const C & operator()(const Math::Vec2<Size> & p) const;" |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawPolygonFunctor | ( | const Math::Vec2< float > * | vertices, |
typename Vector< Math::Vec2< float >>::Size | nbVertices, | ||
const Rectangle & | rectangle, | ||
ColorFunc & | colorFunc, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal() |
||
) |
Draw a filed Polygon.
vertices | table of vertices to be drawn (vertices have to be between 0.0 and 1.0) |
nbVertices | Number of vertices to draw |
rectangle | Rectangle of the image where to draw the polygon |
colorFunc | Color Functor to be used ( |
blendFunc | Blending Functor to be used with operator() overloaded with : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const ColorR< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
color | Color to draw. |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const ColorRGB< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
color | Color to draw. |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const ColorRGBA< T > & | color, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
color | Color to draw. |
blendFunc | Blending functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const GradientHorizontal< C, InterFunc > & | gradient | ||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
gradient | Gradient to draw. |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const GradientLinear< C, InterFunc > & | gradient, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
gradient | Gradient to draw. |
blendFunc | Blending functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const GradientRadial< C, InterFunc > & | gradient, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
gradient | Gradient to draw. |
blendFunc | Blending functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const GradientHorizontal< C, InterFunc > & | gradient, | ||
const BlendFunc & | blendFunc | ||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
gradient | Gradient to draw. |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrcc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangle | ( | const Rectangle & | rectangle, |
const GradientVertical< C, InterFunc > & | gradient, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
gradient | Gradient to draw. |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangleFunctor | ( | const Rectangle & | rectangle, |
ColorFunc & | colorFunc, | ||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
draw a rectangle inside this image.
rectangle | Rectangle representing the pixels to draw. (the rectangle is clamped inside the image) |
colorFunc | functor that will generate the color for each pixels (see Graphic::ColorFunc::Template), width the methods : "inline void init(const Rectangle & rectangle);" "inline const C & operator()(const Math::Vec2<Size> & p) const;" |
blendFunc | Functor with the methods : "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangleRounded | ( | const Rectangle & | rectangle, |
unsigned int | radius, | ||
const ColorR< T > & | color, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Draw a rounded rectangle with a color.
rectangle | Rectangle to be drawn |
radius | Radius of the rounded angles |
color | Color |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangleRounded | ( | const Rectangle & | rectangle, |
unsigned int | radius, | ||
const ColorRGB< T > & | color, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Draw a rounded rectangle with a color.
rectangle | Rectangle to be drawn |
radius | Radius of the rounded angles |
color | Color |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGB<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangleRounded | ( | const Rectangle & | rectangle, |
unsigned int | radius, | ||
const ColorRGBA< T > & | color, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Draw a rounded rectangle with a color.
rectangle | Rectangle to be drawn |
radius | Radius of the rounded angles |
color | Color |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const Graphic::ColorRGBA<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawRectangleRoundedFunctor | ( | const Rectangle & | rectangle, |
unsigned int | radius, | ||
ColorFunc & | colorFunc, | ||
BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Draw a rounded rectangle with a color Functor.
rectangle | Rectangle to be drawn |
radius | Radius of the rounded angles |
colorFunc | Color Functor |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::drawStroke | ( | const Point & | point, |
const _Image< T > & | image, | ||
unsigned int | thickness, | ||
const ColorR< T > & | color, | ||
StrokeType | strokeType = StrokeType::Middle , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Stroke the image with a specified color.
point | Point where to draw the stroking |
image | Image used to compute the stroking (R & RGB will use the r channel and RGBA the a channel) |
thickness | Thickness of the stroking |
color | color to be used |
strokeType | Type of the stroking (Outside, Inside or Middle) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawStroke | ( | const Point & | point, |
const _Image< T > & | image, | ||
unsigned int | thickness, | ||
const ColorRGB< T > & | color, | ||
StrokeType | strokeType = StrokeType::Middle , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Stroke the image with a specified color.
point | Point where to draw the stroking |
image | Image used to compute the stroking (R & RGB will use the r channel and RGBA the a channel) |
thickness | Thickness of the stroking |
color | color to be used |
strokeType | Type of the stroking (Outside, Inside or Middle) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawStroke | ( | const Point & | point, |
const _Image< T > & | image, | ||
unsigned int | thickness, | ||
const ColorRGBA< T > & | color, | ||
StrokeType | strokeType = StrokeType::Middle , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Stroke the image with a specified color.
point | Point where to draw the stroking |
image | Image used to compute the stroking (R & RGB will use the r channel and RGBA the a channel) |
thickness | Thickness of the stroking |
color | color to be used |
strokeType | Type of the stroking (Outside, Inside or Middle) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const ColorR<T> & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const ColorR<T> & colorSrc)const;" |
void Graphic::_Image< T >::drawStrokeFunctor | ( | const Point & | point, |
const _Image< T > & | image, | ||
unsigned int | thickness, | ||
ColorFunc & | colorFunc, | ||
StrokeType | strokeType = StrokeType::Middle , |
||
const BlendFunc & | blendFunc = BlendingFunc::Normal( ) |
||
) |
Stroke the image with a specified color functor.
point | Point where to draw the stroking |
image | Image used to compute the stroking (R & RGB will use the r channel and RGBA the a channel) |
thickness | Thickness of the stroking |
colorFunc | functor that will generate the color for each pixels, width the methods : "inline void init(const Rectangle & rectangle);" "inline const C & operator()(const Math::Vec2<Size> & p) const;" |
strokeType | Type of the stroking (Outside, Inside or Middle) |
blendFunc | Functor with operator() overloaded with "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc, float alpha)const;" "template<typename T> void operator()(Graphic::ColorR<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGB<T> & colorDest, const C & colorSrc)const;" "template<typename T> void operator()(Graphic::ColorRGBA<T> & colorDest, const C & colorSrc)const;" |
void Graphic::_Image< T >::fillImage | ( | const T * | color | ) |
fill the complete image with a color. param color pointer to a color with the same number of component of this image
void Graphic::_Image< T >::fillImage | ( | const T * | color, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a color.
color | pointer to a color with the same number of component of this image |
rectangle | Rectangle where to fill the color |
void Graphic::_Image< T >::fillImage | ( | const ColorR< T > & | color | ) |
fill the complete image with a color.
color | R color |
void Graphic::_Image< T >::fillImage | ( | const ColorRGB< T > & | color | ) |
fill the complete image with a color.
color | RGB color |
void Graphic::_Image< T >::fillImage | ( | const ColorRGBA< T > & | color | ) |
fill the complete image with a color.
color | RGBA color |
void Graphic::_Image< T >::fillImage | ( | const ColorR< T > & | color, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a color.
color | R color |
rectangle | Rectangle where to fill the color |
void Graphic::_Image< T >::fillImage | ( | const ColorRGB< T > & | color, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a color.
color | RGB color |
rectangle | Rectangle where to fill the color |
void Graphic::_Image< T >::fillImage | ( | const ColorRGBA< T > & | color, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a color.
color | RGBA color |
rectangle | Rectangle where to fill the color |
void Graphic::_Image< T >::fillImage | ( | const GradientHorizontal< C, InterFunc > & | gradient, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a horizontal gradient.
gradient | Gradient |
rectangle | Rectangle where to fill the gradient |
void Graphic::_Image< T >::fillImage | ( | const GradientVertical< C, InterFunc > & | gradient, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a vertical gradient.
gradient | Gradient |
rectangle | Rectangle where to fill the gradient |
void Graphic::_Image< T >::fillImage | ( | const GradientLinear< C, InterFunc > & | gradient, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a Linear gradient.
gradient | Gradient |
rectangle | Rectangle where to fill the gradient |
void Graphic::_Image< T >::fillImage | ( | const GradientRadial< C, InterFunc > & | gradient, |
const Rectangle & | rectangle | ||
) |
fill the complete image with a Radial gradient.
gradient | Gradient |
rectangle | Rectangle where to fill the gradient |
void Graphic::_Image< T >::fillImage | ( | const Point & | point, |
const _Image< T > & | image | ||
) |
fill an another image into this one (no blending will be applied)
point | Position where to draw. |
rectangle | rectangle of the second image to draw. (The rectangle HAS TO BE smaller or equal of the given image) |
image | Another image to draw |
void Graphic::_Image< T >::fillImage | ( | const Point & | point, |
const Rectangle & | rectangle, | ||
const _Image< T > & | image | ||
) |
fill an another image into this one (no blending will be applied)
point | Position where to draw. |
rectangle | rectangle of the second image to draw. (The rectangle HAS TO BE smaller or equal of the given image) |
image | Another image to draw |
|
inlinestatic |
get the maximum value of a color component
maximum | value of a component depending of the template type T |
float Graphic::_Image< float >::getComponentMaxValue | ( | ) |
double Graphic::_Image< double >::getComponentMaxValue | ( | ) |
|
inlinestatic |
get the maximum value of a color component
maximum | value of a component depending of the template type T |
size_t Graphic::_Image< T >::getDataOffset | ( | Size | x, |
Size | y | ||
) | const |
get the offset of pixel from the beginning of the data
x | X coordinate |
y | Y coordinate |
const T * Graphic::_Image< T >::getDatas | ( | ) | const |
get the data buffer of this image
T * Graphic::_Image< T >::getDatas | ( | ) |
get the data buffer of this image
const T * Graphic::_Image< T >::getDatas | ( | Size | x, |
Size | y | ||
) | const |
get the data buffer of this image starting with the selected pixel
T * Graphic::_Image< T >::getDatas | ( | Size | x, |
Size | y | ||
) |
get the data buffer of this image starting with the selected pixel
Format Graphic::_Image< T >::getFormat | ( | ) | const |
get the format of this image
Size Graphic::_Image< T >::getHeight | ( | ) | const |
get the actual height of the image
|
inlinestatic |
Get the number of bits of the sum of a kernel depending of the types used.
|
inline |
get the number of components per pixels of this image.
size_t Graphic::_Image< T >::getNbPixels | ( | ) | const |
get the number of pixels of this image
const T * Graphic::_Image< T >::getPixel | ( | Size | x, |
Size | y | ||
) | const |
get a pixel from this image
x | x coordinate of the pixel |
y | y coordinate of the pixel |
T * Graphic::_Image< T >::getPixel | ( | Size | x, |
Size | y | ||
) |
get a pixel from this image
x | x coordinate of the pixel |
y | y coordinate of the pixel |
const Math::Vec2< Size > & Graphic::_Image< T >::getSize | ( | ) | const |
get the actual size (width:height) of the image
Size Graphic::_Image< T >::getWidth | ( | ) | const |
get the actual width of the image
_Image< T > & Graphic::_Image< T >::operator= | ( | const _Image< C > & | image | ) |
copy operator with another type
image | Image to copy |
_Image< T > & Graphic::_Image< T >::operator= | ( | const _Image< T > & | image | ) |
copy operator
image | Image to copy |
_Image< T > & Graphic::_Image< T >::operator= | ( | _Image< T > && | image | ) |
move operator
image | Image to move from |
bool Graphic::_Image< T >::read | ( | std::fstream * | fileStream | ) |
read from a file stream
fileStream | stream used to read load this object |
_Image< T > Graphic::_Image< T >::resample | ( | const Math::Vec2< Size > & | newSize, |
ResamplingMode | resamplingMode = ResamplingMode::Nearest |
||
) | const |
Resize the image with re sampling and return the new one.
newSize | size of the resulting image |
resamplingMode | Mode used to compute the resulting pixels Nearest : Faster algorithm available, use the nearest pixel without any transformation. Linear : Do a linear interpolation to compute the resulting pixels. Lanczos : Use the Lanczos algorithm ( |
void Graphic::_Image< T >::setDatas | ( | const T * | data, |
const Math::Vec2< Size > & | size, | ||
LoadingFormat | loadingFormat = LoadingFormat::RGB , |
||
bool | invertY = false , |
||
size_t | stride = 0 |
||
) |
set the data from an another data buffer.
data | Data buffer to copy |
size | size of the new image |
invertY | if the image has to be flipped vertically or not. |
stride | width of ONE line of the image data in bytes, if stride == 0, the lines are supposed to be contiguous without any padding |
void Graphic::_Image< T >::setPixel | ( | Size | x, |
Size | y, | ||
const T * | p | ||
) |
set a pixel inside this image
x | x coordinate of the pixel |
y | y coordinate of the pixel |
p | The pixel to set. |
void Graphic::_Image< T >::setPixels | ( | Functor & | functor, |
const Rectangle & | rectangle | ||
) |
Set a functor to each pixels in the rectangle of this image.
functor | Functor with the methods : "inline void operator()(const Math::Vec2<Size> & p, Graphic::ColorR<T> & c);" "inline void operator()(const Math::Vec2<Size> & p, Graphic::ColorRGB<T> & c);" "inline void operator()(const Math::Vec2<Size> & p, Graphic::ColorRGBA<T> & c);" |
rectangle | Rectangle where to apply the functor. |
void Graphic::_Image< T >::setPixels | ( | Functor & | functor | ) |
Set a functor to each pixels of this image.
functor | Functor with operator() overloaded with "template<typename T> void operator()(const Math::Vec2<Size> & p, Graphic::ColorR<T> & c);" "template<typename T> void operator()(const Math::Vec2<Size> & p, Graphic::ColorRGB<T> & c);" "template<typename T> void operator()(const Math::Vec2<Size> & p, Graphic::ColorRGBA<T> & c);" |
void Graphic::_Image< T >::threshold | ( | const ColorRGBA< T > & | colorTrue, |
const ColorRGBA< T > & | colorFalse, | ||
const ThreshFunc & | threshFunc | ||
) |
Threshold the image with a specified functor.
colorTrue | color applied in case of True (color is not blended, only copied) |
colorFalse | color applied in case of False (color is not blended, only copied) |
functor | Functor with operator() overloaded with "template<typename T> inline bool operator()(Graphic::ColorR<T> & color)const;" "template<typename T> inline bool operator()(Graphic::ColorRGB<T> & color)const;" "template<typename T> inline bool operator()(Graphic::ColorRGBA<T> & color)const;" |
void Graphic::_Image< T >::threshold | ( | const ColorRGBA< T > & | colorOver, |
const ColorRGBA< T > & | colorUnder, | ||
const ColorRGBA< T > & | limit | ||
) |
Threshold the image with a specified threshold.
colorOver | color applied in case if every component is OVER the limit (color is not blended, only copied) |
colorFalse | color applied in case if at least one component is UNDER the limit (color is not blended, only copied) |
limit | color used to be the threshold, component to component will be compared. |
_Image< T > Graphic::_Image< T >::toFormat | ( | Format | newFormat, |
ConversionMode | conversionMode = ConversionMode::Luminance |
||
) | const |
Create a new Image from this one with a new format.
newFormat | Format of the new image |
conversionMode | Only used when converted to Format::R (Luminance : Use the average of the RGB channels, Trunquate : Use the R channel, Alpha : Use the Alpha Channel) |
bool Graphic::_Image< T >::write | ( | std::fstream * | fileStream | ) | const |
write this object as binary into a file stream
fileStream | stream used to write this object |