enesim  0.0.23.1
Drawinglibrary
Defines | Enumerations | Functions
Buffer format
Buffer

Defines

#define ENESIM_BUFFER_FORMAT_LAST   (ENESIM_BUFFER_FORMAT_CMYK_ADOBE + 1)

Enumerations

enum  Enesim_Buffer_Format {
  ENESIM_BUFFER_FORMAT_RGB565,
  ENESIM_BUFFER_FORMAT_ARGB8888,
  ENESIM_BUFFER_FORMAT_ARGB8888_PRE,
  ENESIM_BUFFER_FORMAT_XRGB8888,
  ENESIM_BUFFER_FORMAT_RGB888,
  ENESIM_BUFFER_FORMAT_BGR888,
  ENESIM_BUFFER_FORMAT_A8,
  ENESIM_BUFFER_FORMAT_GRAY,
  ENESIM_BUFFER_FORMAT_CMYK,
  ENESIM_BUFFER_FORMAT_CMYK_ADOBE
}

Functions

EAPI Eina_Bool enesim_buffer_format_rgb_components_from (Enesim_Buffer_Format *fmt, int depth, uint8_t aoffset, uint8_t alen, uint8_t roffset, uint8_t rlen, uint8_t goffset, uint8_t glen, uint8_t boffset, uint8_t blen, Eina_Bool premul)
 Get the format based on the components description.
EAPI Eina_Bool enesim_buffer_format_rgb_components_to (Enesim_Buffer_Format fmt, uint8_t *aoffset, uint8_t *alen, uint8_t *roffset, uint8_t *rlen, uint8_t *goffset, uint8_t *glen, uint8_t *boffset, uint8_t *blen, Eina_Bool *premul)
 Get the color components offsets and lengths given a format.
EAPI uint8_t enesim_buffer_format_rgb_depth_get (Enesim_Buffer_Format fmt)
EAPI size_t enesim_buffer_format_size_get (Enesim_Buffer_Format fmt, uint32_t w, uint32_t h)
 Get the size in bytes given a format and a size.

Enumeration Type Documentation

Enumeration of the different buffer formats

Enumerator:
ENESIM_BUFFER_FORMAT_RGB565 

16bpp RGB 565

ENESIM_BUFFER_FORMAT_ARGB8888 

32bpp ARGB 8888

ENESIM_BUFFER_FORMAT_ARGB8888_PRE 

32bpp ARGB premultiplied 8888

ENESIM_BUFFER_FORMAT_XRGB8888 

32bpp RGB 888

ENESIM_BUFFER_FORMAT_RGB888 

24bpp RGB 888

ENESIM_BUFFER_FORMAT_BGR888 

24bpp BGR 888

ENESIM_BUFFER_FORMAT_A8 

8bpp A 8

ENESIM_BUFFER_FORMAT_GRAY 

8bpp Grayscale

ENESIM_BUFFER_FORMAT_CMYK 

CMYK

ENESIM_BUFFER_FORMAT_CMYK_ADOBE 

Adobe CMYK


Function Documentation

EAPI Eina_Bool enesim_buffer_format_rgb_components_from ( Enesim_Buffer_Format fmt,
int  depth,
uint8_t  aoffset,
uint8_t  alen,
uint8_t  roffset,
uint8_t  rlen,
uint8_t  goffset,
uint8_t  glen,
uint8_t  boffset,
uint8_t  blen,
Eina_Bool  premul 
)

Get the format based on the components description.

Parameters:
[out]fmtThe format associated with the components
[in]depthThe pixel depth
[in]aoffsetAlpha offset
[in]alenAlpha length
[in]roffsetRed offset
[in]rlenRed length
[in]goffsetGreen offset
[in]glenGreen length
[in]boffsetBlue offset
[in]blenBlue length
[in]premulFlag to indicate if the components are premultiplied
Returns:
EINA_TRUE if the format can be described by the provided ARGB components, EINA_FALSE otherwise
EAPI Eina_Bool enesim_buffer_format_rgb_components_to ( Enesim_Buffer_Format  fmt,
uint8_t *  aoffset,
uint8_t *  alen,
uint8_t *  roffset,
uint8_t *  rlen,
uint8_t *  goffset,
uint8_t *  glen,
uint8_t *  boffset,
uint8_t *  blen,
Eina_Bool *  premul 
)

Get the color components offsets and lengths given a format.

Parameters:
[in]fmtThe format to get the components from
[out]aoffsetAlpha offset
[out]alenAlpha length
[out]roffsetRed offset
[out]rlenRed length
[out]goffsetGreen offset
[out]glenGreen length
[out]boffsetBlue offset
[out]blenBlue length
[out]premulFlag to indicate if the components are premultiplied
Returns:
EINA_TRUE if the format can be described as ARGB components, EINA_FALSE otherwise

Gets the pixel depth of the format

Parameters:
fmtThe format to get the depth from
Returns:
The depth in bits per pixel
EAPI size_t enesim_buffer_format_size_get ( Enesim_Buffer_Format  fmt,
uint32_t  w,
uint32_t  h 
)

Get the size in bytes given a format and a size.

Parameters:
[in]fmtThe format to get the size from
[in]wThe width to get the size from
[in]hThe height to get the size from
Returns:
The size in bytes
 All Data Structures Variables