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

GFX driver functions and definitions. More...

#include <stddef.h>
#include <assert.h>
#include <string.h>
#include <stdint.h>
Include dependency graph for gfx_driver.h.ftl:

Data Structures

struct  gfxPoint
 This struct represents a point. More...
 
struct  gfxSize
 This struct represents a size. More...
 
struct  gfxRect
 This struct represents a rectangle. More...
 
struct  gfxLayerState
 This struct represents a layer state. More...
 
struct  gfxColorModeInfo
 This struct represents color mode information. More...
 
struct  gfxPixelBuffer
 This struct represents a pixel buffer. More...
 
struct  gfxIOCTLArg_Value
 This struct represents a standard IOCTL value argument. More...
 
struct  gfxIOCTLArg_DisplaySize
 This struct represents a standard IOCTL size value argument. More...
 
struct  gfxIOCTLArg_Palette
 This struct represents an IOCTL palette argument. More...
 
struct  gfxIOCTLArg_LayerArg
 This struct represents a basic layer request argument. More...
 
struct  gfxIOCTLArg_LayerIRQCallback
 This struct represents layer IRQ callback. More...
 
struct  gfxIOCTLArg_LayerPosition
 This struct represents layer position. More...
 
struct  gfxIOCTLArg_LayerSize
 This struct represents layer size. More...
 
struct  gfxIOCTLArg_LayerRect
 This struct represents a layer rectangle. More...
 
struct  gfxIOCTLArg_LayerValue
 This struct represents a common layer value. More...
 
struct  gfxDisplayDriver
 This struct represents the display driver interface. More...
 
struct  gfxGraphicsProcessor
 This struct represents the graphics processor interface. More...
 

Macros

#define GFX_DRIVER_H
 
#define GFX_COLOR_MAX_SIZE   4
 
#define RGB_8_BITS   255
 
#define RGB_6_BITS   63
 
#define RGB_5_BITS   31
 
#define RGB_3_BITS   7
 
#define RGB_2_BITS   2
 
#define RGB_332_RED_MASK   0xE0
 
#define RGB_332_GREEN_MASK   0x1C
 
#define RGB_332_BLUE_MASK   0x3
 
#define RGB_565_RED_MASK   0xF800
 
#define RGB_565_GREEN_MASK   0x7E0
 
#define RGB_565_BLUE_MASK   0x1F
 
#define RGBA_5551_RED_MASK   0xF800
 
#define RGBA_5551_GREEN_MASK   0x7C0
 
#define RGBA_5551_BLUE_MASK   0x3E
 
#define RGBA_5551_ALPHA_MASK   0x1
 
#define RGB_888_RED_MASK   0xFF0000
 
#define RGB_888_GREEN_MASK   0xFF00
 
#define RGB_888_BLUE_MASK   0xFF
 
#define RGBA_8888_RED_MASK   0xFF000000
 
#define RGBA_8888_GREEN_MASK   0xFF0000
 
#define RGBA_8888_BLUE_MASK   0xFF00
 
#define RGBA_8888_ALPHA_MASK   0xFF
 
#define ARGB_8888_RED_MASK   0xFF0000
 
#define ARGB_8888_GREEN_MASK   0xFF00
 
#define ARGB_8888_BLUE_MASK   0xFF
 
#define ARGB_8888_ALPHA_MASK   0xFF000000
 
#define GFX_CTRLR_LAYER_START   0x80000000
 
#define GFX_COLOR_MODE_LAST_COLOR   (GFX_COLOR_MODE_MONOCHROME)
 
#define GFX_COLOR_MODE_COUNT   (GFX_COLOR_MODE_LAST_COLOR + 1)
 
#define GFX_COLOR_MODE_IS_PIXEL(mode)   ((mode >= GFX_COLOR_MODE_GS_8) && (mode <= GFX_COLOR_MODE_ARGB_8888))
 
#define GFX_COLOR_MODE_IS_INDEX(mode)   ((mode >= GFX_COLOR_MODE_INDEX_1) && (mode <= GFX_COLOR_MODE_INDEX_8))
 
