Microchip® Advanced Software Framework

gfx_generic.c File Reference

Generic graphic primitive routines.

This files includes the correct header files for the graphics service

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include "gfx.h"
#include "compiler.h"

Functions

void gfx_generic_draw_bitmap_tiled (const struct gfx_bitmap *bmp, gfx_coord_t x1, gfx_coord_t y1, gfx_coord_t x2, gfx_coord_t y2, gfx_coord_t tile_origin_x, gfx_coord_t tile_origin_y)
 
void gfx_generic_draw_circle (gfx_coord_t x, gfx_coord_t y, gfx_coord_t radius, gfx_color_t color, uint8_t octant_mask)
 
void gfx_generic_draw_filled_circle (gfx_coord_t x, gfx_coord_t y, gfx_coord_t radius, gfx_color_t color, uint8_t quadrant_mask)
 
void gfx_generic_draw_filled_rect (gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height, gfx_color_t color)
 
void gfx_generic_draw_line (gfx_coord_t x1, gfx_coord_t y1, gfx_coord_t x2, gfx_coord_t y2, gfx_color_t color)
 
void gfx_generic_get_pixmap (gfx_color_t *pixmap, gfx_coord_t map_width, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height)
 
void gfx_generic_put_bitmap (const struct gfx_bitmap *bmp, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height)
 
void gfx_generic_put_pixmap (const gfx_color_t *pixmap, gfx_coord_t map_width, gfx_coord_t map_x, gfx_coord_t map_y, gfx_coord_t x, gfx_coord_t y, gfx_coord_t width, gfx_coord_t height)
 
void gfx_generic_set_ext_handler (gfx_ext_draw_handler_t gfx_ext_draw)
 
gfx_coord_t gfx_get_height (void)
 Return the current height of the screen. More...
 
gfx_coord_t gfx_get_width (void)
 Return the current width of the screen. More...
 
void gfx_set_clipping (gfx_coord_t min_x, gfx_coord_t min_y, gfx_coord_t max_x, gfx_coord_t max_y)
 Set the clipping region. More...
 

Variables

static gfx_ext_draw_handler_t gfx_ext_draw_func
 External bitmap draw interface handler. More...
 

gfx_coord_t gfx_get_height ( void  )

Return the current height of the screen.

Return the current height of the screen for the current orientation. Screen can be rotated runtime on supported displays with gfx_set_orientation.

Returns
Height of the screen in pixels.

References gfx_height.

Referenced by main().

gfx_coord_t gfx_get_width ( void  )

Return the current width of the screen.

Return the current width of the screen for the current orientation. Screen can be rotated runtime on supported displays with gfx_set_orientation.

Returns
Width of the screen in pixels.

References gfx_width.

Referenced by main().

void gfx_set_clipping ( gfx_coord_t  min_x,
gfx_coord_t  min_y,
gfx_coord_t  max_x,
gfx_coord_t  max_y 
)

Set the clipping region.

Set the clipping region for all subsequent graphics operations. Nothing will be drawn outside the clipping region. Clipping is handled in software, and is enabled with CONF_GFX_USE_CLIPPING.

Parameters
min_xLeft edge of region.
min_yTop edge of region.
max_xRight edge of region.
max_yBottom edge of region.

References gfx_height, gfx_max_x, gfx_max_y, gfx_min_x, gfx_min_y, and gfx_width.

Referenced by gfx_ili9325_init(), gfx_ili9325_set_orientation(), gfx_ili9341_init(), gfx_ili9341_set_orientation(), gfx_ili93xx_init(), gfx_ili93xx_set_orientation(), gfx_ili9488_init(), and gfx_ili9488_set_orientation().

gfx_ext_draw_handler_t gfx_ext_draw_func
static

External bitmap draw interface handler.

Referenced by gfx_generic_put_bitmap(), and gfx_generic_set_ext_handler().