EFR32 Mighty Gecko 1 Software Documentation  efr32mg1-doc-5.1.2
glib_bitmap.c
Go to the documentation of this file.
1  /*************************************************************************/
16 /* Standard C header files */
17 #include <stdint.h>
18 
19 /* EM types */
20 #include "em_types.h"
21 
22 /* GLIB header files */
23 #include "glib.h"
24 
25 /**************************************************************************/
51 EMSTATUS GLIB_drawBitmap(GLIB_Context_t *pContext, int32_t x, int32_t y,
52  uint32_t width, uint32_t height, const uint8_t *picData)
53 {
54  EMSTATUS status;
55 
56  /* Set display clipping area for bitmap */
57  status = DMD_setClippingArea(x, y, width, height);
58  if (status != DMD_OK) return status;
59 
60  /* Write bitmap to display */
61  status = DMD_writeData(0, 0, picData, width * height);
62  if (status != DMD_OK) return status;
63 
64  /* Reset driver clipping area to GLIB clipping region */
65  return GLIB_applyClippingRegion(pContext);
66 }
Silicon Labs Graphics Library.
EMSTATUS GLIB_applyClippingRegion(const GLIB_Context_t *pContext)
Apply the clipping region from the GLIB_Context_t in the DMD driver.
Definition: glib.c:278
EMSTATUS GLIB_drawBitmap(GLIB_Context_t *pContext, int32_t x, int32_t y, uint32_t width, uint32_t height, const uint8_t *picData)
Draws a bitmap.
Definition: glib_bitmap.c:51
GLIB Drawing Context (Multiple instances of GLIB_Context_t can exist)
Definition: glib.h:273