#define GFX_COLOR_MODE_IS_ALPHA(mode)   ((mode == GFX_COLOR_MODE_RGBA_5551) || (mode == GFX_COLOR_MODE_RGBA_8888) || (mode == GFX_COLOR_MODE_ARGB_8888))
 
#define GFX_IOCTL_LAYER_REQ_START   GFX_IOCTL_SET_LAYER_LOCK
 
#define GFX_IOCTL_LAYER_REQ_END   GFX_IOCTL_SET_LAYER_COLOR_MODE
 

Typedefs

typedef uint32_t gfxColor
 
typedef enum gfxResult gfxResult
 This enum represents function call results. More...
 
typedef enum gfxBool gfxBool
 This enum represents booleans. More...
 
typedef struct gfxPoint gfxPoint
 This struct represents a point. More...
 
typedef struct gfxSize gfxSize
 This struct represents a size. More...
 
typedef struct gfxRect gfxRect
 This struct represents a rectangle. More...
 
typedef struct gfxLayerState gfxLayerState
 This struct represents a layer state. More...
 
typedef void * gfxBuffer
 This type represents a buffer;.
 
typedef enum gfxColorMask gfxColorMask
 This enum represents a color mask. More...
 
typedef enum gfxColorMode gfxColorMode
 This enum represents color modes. More...
 
typedef enum gfxBitsPerPixel gfxBitsPerPixel
 This enum represents bits per pixel (BPP). More...
 
typedef struct gfxColorModeInfo gfxColorModeInfo
 This struct represents color mode information. More...
 
typedef enum gfxOrientation gfxOrientation
 This enum represents orientation modes. More...
 
typedef enum gfxBlend gfxBlend
 This enum represents blend modes. More...
 
typedef enum gfxAlpha gfxAlpha
 This enum represents alpha modes. More...
 
typedef enum gfxTransparency gfxTransparency
 This enum represents transparency modes. More...
 
typedef enum gfxPaletteSelect gfxPaletteSelect
 
typedef struct gfxPixelBuffer gfxPixelBuffer
 This struct represents a pixel buffer. More...
 
typedef void(* gfxBlitCallBack) (void)
 
typedef void(* gfxIRQCallBack) (uintptr_t layerID)
 
typedef enum gfxDriverIOCTLRequest gfxDriverIOCTLRequest
 This struct represents the possible IOCTL requests for a gfx driver. More...
 
typedef enum gfxDriverIOCTLResponse gfxDriverIOCTLResponse
 This enum represents the possible IOCTL responses for a gfx driver. More...
 
typedef struct gfxIOCTLArg_Value gfxIOCTLArg_Value
 This struct represents a standard IOCTL value argument. More...
 
typedef struct gfxIOCTLArg_DisplaySize gfxIOCTLArg_DisplaySize
 This struct represents a standard IOCTL size value argument. More...
 
typedef struct gfxIOCTLArg_Palette gfxIOCTLArg_Palette
 This struct represents an IOCTL palette argument. More...
 
typedef struct gfxDisplayDriver gfxDisplayDriver
 This struct represents the display driver interface. More...
 
typedef struct gfxGraphicsProcessor gfxGraphicsProcessor
 This struct represents the graphics processor interface. More...
 

Enumerations

enum  gfxResult { GFX_FAILURE = -1, GFX_SUCCESS = 0 }
 This enum represents function call results. More...
 
enum  gfxBool { GFX_FALSE = 0, GFX_TRUE }
 This enum represents booleans. More...
 
enum  gfxColorMask {
  GFX_COLOR_MASK_GS_8 = 0x1, GFX_COLOR_MASK_PALETTE = 0x1, GFX_COLOR_MASK_RGB_332 = 0x4, GFX_COLOR_MASK_RGB_565 = 0x8,
  GFX_COLOR_MASK_RGBA_5551 = 0x10, GFX_COLOR_MASK_RGB_888 = 0x20, GFX_COLOR_MASK_RGBA_8888 = 0x40, GFX_COLOR_MASK_ARGB_8888 = 0x80,
  GFX_COLOR_MASK_ALL
}
 This enum represents a color mask. More...
 
