Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Graphical display system

This service provides an interface to drawing graphics on a graphical display.

The graphics service consists of the following:

The display driver interface provides an general interface to be used by the application or by libraries.

The generic drawing primitives is a library of functions for drawing graphics primitives such as lines, rectangles and circles. It uses other functions implemented by the display driver for drawing the primitives. The implementation of these functions can optionally be used by a display driver, but if the hardware of the display allows faster handling of any of the primitives, the display driver can implement it directly.

The display specific drivers provides an interface to the graphical display via the display controller. It implements the low level communication with the display hardware, putting pixels on the display and drawing primitives such as lines, circles and rectangles. Depending on the display driver implementation, drawing the graphics primitives might be handled by the generic graphics drawing primitives rather than the display driver itself.

Modules

 Window System
 Window system for organizing window elements in a graphical user interface (GUI)
 
 Widget toolkit
 The Widget toolkit implements many common widgets for use on a graphical display using the functionality of Window system and Graphics library.
 
 SDT028ATFT display using ILI9341 display controller
 This is hardware specific configuration that configures the graphical service for use with the ILI9341 display controller and the SDT028ATFT display.
 
 Generic Implementation of Graphics Primitives
 This is a library of generic implementations of various graphics primitives.
 
 Font support
 This modules provides functionality for outputting a font to a display.
 

Driver-specific Definitions

#define GFX_COLOR(r, g, b)   ILI9341_COLOR(r, g, b)
 Generate a display-native color value from constant RGB components. More...
 
#define GFX_COLOR_INVALID   GFX_COLOR(5, 5, 5)
 Value returned by gfx_get_pixel() for pixels outside clipping region. More...
 
#define GFX_COLOR_TRANSPARENT   GFX_COLOR(240, 0, 240)
 Value used as input to font functions to give a transparent background region. More...
 
typedef ili9341_color_t gfx_color_t
 Data type for color values native to the display. More...
 
typedef ili9341_coord_t gfx_coord_t
 Data type representing a coordinate on the screen. More...
 

Standard Color Definitions

#define GFX_COLOR_BLACK   GFX_COLOR( 0, 0, 0)
 
#define GFX_COLOR_WHITE   GFX_COLOR(255, 255, 255)
 
#define GFX_COLOR_GRAY   GFX_COLOR(128, 128, 128)
 
#define GFX_COLOR_RED   GFX_COLOR(255, 0, 0)
 
#define GFX_COLOR_DK_RED   GFX_COLOR(128, 0, 0)
 
#define GFX_COLOR_GREEN   GFX_COLOR( 0, 255, 0)
 
#define GFX_COLOR_DK_GREEN   GFX_COLOR( 0, 128, 0)
 
#define GFX_COLOR_BLUE   GFX_COLOR( 0, 0, 255)
 
#define GFX_COLOR_DK_BLUE   GFX_COLOR( 0, 0, 128)
 
#define GFX_COLOR_MAGENTA   GFX_COLOR(255, 0, 255)
 
#define GFX_COLOR_DK_MAGENTA   GFX_COLOR(128, 0, 128)
 
#define GFX_COLOR_YELLOW   GFX_COLOR(255, 255, 0)
 
#define GFX_COLOR_DK_YELLOW   GFX_COLOR(128, 128, 0)
 
#define GFX_COLOR_CYAN   GFX_COLOR( 0, 255, 255)
 
#define GFX_COLOR_DK_CYAN   GFX_COLOR( 0, 128, 128)
 

#define GFX_COLOR (   r,
  g,
 
)    ILI9341_COLOR(r, g, b)

Generate a display-native color value from constant RGB components.

This macro does the same job as gfx_color(), except that the RGB values must be constant, and that it is usable as a static initializer.

Referenced by app_widget_launch(), and gfx_ili9341_color().

#define GFX_COLOR_BLACK   GFX_COLOR( 0, 0, 0)

Referenced by gfx_ili9341_init().

#define GFX_COLOR_BLUE   GFX_COLOR( 0, 0, 255)
#define GFX_COLOR_CYAN   GFX_COLOR( 0, 255, 255)
#define GFX_COLOR_DK_BLUE   GFX_COLOR( 0, 0, 128)
#define GFX_COLOR_DK_CYAN   GFX_COLOR( 0, 128, 128)
#define GFX_COLOR_DK_GREEN   GFX_COLOR( 0, 128, 0)
#define GFX_COLOR_DK_MAGENTA   GFX_COLOR(128, 0, 128)
#define GFX_COLOR_DK_RED   GFX_COLOR(128, 0, 0)
#define GFX_COLOR_DK_YELLOW   GFX_COLOR(128, 128, 0)
#define GFX_COLOR_GRAY   GFX_COLOR(128, 128, 128)
#define GFX_COLOR_GREEN   GFX_COLOR( 0, 255, 0)
#define GFX_COLOR_INVALID   GFX_COLOR(5, 5, 5)

Value returned by gfx_get_pixel() for pixels outside clipping region.

It is not possible to define a color that is outside the color spectrum for the ILI9341 driver, hence use a dark color as an invalid color.

Referenced by gfx_ili9341_get_pixel().

#define GFX_COLOR_MAGENTA   GFX_COLOR(255, 0, 255)
#define GFX_COLOR_RED   GFX_COLOR(255, 0, 0)
#define GFX_COLOR_TRANSPARENT   GFX_COLOR(240, 0, 240)

Value used as input to font functions to give a transparent background region.

It is not possible to define a color that is outside the color spectrum for the ILI9341 driver, hence use a very uncommon strong magenta color as transparency mask color.

Referenced by gfx_draw_char(), wtk_button_handler(), wtk_check_box_handler(), wtk_frame_handler(), wtk_label_handler(), and wtk_radio_button_handler().

#define GFX_COLOR_WHITE   GFX_COLOR(255, 255, 255)
#define GFX_COLOR_YELLOW   GFX_COLOR(255, 255, 0)

Data type for color values native to the display.

Data type representing a coordinate on the screen.