MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_pixelbuffer.h File Reference

Pixel Buffer functions and definitions. More...

Include dependency graph for legato_pixelbuffer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  lePixelBuffer
 

Typedefs

typedef struct lePixelBuffer lePixelBuffer
 

Enumerations

enum  BufferFlags { BF_NONE = 0 }
 leArray data structure definition.
 

Functions

leResult lePixelBufferCreate (const int32_t width, const int32_t height, const leColorMode mode, const void *const address, lePixelBuffer *buffer)
 Create a pixelbuffer. More...
 
leBuffer lePixelBufferOffsetGet (const lePixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get buffer at point. More...
 
leBuffer lePixelBufferOffsetGet_Unsafe (const lePixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get buffer at point. More...
 
leColor lePixelBufferGet (const lePixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get pixel at point. More...
 
leColor lePixelBufferGet_Unsafe (const lePixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get pixel at point. More...
 
leColor lePixelBufferGetIndex (const lePixelBuffer *const buffer, const uint32_t idx)
 Get color at index. More...
 
leColor lePixelBufferGetIndex_Unsafe (const lePixelBuffer *const buffer, const uint32_t idx)
 Pixel get. More...
 
leResult lePixelBufferClipRect (const lePixelBuffer *const buffer, const leRect *const rect, leRect *result)
 Clip rectangle. More...
 
leResult lePixelBufferSet (const lePixelBuffer *const buffer, uint32_t x, uint32_t y, leColor color)
 Pixel set. More...
 
leResult lePixelBufferSet_Unsafe (const lePixelBuffer *const buffer, uint32_t x, uint32_t y, leColor color)
 Pixel set. More...
 
leResult lePixelBufferAreaFill (const lePixelBuffer *const buffer, uint32_t x, uint32_t y, uint32_t w, uint32_t h, const leColor color)
 Area fill with checking. More...
 
leResult lePixelBufferAreaFill_Unsafe (const lePixelBuffer *const buffer, uint32_t x, uint32_t y, uint32_t w, uint32_t h, leColor color)
 Area fill no checking. More...
 
leResult lePixelBufferCopy (lePixelBuffer *dest, uint32_t x, uint32_t y, const lePixelBuffer *src, const leRect *srcRect)
 
leBool lePixelBuffer_IsLocked (const lePixelBuffer *const buffer)
 Determines the lock state. More...
 
leResult lePixelBuffer_SetLocked (lePixelBuffer *buffer, leBool locked)
 Sets the lock. More...
 

Detailed Description

Pixel Buffer functions and definitions.

Pixel buffer generation and management functions.

Function Documentation

◆ lePixelBuffer_IsLocked()

leBool lePixelBuffer_IsLocked ( const lePixelBuffer *const  buffer)

Determines the lock state.

Returns the lock state of buffer.

lePixelBuffer* buffer;
leResult res = lePixelBuffer_SetLocked(buffer, locked);
Parameters
param1buffer is the source color value.
Returns
true if the buffer locked, otherwse false.

◆ lePixelBuffer_SetLocked()

leResult lePixelBuffer_SetLocked ( lePixelBuffer buffer,
leBool  locked 
)

Sets the lock.

Set the lock flag on buffer to the desired lock state specified by locked.

lePixelBuffer* buffer;
leBool locked;
leResult res = lePixelBuffer_SetLocked(buffer, locked);
Parameters
param1buffer is the source color value.
param2locked is the source color mode
Returns
leResult.

◆ lePixelBufferAreaFill()

leResult lePixelBufferAreaFill ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y,
uint32_t  w,
uint32_t  h,
const leColor  color 
)

Area fill with checking.

Fill buffer with color defined by the x, y w, h.

lePixelBuffer* buffer;
leResult res = lePixelBufferAreaFill_Unsafe(buffer, locked);
Parameters
param1buffer is the source color value.
Returns
true if the buffer locked, otherwse false.

◆ lePixelBufferAreaFill_Unsafe()

leResult lePixelBufferAreaFill_Unsafe ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y,
uint32_t  w,
uint32_t  h,
leColor  color 
)

Area fill no checking.

Fill buffer with color defined by the x, y w, h.

lePixelBuffer* buffer;
leResult res = lePixelBufferAreaFill_Unsafe(buffer, locked);
Parameters
param1buffer is the source color value.
Returns
true if the buffer locked, otherwse false.

◆ lePixelBufferClipRect()

leResult lePixelBufferClipRect ( const lePixelBuffer *const  buffer,
const leRect *const  rect,
leRect result 
)

Clip rectangle.

Clips a rectangle against a pixel buffer. The result is guaranteed to fit inside the buffer's area.

lePixelBuffer* buffer;
leResult res = lePixelBufferClipRect(buffer, x, y, color);
Parameters
param1buffer is the source color value.
Returns
leResult.

◆ lePixelBufferCreate()

leResult lePixelBufferCreate ( const int32_t  width,
const int32_t  height,
const leColorMode  mode,
const void *const  address,
lePixelBuffer buffer 
)

Create a pixelbuffer.

lePixelBuffer* buffer;
leResult res = lePixelBufferCreate(buffer, x, y);
Parameters
param1buffer is the source color value.
Returns
leResult.

◆ lePixelBufferGet()

leColor lePixelBufferGet ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get pixel at point.

Gets the value of the pixel that resides at the provided point in the given buffer

lePixelBuffer* buffer;
leColor color = lePixelBufferGet(buffer, x, y);
Parameters
param1buffer is the source color value.
Returns
leColor.
Here is the call graph for this function:

◆ lePixelBufferGet_Unsafe()

leColor lePixelBufferGet_Unsafe ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get pixel at point.

Gets the value of the pixel that resides at the provided point in the given buffer. Like lePixelBufferGet but performs no bounds checking.

lePixelBuffer* buffer;
leColor color = lePixelBufferGetIndex_Unsafe(buffer, idx);
Parameters
param1buffer is the source color value.
Returns
leResult.
Here is the caller graph for this function:

◆ lePixelBufferGetIndex()

leColor lePixelBufferGetIndex ( const lePixelBuffer *const  buffer,
const uint32_t  idx 
)

Get color at index.

Interprets the pixel buffer as a table of indices and looks up a specific index at position 'idx'. Indices may be 1bpp, 4bpp, or 8bpp in size and are indicated by the color mode of the pixel buffer.

lePixelBuffer* buffer;
leColor color = lePixelBufferGetIndex_Unsafe(buffer, idx);
Parameters
param1buffer is the source color value.
Returns
leResult.

◆ lePixelBufferGetIndex_Unsafe()

leColor lePixelBufferGetIndex_Unsafe ( const lePixelBuffer *const  buffer,
const uint32_t  idx 
)

Pixel get.

A faster less-safe version of lePixelBufferGetIndex.

lePixelBuffer* buffer;
leColor color = lePixelBufferGetIndex_Unsafe(buffer, idx);
Parameters
param1buffer is the source color value.
Returns
leResult.

◆ lePixelBufferOffsetGet()

leBuffer lePixelBufferOffsetGet ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get buffer at point.

Gets the offset address of the pixel that resides at the provided point in the given buffer.

lePixelBuffer* buffer;
leColor color = lePixelBufferOffsetGet(buffer, x, y);
Parameters
param1buffer is the source color value.
Returns
leBuffer.

◆ lePixelBufferOffsetGet_Unsafe()

leBuffer lePixelBufferOffsetGet_Unsafe ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get buffer at point.

Gets the offset address of the pixel that resides at the provided point in the given buffer. Similar to lePixelBufferOffsetGet but performs no bounds checking.

lePixelBuffer* buffer;
leColor color = lePixelBufferOffsetGet_Unsafe(buffer, x, y);
Parameters
param1buffer is the source color value.
Returns
leBuffer.

◆ lePixelBufferSet()

leResult lePixelBufferSet ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y,
leColor  color 
)

Pixel set.

Sets a pixel in a pixel buffer at a point to a specified color. Caller is responsible for ensuring that the input color is in the same color format as the pixel buffer

lePixelBuffer* buffer;
leResult res = lePixelBufferSet(buffer, x, y, color);
Parameters
param1buffer is the source color value.
Returns
leResult.

◆ lePixelBufferSet_Unsafe()

leResult lePixelBufferSet_Unsafe ( const lePixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y,
leColor  color 
)

Pixel set.

Sets a pixel in a pixel buffer at a point to a specified color. Caller is responsible for ensuring that the input color is in the same color format as the pixel buffer. Like lePixelBufferSet but performs no bounds checking.

lePixelBuffer* buffer;
leResult res = lePixelBufferSet_Unsafe(buffer, x, y, color);
Parameters
param1buffer is the source color value.
Returns
leResult.