MPLABĀ® Harmony Graphics Suite
GFX v3.13.0
Legato API Documentation
|
Pixel Buffer functions and definitions. More...
#include "gfx/legato/common/legato_color.h"
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... | |
Pixel Buffer functions and definitions.
Pixel buffer generation and management functions.
leBool lePixelBuffer_IsLocked | ( | const lePixelBuffer *const | buffer | ) |
Determines the lock state.
Returns the lock state of buffer.
param1 | buffer is the source color value. |
leResult lePixelBuffer_SetLocked | ( | lePixelBuffer * | buffer, |
leBool | locked | ||
) |
Sets the lock.
Set the lock flag on buffer to the desired lock state specified by locked.
param1 | buffer is the source color value. |
param2 | locked is the source color mode |
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.
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
leResult lePixelBufferCreate | ( | const int32_t | width, |
const int32_t | height, | ||
const leColorMode | mode, | ||
const void *const | address, | ||
lePixelBuffer * | buffer | ||
) |
Create a pixelbuffer.
param1 | buffer is the source color value. |
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
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
leColor lePixelBufferGetIndex_Unsafe | ( | const lePixelBuffer *const | buffer, |
const uint32_t | idx | ||
) |
Pixel get.
A faster less-safe version of lePixelBufferGetIndex.
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |
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
param1 | buffer is the source color value. |
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.
param1 | buffer is the source color value. |