enum  gfxColorMode {
  GFX_COLOR_MODE_GS_8 = 0, GFX_COLOR_MODE_PALETTE = GFX_COLOR_MODE_GS_8, GFX_COLOR_MODE_RGB_332 = 1, GFX_COLOR_MODE_RGB_565 = 2,
  GFX_COLOR_MODE_RGBA_5551 = 3, GFX_COLOR_MODE_RGB_888 = 4, GFX_COLOR_MODE_RGBA_8888 = 5, GFX_COLOR_MODE_ARGB_8888 = 6,
  GFX_COLOR_MODE_INDEX_1 = 7, GFX_COLOR_MODE_INDEX_4 = 8, GFX_COLOR_MODE_INDEX_8 = 9, GFX_COLOR_MODE_MONOCHROME = 10,
  GFX_COLOR_MODE_LAST = GFX_COLOR_MODE_MONOCHROME
}
 This enum represents color modes. More...
 
enum  gfxBitsPerPixel {
  GFX_BPP1, GFX_BPP4, GFX_BPP8, GFX_BPP16,
  GFX_BPP24, GFX_BPP32
}
 This enum represents bits per pixel (BPP). More...
 
enum  gfxOrientation { GFX_ORIENT_0, GFX_ORIENT_90, GFX_ORIENT_180, GFX_ORIENT_270 }
 This enum represents orientation modes. More...
 
enum  gfxBlend {
  GFX_BLEND_NONE, GFX_BLEND_SRC_OVER, GFX_BLEND_DST_OVER, GFX_BLEND_SRC_IN,
  GFX_BLEND_DST_IN, GFX_BLEND_ADDITIVE, GFX_BLEND_SUBTRACT
}
 This enum represents blend modes. More...
 
enum  gfxAlpha { GFX_GLOBAL_ALPHA_OFF, GFX_GLOBAL_ALPHA_ON, GFX_GLOBAL_ALPHA_SCALE }
 This enum represents alpha modes. More...
 
enum  gfxTransparency { GFX_TRANSPARENCY_NONE, GFX_TRANSPARENCY_SOURCE, GFX_TRANSPARENCY_DESTINATION }
 This enum represents transparency modes. More...
 
enum  gfxPaletteSelect { GFX_PALETTE_ONE, GFX_PALETTE_TWO }
 
enum  gfxBufferFlags { GFX_BF_NONE = 0, GFX_BF_LOCKED = 1 << 0 }
 This enum represents buffer flags. More...
 
enum  gfxDriverIOCTLRequest {
  GFX_IOCTL_RESET, GFX_IOCTL_GET_COLOR_MODE, GFX_IOCTL_GET_BUFFER_COUNT, GFX_IOCTL_GET_DISPLAY_SIZE,
  GFX_IOCTL_GET_STATUS, GFX_IOCTL_ENABLE_GPU, GFX_IOCTL_LAYER_SWAP, GFX_IOCTL_FRAME_START,
  GFX_IOCTL_FRAME_END, GFX_IOCTL_GET_VSYNC_COUNT, GFX_IOCTL_GET_FRAMEBUFFER, GFX_IOCTL_SET_PALETTE,
  GFX_IOCTL_SET_VBLANK_SYNC, GFX_IOCTL_GET_LAYER_COUNT, GFX_IOCTL_GET_ACTIVE_LAYER, GFX_IOCTL_SET_ACTIVE_LAYER,
  GFX_IOCTL_SET_BRIGHTNESS, GFX_IOCTL_SET_LAYER_LOCK, GFX_IOCTL_GET_LAYER_ENABLED, GFX_IOCTL_SET_LAYER_ENABLED,
  GFX_IOCTL_SET_LAYER_UNLOCK, GFX_IOCTL_GET_LAYER_RECT, GFX_IOCTL_SET_LAYER_POSITION, GFX_IOCTL_SET_LAYER_SIZE,
  GFX_IOCTL_SET_LAYER_WINDOW_SIZE, GFX_IOCTL_SET_LAYER_ALPHA, GFX_IOCTL_SET_LAYER_BASE_ADDRESS, GFX_IOCTL_SET_LAYER_COLOR_MODE,
  GFX_IOCTL_SET_BLIT_CALLBACK, GFX_IOCTL_SET_IRQ_CALLBACK
}
 This struct represents the possible IOCTL requests for a gfx driver. More...
 
