igor::iPixmap Class Reference

#include <iPixmap.h>

Public Member Functions

 ~iPixmap ()
 
uint32 getWidth () const
 
uint32 getHeight () const
 
uint32 getBytesPerPixel () const
 
iColorFormat getColorFormat () const
 
void setData (uint8 *data)
 
uint8getData () const
 
uint32 getPixel (uint32 x, uint32 y) const
 
void setPixel (uint32 x, uint32 y, uint32 color)
 
void getPixel (float64 x, float64 y, iaColor4f &color) const
 
void getPixelBiLinear (float64 x, float64 y, iaColor4f &color) const
 
void getPixel (float64 x, float64 y, iaColor3f &color) const
 
void getPixel (float64 x, float64 y, iaColor4c &color) const
 
void getPixel (float64 x, float64 y, iaColor3c &color) const
 
uint8 getPixel (uint32 x, uint32 y, uint8 colorChannel) const
 
void setPixel (uint32 x, uint32 y, uint8 colorChannel, uint8 value)
 
void setPixelRGB (uint32 x, uint32 y, uint8 r, uint8 g, uint8 b)
 
void setPixelRGBA (uint32 x, uint32 y, uint8 r, uint8 g, uint8 b, uint8 a)
 

Static Public Member Functions

static iPixmapPtr createPixmap (uint32 width, uint32 height, iColorFormat colorFormat)
 
static iPixmapPtr loadPixmap (const iaString &filename)
 

Detailed Description

pixmap is an editable texture

in order to use it for rendering one has to transform it in to a iTexture

Constructor & Destructor Documentation

◆ ~iPixmap()

igor::iPixmap::~iPixmap ( )

releases resources

Member Function Documentation

◆ createPixmap()

iPixmapPtr igor::iPixmap::createPixmap ( uint32  width,
uint32  height,
iColorFormat  colorFormat 
)
static

creates new pixmap with given parameters

Parameters
widthwidth of pixmap in pixel
heightheight of pixmap in pixel
colorFormatthe color format of the pixmap

◆ getBytesPerPixel()

uint32 igor::iPixmap::getBytesPerPixel ( ) const
Returns
bytes per pixel

◆ getColorFormat()

iColorFormat igor::iPixmap::getColorFormat ( ) const
Returns
color format in use

◆ getData()

uint8 * igor::iPixmap::getData ( ) const
Returns
pointer to pixel data

◆ getHeight()

uint32 igor::iPixmap::getHeight ( ) const
Returns
height of pixmap

◆ getPixel() [1/6]

void igor::iPixmap::getPixel ( float64  x,
float64  y,
iaColor3c color 
) const

same as getPixel but returns type iaColor3c

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getPixel() [2/6]

void igor::iPixmap::getPixel ( float64  x,
float64  y,
iaColor3f color 
) const

same as getPixel but returns type iaColor3f

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getPixel() [3/6]

void igor::iPixmap::getPixel ( float64  x,
float64  y,
iaColor4c color 
) const

same as getPixel but returns type iaColor4c

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getPixel() [4/6]

void igor::iPixmap::getPixel ( float64  x,
float64  y,
iaColor4f color 
) const

same as getPixel but returns type iaColor4f

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getPixel() [5/6]

uint32 igor::iPixmap::getPixel ( uint32  x,
uint32  y 
) const
Returns
pixel value from given position
Parameters
xx coordinate
xy coordinate

◆ getPixel() [6/6]

uint8 igor::iPixmap::getPixel ( uint32  x,
uint32  y,
uint8  colorChannel 
) const
Returns
value of color channel at given position
Parameters
xx coordinate
xy coordinate
colorChannelthe chosen color channel

◆ getPixelBiLinear()

void igor::iPixmap::getPixelBiLinear ( float64  x,
float64  y,
iaColor4f color 
) const

same as getPixel but uses bilinear filter to calculate returned color

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getWidth()

uint32 igor::iPixmap::getWidth ( ) const
Returns
width of pixmap

◆ loadPixmap()

iPixmapPtr igor::iPixmap::loadPixmap ( const iaString filename)
static

loads pixmap from file

Parameters
filenamethe file to load
Returns
pixmap

◆ setData()

void igor::iPixmap::setData ( uint8 data)

sets pixmap data

Parameters
data

◆ setPixel() [1/2]

void igor::iPixmap::setPixel ( uint32  x,
uint32  y,
uint32  color 
)

sets pixel value at given position

Parameters
xx coordinate
xy coordinate
colorthe color to set

◆ setPixel() [2/2]

void igor::iPixmap::setPixel ( uint32  x,
uint32  y,
uint8  colorChannel,
uint8  value 
)

sets color channel at given position

Parameters
xx coordinate
xy coordinate
colorChannelthe chosen color channel
valuethe new color channel value

◆ setPixelRGB()

void igor::iPixmap::setPixelRGB ( uint32  x,
uint32  y,
uint8  r,
uint8  g,
uint8  b 
)

sets pixel color at given position

Parameters
xx coordinate
xy coordinate
rred color channel
ggreen color channel
bblur color channel

◆ setPixelRGBA()

void igor::iPixmap::setPixelRGBA ( uint32  x,
uint32  y,
uint8  r,
uint8  g,
uint8  b,
uint8  a 
)

sets pixel color at given position

Parameters
xx coordinate
xy coordinate
rred color channel
ggreen color channel
bblur color channel
aalpha color channel

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