MPLAB® Harmony Graphics Suite > Graphics Library > Aria Graphics Library > Aria Hardware Abstraction Layer (HAL) > Library Interface
MPLAB® Harmony Graphics Suite
Library Interface

This section describes the Aria User Interface Library Hardware Abstraction Layer interface.

a) Functions
 
Name 
Description 
 
Gets the current set active HAL context. 
 
Calculates bilinear interpolation between four colors 
 
Blends two RGBA8888 colors together using their alpha channel values. 
 
Used for getting the alpha color channel of a given color value. 
 
Used for getting the blue color channel of a given color value. 
 
Used for getting the green color channel of a given color value. 
 
Used for getting the red color channel of a given color value. 
 
Converts a color value from one mode to another 
 
Linear interpolation between two colors 
 
 
 
Used for getting a color value by name. 
 
Sets the active context 
 
Blits a buffer of pixels into the frame buffer. 
 
Blits a buffer of pixels into the frame buffer without performing per-pixel operations on the data. 
 
Draws a line from (x1,y1) to (x2,y2) using the current draw state. 
 
Sets the pixel at X and Y using the current draw state. 
 
Draws a rectangle using the specified dimensions and the current draw state. 
 
Blits a buffer of pixels into the frame buffer. 
 
Transforms a layer oriented space to screen space. 
 
Transforms a point from oriented space to screen space given a layer, a display orientation, and a mirroring setting. 
 
Transforms a point from screen space to oriented space given a layer, a display orientation, and a mirroring setting. 
 
Gets the pointer to the layer's current read pixel buffer. 
 
Transforms a layer point from oriented space to screen space given a layer, a display orientation, and a mirroring setting. 
 
Transforms a rectangle from screen space to oriented space given a layer, a display orientation, and a mirroring setting. 
 
Swaps the width and height dimensions of a layer. Can be used for run-time display orientation 
 
Performs a swap operation on the given layer. This advances the pointers of layer's buffer chain. The current write buffer becomes the new read buffer and a new buffer is chosen as the new write buffer. Has no effect in single buffer environments. 
 
Transforms a layer from screen space to oriented space. 
 
Gets the pointer to the layer's current write pixel buffer. 
 
Fills an area of a pixel buffer with a solid color. Caller is responsible for ensuring that the color is the same color format as the destination buffer. 
 
Fills an area of a pixel buffer with a solid color. Caller is responsible for ensuring that the color is the same color format as the destination buffer. Like GFX_PixelBufferAreaFill but performs no bounds checking. 
 
Extracts a rectanglar section of pixels from a pixel buffer. 
 
Extracts a rectanglar section of pixels from a pixel buffer. Like GFX_PixelBufferAreaGet but performs no clipping between the rectangles of the extract area and the source buffer. 
 
Copies an area of pixels from a source buffer to a destination buffer. If the source buffer format does not match the destination format the data will be converted to match during the copy operation. 
 
Copies an area of pixels from a source buffer to a destination buffer. If the source buffer format does not match the destination format the data will be converted to match during the copy operation. Like GFX_PixelBufferAreaSet but performs no bounds checking. 
 
Clips a rectangle against a pixel buffer. The result is guaranteed to fit inside the buffer's area. 
 
Duplicates a pixel buffer and converts the copy to another color mode. 
 
Creates a copy of the input buffer. If the input buffer's pixel data is not null then the data will be duplicated for the result buffer. 
 
Initializes a pixel buffer struct. Does not actually allocate any memory. 
 
Destroys a pixel buffer construct. If the buffer's pixels pointer is not zero this function will attempt to free it using the provided GFX_MemoryIntf memory interface. 
 
Gets the value of the pixel that resides at the provided point in the given buffer. 
 
Gets the value of the pixel that resides at the provided point in the given buffer. Like GFX_PixelBufferGet but performs no bounds checking. 
 
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. 
 
Gets the offset address of the pixel that resides at the provided point in the given buffer. 
 
Gets the offset address of the pixel that resides at the provided point in the given buffer. Similar to GFX_PixelBufferOffsetGet but performs no bounds checking. 
 
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. 
 
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 GFX_PixelBufferSet but performs no bounds checking. 
 
Clips a rectangle to the space of another rectangle. The result rectangle is a rectangle that will fit inside both of the given rectangles. 
 
Returns the rectangle clipped using r_rect, and also adjusts the third rectangle 
 
Combines the area of two rectangles into a single rectangle. 
 
Returns 1 if the two rectangles have the same position and dimensions 
 
Determines if a point is inside a rectangle. 
 
Determines if a rectangle is completely inside another rectangle. Still returns true if the edges are touching. 
 
Returns a GFX_Rect structure based on 2 points 
 
Determines if two rectangles are intersecting 
 
Returns GFX_TRUE if the two rectangles are adjacent and vertically or horizontally aligned 
 
Splits two overlapping rectangles into several (up to 4) non-overlapping rectangles 
 
Returns the points for the upper left and lower right vertices of a rectangle 
 
Reorients a point to a given mirrored orientation. 
 
Reorients a point to a given orthogonal orientation. 
 
Transforms a point from an oriented rectangle space to an outer space given a display orientation and a mirroring setting. 
 
Transforms a point to an oriented rectangle space to an outer space given a display orientation and a mirroring setting. 
 