enum  gfxDriverIOCTLResponse { GFX_IOCTL_UNSUPPORTED = -1, GFX_IOCTL_OK = 0, GFX_IOCTL_ERROR_UNKNOWN = 1 }
 This enum represents the possible IOCTL responses for a gfx driver. More...
 

Functions

uint32_t gfxColorChannelRed (gfxColor clr, gfxColorMode mode)
 Get red channel. More...
 
uint32_t gfxColorChannelGreen (gfxColor clr, gfxColorMode mode)
 Get green channel. More...
 
uint32_t gfxColorChannelBlue (gfxColor clr, gfxColorMode mode)
 Get blue channel. More...
 
uint32_t gfxColorChannelAlpha (gfxColor clr, gfxColorMode mode)
 Get alpha channel. More...
 
gfxColor gfxColorConvert (gfxColorMode mode_in, gfxColorMode mode_out, gfxColor color)
 
gfxResult gfxPixelBufferCreate (const int32_t width, const int32_t height, const gfxColorMode mode, const void *const address, gfxPixelBuffer *buffer)
 Create pixel buffer. More...
 
gfxBuffer gfxPixelBufferOffsetGet (const gfxPixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get buffer offset. More...
 
gfxBuffer gfxPixelBufferOffsetGet_Unsafe (const gfxPixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get buffer offset. More...
 
gfxColor gfxPixelBufferGet (const gfxPixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get pixel. More...
 
gfxColor gfxPixelBufferGet_Unsafe (const gfxPixelBuffer *const buffer, uint32_t x, uint32_t y)
 Get pixel. More...
 
gfxColor gfxPixelBufferGetIndex (const gfxPixelBuffer *const buffer, const uint32_t idx)
 Get pixel at index. More...
 
gfxColor gfxPixelBufferGetIndex_Unsafe (const gfxPixelBuffer *const buffer, const uint32_t idx)
 Get pixel at index. More...
 
gfxBool gfxPixelBuffer_IsLocked (const gfxPixelBuffer *const buffer)
 Determine if buffer is locked. More...
 
gfxResult gfxPixelBuffer_SetLocked (gfxPixelBuffer *buffer, gfxBool locked)
 Set locked state. More...
 

Variables

const gfxColorModeInfo gfxColorInfoTable []
 This array represents a color information reference table.
 

Detailed Description

GFX driver functions and definitions.

This file defines the common macros and definitions used by the MPLAB Harmony Graphics Suite drivers

Typedef Documentation

◆ gfxAlpha

typedef enum gfxAlpha gfxAlpha

This enum represents alpha modes.

Global alpha modes are used to define the type of global alpha blending operations.

◆ gfxBitsPerPixel

This enum represents bits per pixel (BPP).

List of commonly BPP values to represent color depth.

◆ gfxBlend

typedef enum gfxBlend gfxBlend

This enum represents blend modes.

Blend modes are used to define the type of blend function.

◆ gfxBool

typedef enum gfxBool gfxBool

This enum represents booleans.

Boolean are used to communicate true and false conditions.

◆ gfxColorMask

typedef enum gfxColorMask gfxColorMask

This enum represents a color mask.

Colormask is maskable list of color values to extract color components.

◆ gfxColorMode

typedef enum gfxColorMode gfxColorMode

This enum represents color modes.

Lists the common RGB color representations.

See also
GFX_COLOR_MODE_IS_PIXEL(mode) GFX_COLOR_MODE_IS_INDEX(mode) GFX_COLOR_MODE_IS_ALPHA(mode)

◆ gfxColorModeInfo

This struct represents color mode information.

Color mode information is use to keep track of specific information about a color.

◆ gfxDisplayDriver

This struct represents the display driver interface.

Establishes the interface for a Legato display driver. All drivers must, at a minimum, implement these interfaces. Interfaces with gfxResult can return unsuccessful if not supported.

See also
implementations:
  • drv_gfx_lcc_ftl.h
  • drv_gfx_glcd.h
  • drv_gfx_external_controller_ftl.h

◆ gfxDriverIOCTLRequest

This struct represents the possible IOCTL requests for a gfx driver.

This struct represents the possible IOCTL requests for a gfx driver.

◆ gfxDriverIOCTLResponse

This enum represents the possible IOCTL responses for a gfx driver.

This enum represents the possible IOCTL responses for a gfx driver.

◆ gfxGraphicsProcessor

This struct represents the graphics processor interface.

Establishes the interface for a Legato GPU driver. All drivers must, at a minimum, implement these interfaces. Interfaces that return gfxResult can return unsuccessful if not supported.

See also
implementations:
  • libnano2d_ftl.h

◆ gfxIOCTLArg_DisplaySize

This struct represents a standard IOCTL size value argument.

This struct represents a standard IOCTL size value argument.

◆ gfxIOCTLArg_Palette

This struct represents an IOCTL palette argument.

This struct represents an IOCTL palette value argument.

◆ gfxIOCTLArg_Value

This struct represents a standard IOCTL value argument.

This struct represents a standard IOCTL value argument.

◆ gfxLayerState

typedef struct gfxLayerState gfxLayerState

This struct represents a layer state.

This structure is provided by the driver to describe layer state.

◆ gfxOrientation

This enum represents orientation modes.

List of buffer orientations. Orientation is orthogonal. Rotation which is not parallel to the x or y axis is not supported.

Attention
These definitions are an abstraction of GPU register definitions. Each GPU driver will perform the correct mapping to actual register set values.

◆ gfxPixelBuffer

This struct represents a pixel buffer.

A pixel buffer is a wrapper around a basic data pointer. A pixel buffer has a color mode, a pixel count, a rectangular dimension, a pixel count, and a length in bytes.

◆ gfxPoint

typedef struct gfxPoint gfxPoint

This struct represents a point.

A point is used to define a two dimensional Cartesian coordinate.

◆ gfxRect

typedef struct gfxRect gfxRect

This struct represents a rectangle.

A rectangle defines a rectangle boundary.

◆ gfxResult

typedef enum gfxResult gfxResult

This enum represents function call results.

Results are used to report success and failure conditions. These are the various success and failure codes.

◆ gfxSize

typedef struct gfxSize gfxSize

This struct represents a size.

A size is use to communicate the width and height of objects.

◆ gfxTransparency

This enum represents transparency modes.

Transparency modes are used to define the target of transparency to perform.

Enumeration Type Documentation

◆ gfxAlpha

enum gfxAlpha

This enum represents alpha modes.

Global alpha modes are used to define the type of global alpha blending operations.

◆ gfxBitsPerPixel

This enum represents bits per pixel (BPP).

List of commonly BPP values to represent color depth.

◆ gfxBlend

enum gfxBlend

This enum represents blend modes.

Blend modes are used to define the type of blend function.

◆ gfxBool

enum gfxBool

This enum represents booleans.

Boolean are used to communicate true and false conditions.

◆ gfxBufferFlags

This enum represents buffer flags.

List of buffer status conditions.

◆ gfxColorMask

This enum represents a color mask.

Colormask is maskable list of color values to extract color components.

◆ gfxColorMode

This enum represents color modes.

Lists the common RGB color representations.

See also
GFX_COLOR_MODE_IS_PIXEL(mode) GFX_COLOR_MODE_IS_INDEX(mode) GFX_COLOR_MODE_IS_ALPHA(mode)

◆ gfxDriverIOCTLRequest

This struct represents the possible IOCTL requests for a gfx driver.

This struct represents the possible IOCTL requests for a gfx driver.

◆ gfxDriverIOCTLResponse

This enum represents the possible IOCTL responses for a gfx driver.

This enum represents the possible IOCTL responses for a gfx driver.

◆ gfxOrientation

This enum represents orientation modes.

List of buffer orientations. Orientation is orthogonal. Rotation which is not parallel to the x or y axis is not supported.

Attention
These definitions are an abstraction of GPU register definitions. Each GPU driver will perform the correct mapping to actual register set values.
Enumerator
GFX_ORIENT_0 

Buffer is 0 degrees rotated.

GFX_ORIENT_90 

Buffer is 90 degrees rotated.

GFX_ORIENT_180 

Buffer is 180 degrees rotated.

GFX_ORIENT_270 

Buffer is 270 degrees rotated.

◆ gfxResult

enum </#if ><#if setTransFunc !="NULL"> gfxResult
Initial value:
{fillRectFunc}(gfxPixelBuffer * dest,
const gfxRect* clipRect,
const gfxColor color)
This struct represents a rectangle.
Definition: gfx_driver.h.ftl:229
This struct represents a pixel buffer.
Definition: gfx_driver.h.ftl:521

This enum represents function call results.

Results are used to report success and failure conditions. These are the various success and failure codes.

◆ gfxTransparency

This enum represents transparency modes.

Transparency modes are used to define the target of transparency to perform.

Function Documentation

◆ gfxColorChannelAlpha()

uint32_t gfxColorChannelAlpha ( gfxColor  clr,
gfxColorMode  mode 
)

Get alpha channel.

Returns the alpha channel from clr using mode.

gfxColor clr;
uint32_t alpha = gfxColorChannelAlpha(clr, mode);
Parameters
clris an rgb color.
modeis an rgb colormode.
Returns
Returns the alpha color component

◆ gfxColorChannelBlue()

uint32_t gfxColorChannelBlue ( gfxColor  clr,
gfxColorMode  mode 
)

Get blue channel.

Returns the blue channel from clr using mode.

gfxColor clr;
uint32_t blue = gfxColorChannelBlue(clr, mode);
Parameters
clris an rgb color.
modeis an rgb colormode.
Returns
Returns the blue color component

◆ gfxColorChannelGreen()

uint32_t gfxColorChannelGreen ( gfxColor  clr,
gfxColorMode  mode 
)

Get green channel.

Returns the green channel from clr using mode.

gfxColor clr;
uint32_t green = gfxColorChannelGreen(clr, mode);
Parameters
clris an rgb color.
modeis an rgb colormode.
Returns
Returns the green color component

◆ gfxColorChannelRed()

uint32_t gfxColorChannelRed ( gfxColor  clr,
gfxColorMode  mode 
)

Get red channel.

Returns the red channel from clr using mode.

gfxColor clr;
uint32_t red = gfxColorChannelRed(clr, mode);
Parameters
clris an rgb color.
modeis an rgb colormode.
Returns
Returns the red color component

◆ gfxPixelBuffer_IsLocked()

gfxBool gfxPixelBuffer_IsLocked ( const gfxPixelBuffer *const  buffer)

Determine if buffer is locked.

Returns locked status of buffer.

gfxBuffer buffer;
gfxColor clr = gfxPixelBuffer_IsLocked(buffer);
Parameters
bufferis pixel buffer.
Returns
GFX_SUCCESS if set, otherwise GFX_FAILURE.

◆ gfxPixelBuffer_SetLocked()

gfxResult gfxPixelBuffer_SetLocked ( gfxPixelBuffer buffer,
gfxBool  locked 
)

Set locked state.

Sets the lock state of buffer.

gfxBuffer buffer;
gfxBool locked;
gfxResult res = gfxPixelBuffer_SetLocked(buffer, locked);
Parameters
bufferis pixel buffer to modify.
lockedis new lock state.
Returns
GFX_SUCCESS if set, otherwise GFX_FAILURE.

◆ gfxPixelBufferCreate()

gfxResult gfxPixelBufferCreate ( const int32_t  width,
const int32_t  height,
const gfxColorMode  mode,
const void *const  address,
gfxPixelBuffer buffer 
)

Create pixel buffer.

Initializes a rectangular pixel buffer buffer with size x by y using mode at optional address address.

gfxColor clr;
uint32_t blue = gfxPixelBufferCreate(clr, mode);
Parameters
widthis the horizonal width.
heightis the vertical height.
modeis an rgb colormode.
addressis an optional address location.
bufferis buffer to initialize.
Returns
GFX_SUCCESS if set, otherwise GFX_FAILURE.
Here is the caller graph for this function:

◆ gfxPixelBufferGet()

gfxColor gfxPixelBufferGet ( const gfxPixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get pixel.

Gets the pixel from buffer at location x and y.

gfxBuffer buffer;
uint32_t x, y;
gfxColor clr = gfxPixelBufferGet(buffer, x, y);
Parameters
bufferis pixel buffer.
xis a x coordinate.
yis a y coordinate.
Returns
the value of the pixel at the point in the source buffer
Here is the call graph for this function:

◆ gfxPixelBufferGet_Unsafe()

gfxColor gfxPixelBufferGet_Unsafe ( const gfxPixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get pixel.

Gets the pixel from buffer at location x and y.

Remarks
Like gfxPixelBufferGet but performs no bounds checking.
gfxBuffer buffer;
uint32_t x, y;
gfxColor clr = gfxPixelBufferGet(buffer, x, y);
Parameters
bufferis pixel buffer.
xis a x coordinate.
yis a y coordinate.
Returns
the value of the pixel at the point in the source buffer
Here is the caller graph for this function:

◆ gfxPixelBufferGetIndex()

gfxColor gfxPixelBufferGetIndex ( const gfxPixelBuffer *const  buffer,
const uint32_t  idx 
)

Get pixel at index.

Gets the pixel from buffer at index idx. 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.

gfxBuffer buffer;
uint32_t idx;
gfxColor clr = gfxPixelBufferGetIndex(buffer, idx);
Parameters
bufferis pixel buffer.
idxis a location.
Returns
Returns color.

◆ gfxPixelBufferGetIndex_Unsafe()

gfxColor gfxPixelBufferGetIndex_Unsafe ( const gfxPixelBuffer *const  buffer,
const uint32_t  idx 
)

Get pixel at index.

Gets the pixel from buffer at index idx. 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. A faster less-safe version of gfxPixelBufferGetIndex;

gfxBuffer buffer;
uint32_t idx;
gfxColor clr = gfxPixelBufferGetIndex_Unsafe(buffer, idx);
Parameters
bufferis pixel buffer.
idxis a location.
Returns
Returns color.

◆ gfxPixelBufferOffsetGet()

gfxBuffer gfxPixelBufferOffsetGet ( const gfxPixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get buffer offset.

Gets the buffer offset of buffer at location x and y.

gfxBuffer buffer;
uint32_t x, y;
gfxBuffer offset = gfxPixelBufferOffsetGet(buffer, x, y);
Parameters
bufferis pixel buffer.
xis a x coordinate.
yis a y coordinate.
Returns
Returns buffer offset.
Here is the caller graph for this function:

◆ gfxPixelBufferOffsetGet_Unsafe()

gfxBuffer gfxPixelBufferOffsetGet_Unsafe ( const gfxPixelBuffer *const  buffer,
uint32_t  x,
uint32_t  y 
)

Get buffer offset.

Gets the buffer offset of buffer at location x and y.

gfxBuffer buffer;
uint32_t x, y;
Parameters
bufferis pixel buffer.
xis a x coordinate.
yis a y coordinate.
Returns
Returns buffer offset.