Blender V5.0
Freestyle::FrsImage Class Referenceabstract

#include <Image.h>

Inherited by Freestyle::GrayImage, and Freestyle::RGBImage.

Public Member Functions

 FrsImage ()
 FrsImage (const FrsImage &brother)
 FrsImage (uint w, uint h)
 FrsImage (uint w, uint h, uint sw, uint sh, uint ox, uint oy)
FrsImageoperator= (const FrsImage &brother)
virtual ~FrsImage ()
uint width () const
uint height () const
virtual float pixel (uint x, uint y) const =0
virtual void setArray (float *array, uint width, uint height, uint sw, uint sh, uint x, uint y, bool copy=true)=0
virtual floatgetArray ()=0

Protected Attributes

uint _width
uint _height
uint _storedWidth
uint _storedHeight
uint _Ox
uint _Oy

Detailed Description

This class allows the storing of part of an image, while allowing a normal access to its pixel values. You can for example only a rectangle of sw*sh, whose lower-left corner is at (ox, oy), of an image of size w*h, and access these pixels using x,y coordinates specified in the whole image coordinate system.

Definition at line 28 of file Image.h.

Constructor & Destructor Documentation

◆ FrsImage() [1/4]

◆ FrsImage() [2/4]

Freestyle::FrsImage::FrsImage ( const FrsImage & brother)
inline

Copy constructor

Definition at line 42 of file Image.h.

References _height, _Ox, _Oy, _storedHeight, _storedWidth, _width, and FrsImage().

◆ FrsImage() [3/4]

Freestyle::FrsImage::FrsImage ( uint w,
uint h )
inline

Builds an FrsImage from its width and height. The memory is allocated consequently.

Definition at line 55 of file Image.h.

References _height, _Ox, _Oy, _storedHeight, _storedWidth, _width, and w().

◆ FrsImage() [4/4]

Freestyle::FrsImage::FrsImage ( uint w,
uint h,
uint sw,
uint sh,
uint ox,
uint oy )
inline

Builds a partial-storing image.

Parameters
wThe width of the complete image
hThe height of the complete image
swThe width of the rectangle that will actually be stored.
shThe height of the rectangle that will actually be stored.
oxThe x-abscissa of the origin of the rectangle that will actually be stored.
oyThe x-abscissa of the origin of the rectangle that will actually be stored.

Definition at line 79 of file Image.h.

References _height, _Ox, _Oy, _storedHeight, _storedWidth, _width, and w().

◆ ~FrsImage()

virtual Freestyle::FrsImage::~FrsImage ( )
inlinevirtual

Destructor

Definition at line 102 of file Image.h.

Member Function Documentation

◆ getArray()

virtual float * Freestyle::FrsImage::getArray ( )
pure virtual

Returns the array containing the pixels values. Its size is sw*sh, i.e. potentially a smaller rectangular part of the complete image.

Implemented in Freestyle::GrayImage, and Freestyle::RGBImage.

◆ height()

◆ operator=()

FrsImage & Freestyle::FrsImage::operator= ( const FrsImage & brother)
inline

Operator=

Definition at line 90 of file Image.h.

References _height, _Ox, _Oy, _storedHeight, _storedWidth, _width, and FrsImage().

◆ pixel()

virtual float Freestyle::FrsImage::pixel ( uint x,
uint y ) const
pure virtual

Returns the gray value for pixel x,y

Implemented in Freestyle::GrayImage, and Freestyle::RGBImage.

References Freestyle::x, and y.

◆ setArray()

virtual void Freestyle::FrsImage::setArray ( float * array,
uint width,
uint height,
uint sw,
uint sh,
uint x,
uint y,
bool copy = true )
pure virtual

Sets the array.

Parameters
arrayThe array containing the values we wish to store. Its size is sw*sh.
widthThe width of the complete image
heightThe height of the complete image
swThe width of the rectangle that will actually be stored.
shThe height of the rectangle that will actually be stored.
oxThe x-abscissa of the origin of the rectangle that will actually be stored.
oyThe x-abscissa of the origin of the rectangle that will actually be stored.
copyIf true, the array is copied, otherwise the pointer is copied

Implemented in Freestyle::GrayImage, and Freestyle::RGBImage.

References copy(), height(), width(), Freestyle::x, and y.

◆ width()

Member Data Documentation

◆ _height

◆ _Ox

◆ _Oy

◆ _storedHeight

◆ _storedWidth

◆ _width


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