Transforms a size tuple from oriented space to screen space 
 
Transforms a size tuple from screen space to oriented space 
 
Sorts two points in the X axis 
 
Sorts two points in the Y axis 
b) Data Types and Constants
 
Name 
Description 
 
This is macro GFX_ANTIALIAS_MODE_COUNT. 
 
Enables anti-aliased drawing hint 
 
Enables anti-aliased drawing hint 
 
This is macro GFX_ASSERT. 
 
List of available bits-per-pixel sizes. 
 
List of available bits-per-pixel sizes. 
 
Blend mode masks 
 
Blend mode masks 
 
Buffer selector used when querying layers for certain buffer states. 
 
Buffer selector used when querying layers for certain buffer states. 
 
Frame buffer memory states 
 
Frame buffer memory states 
 
Simple wrapper around the standard calloc function pointer. Used for redirecting memory allocation to other memory management systems. 
 
This is macro GFX_COLOR_MAX_SIZE. 
 
This is macro GFX_COLOR_MODE_COUNT. 
 
This is macro GFX_COLOR_MODE_IS_ALPHA. 
 
This is macro GFX_COLOR_MODE_IS_INDEX. 
 
This is macro GFX_COLOR_MODE_IS_PIXEL. 
 
This is macro GFX_COLOR_MODE_LAST_COLOR. 
 
This is variable GFX_ColorInfo. 
 
Maskable list of color valies. 
 
Maskable list of color valies. 
 
List of available color modes. 
 
List of available color modes. 
 
Struct that provides information about a color mode. 
 
Struct that provides information about a color mode. 
 
Color name reference table 
 
Color name reference table 
 
An instance of the hardware abstraction layer. 
 
An instance of the hardware abstraction layer. 
 
This is macro GFX_DEPRECATED. 
 
Describes a graphical display device. 
 
Describes a graphical display device. 
 
This is macro GFX_DRAW_MODE_COUNT. 
 
Gradient draw modes. 
 
Gradient draw modes. 
 
 
 
A list of drawing hints for shape drawing algorithms 
 
A list of drawing hints for shape drawing algorithms 
 
A driver description structure. 
 
A driver description structure. 
 
Hardware abstraction state interface flags. See gfx.h for a comprehensive description. 
 
Hardware abstraction state interface flags. See gfx.h for a comprehensive description. 
 
A frame buffer is a wrapper around a pixel buffer construct that is used by display drivers to manage frame buffers. 
 
A frame buffer is a wrapper around a pixel buffer construct that is used by display drivers to manage frame buffers. 
 
Simple wrapper around the standard free function pointer. Used for redirecting memory free to other memory management systems. 
 
Layers describe basic display drawing areas and are meant to map directly to graphics controller hardware layers. 
 
Layers describe basic display drawing areas and are meant to map directly to graphics controller hardware layers. 
 
Simple wrapper around the standard malloc function pointer. Used for redirecting memory allocation to other memory management systems. 
 
Simple wrapper around the standard memcpy function pointer. Used for redirecting memcpy to other memory management systems. 
 
Custom memory manager interface. 
 
Custom memory manager interface. 
 
Simple wrapper around the standard memset function pointer. Used for redirecting memset to other memory management systems. 
 
This is macro GFX_NUM_FLAGS. 
 
Orthogonal orientation settings. 
 
Orthogonal orientation settings. 
 
This is macro GFX_PIPELINE_MODE_COUNT. 
 
Hardware draw path settings. 
 
Hardware draw path settings. 
 
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 lenght in bytes. 
 
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 lenght in bytes. 
 
A two dimensional Cartesian point. 
 
Simple wrapper around the standard realloc function pointer. Used for redirecting memory allocation to other memory management systems. 
 
A rectangle definition. 
 
The algorithm used for resizing a frame 
 
The algorithm used for resizing a frame 
 
A two dimensional indication of size. Values are signed but should never be negative. 
 
A two dimensional indication of size. Values are signed but should never be negative. 
 
This is macro RGB_2_BITS. 
 
This is macro RGB_3_BITS. 
 
This is macro RGB_332_BLUE_MASK. 
 
This is macro RGB_332_GREEN_MASK. 
 
This is macro RGB_332_RED_MASK. 
 
This is macro RGB_5_BITS. 
 
This is macro RGB_565_BLUE_MASK. 
 
This is macro RGB_565_GREEN_MASK. 
 
This is macro RGB_565_RED_MASK. 
 
This is macro RGB_6_BITS. 
 
This is macro RGB_8_BITS. 
 
This is macro RGB_888_BLUE_MASK. 
 
This is macro RGB_888_GREEN_MASK. 
 
This is macro RGB_888_RED_MASK. 
 
This is macro RGBA_5551_ALPHA_MASK. 
 
This is macro RGBA_5551_BLUE_MASK. 
 
This is macro RGBA_5551_GREEN_MASK. 
 
This is macro RGBA_5551_RED_MASK. 
 
This is macro RGBA_8888_ALPHA_MASK. 
 
This is macro RGBA_8888_BLUE_MASK. 
 
This is macro RGBA_8888_GREEN_MASK. 
 
This is macro RGBA_8888_RED_MASK. 
MPLAB® Harmony Graphics Suite