43 if ((pRect == NULL) ||
119 if (status !=
GLIB_OK)
return status;
122 if (tmpRectangle.
yMin == tmpRectangle.
yMax) {
128 if (status !=
GLIB_OK)
return status;
131 if (tmpRectangle.
xMin == tmpRectangle.
xMax) {
137 if (status !=
GLIB_OK)
return status;
140 if ((tmpRectangle.
yMin + 1) == tmpRectangle.
yMax) {
191 width = tmpRectangle.
xMax - tmpRectangle.
xMin + 1;
192 height = tmpRectangle.
yMax - tmpRectangle.
yMin + 1;
194 status = DMD_setClippingArea(tmpRectangle.
xMin, tmpRectangle.
yMin, width, height);
195 if (status != DMD_OK)
return status;
197 status = DMD_writeColor(0, 0, red, green, blue, width * height);
198 if (status != DMD_OK)
return status;
EMSTATUS GLIB_drawLineV(GLIB_Context_t *pContext, int32_t x1, int32_t y1, int32_t y2)
Draws a vertical line from x1, y1 to x1, y2.
EMSTATUS GLIB_drawRect(GLIB_Context_t *pContext, const GLIB_Rectangle_t *pRect)
Draws a rectangle outline defined by the passed in rectangle.
EMSTATUS GLIB_drawRectFilled(GLIB_Context_t *pContext, const GLIB_Rectangle_t *pRect)
Draws a filled rectangle defined by the passed in rectangle. The filled rectangle is drawn from (xMin...
Silicon Labs Graphics Library.
void GLIB_colorTranslate24bpp(uint32_t color, uint8_t *red, uint8_t *green, uint8_t *blue)
Extracts the color components from the 32-bit color passed and puts them in the passed in 8-bits ints...
EMSTATUS GLIB_drawLineH(GLIB_Context_t *pContext, int32_t x1, int32_t y1, int32_t x2)
Draws a horizontal line from x1, y1 to x2, y2.
EMSTATUS GLIB_applyClippingRegion(const GLIB_Context_t *pContext)
Apply the clipping region from the GLIB_Context_t in the DMD driver.
void GLIB_normalizeRect(GLIB_Rectangle_t *pRect)
Normalize the rectangle that is passed in. Sets yMin to the minimum value of yMin and yMax...
bool GLIB_rectContainsPoint(const GLIB_Rectangle_t *pRect, int32_t x, int32_t y)
Checks if the point passed in is in the interior of the rectangle passed in.
GLIB_Rectangle_t clippingRegion
GLIB Drawing Context (Multiple instances of GLIB_Context_t can exist)