igor::iPixmap Class Reference

#include <iPixmap.h>

Public Member Functions

 ~iPixmap ()
 
uint32 getWidth () const
 
uint32 getHeight () const
 
uint32 getBytesPerPixel () const
 
iColorFormat getColorFormat () const
 
uint8getData () const
 
const iaColor4c getPixelRGBA (float64 x, float64 y) const
 
const iaColor3c getPixelRGB (float64 x, float64 y) const
 
void setPixel (float64 x, float64 y, const iaColor4c &color)
 
void setPixel (float64 x, float64 y, const iaColor3c &color)
 

Static Public Member Functions

static iPixmapPtr createPixmap (uint32 width, uint32 height, iColorFormat colorFormat, uint8 *data=nullptr)
 
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,
uint8 data = nullptr 
)
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
raw pixel data

◆ getHeight()

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

◆ getPixelRGB()

const iaColor3c igor::iPixmap::getPixelRGB ( float64  x,
float64  y 
) const

same as getPixel but returns type iaColor3c

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ getPixelRGBA()

const iaColor4c igor::iPixmap::getPixelRGBA ( float64  x,
float64  y 
) const

same as getPixel but returns type iaColor4c

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

◆ setPixel() [1/2]

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

same as setPixel but returns type iaColor3c

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

◆ setPixel() [2/2]

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

same as setPixel but returns type iaColor4c

Parameters
xx coordinate
xy coordinate
[out]colorthe returned color

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