![]() |
Graphic Display v1.0.0
Control any mochrome display, with any microcontroller, in any amount.
|
Graphic Display functions, used during Graphic Display Operation. More...
Functions | |
| gd_error_e | GD_Init (gd_t *Gd, gd_params_t *params) |
| Initializes the Graphic Display module, configured with the parameters provided. | |
| gd_error_e | GD_Fill (gd_t *Gd, gd_color_e color) |
| Fill the Frame Buffer with the provided color. | |
| gd_error_e | GD_UpdateScreen (gd_t *Gd) |
| Update and refresh the update screen with the data into Frame Buffer. | |
| gd_error_e | GD_DrawPixel (gd_t *Gd, uint32_t x, uint32_t y, gd_color_e color) |
| Write a color into the desired pixel in the frame buffer. | |
| gd_error_e | GD_WriteChar (gd_t *Gd, char ch, const gd_font_t *Font, gd_color_e color) |
| Write a character into a Frame Buffer, with the lines with the desired color. | |
| gd_error_e | GD_WriteString (gd_t *Gd, char *str, const gd_font_t *Font, gd_color_e color) |
| Write a string into frame buffer, with the character lines with the desired color. | |
| gd_error_e | GD_SetCursor (gd_t *Gd, uint32_t x, uint32_t y) |
| Set the cursor to the position X,Y. | |
| gd_error_e | GD_Line (gd_t *Gd, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, gd_color_e color) |
| Write a line into the frame buffer between (x1,y1) (x2,y2). | |
| gd_error_e | GD_DrawArc (gd_t *Gd, uint32_t x, uint32_t y, uint32_t radius, uint16_t start_angle, uint16_t sweep, gd_color_e color) |
| Draw an arc into the frame buffer with center, radius, start angle, and sweep. | |
| gd_error_e | GD_DrawArcWithRadiusLine (gd_t *Gd, uint32_t x, uint32_t y, uint32_t radius, uint16_t start_angle, uint16_t sweep, gd_color_e color) |
| Draw an arc into frame buffer with lines in the radius line. | |
| gd_error_e | GD_DrawCircle (gd_t *Gd, uint32_t par_x, uint32_t par_y, uint32_t par_r, gd_color_e color) |
| Draw a complete circle with defined radius. | |
| gd_error_e | GD_FillCircle (gd_t *Gd, uint32_t par_x, uint32_t par_y, uint32_t par_r, gd_color_e par_color) |
| Draw a circle filled with the provided color. | |
| gd_error_e | GD_Polyline (gd_t *Gd, gd_vertex_t *par_vertex, uint16_t par_size, gd_color_e color) |
| Draw a polyline, composed by staigth lines connecting the points given by vertex array. | |
| gd_error_e | GD_DrawRectangle (gd_t *Gd, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, gd_color_e color) |
| Draw a Rectangle between the position (x1,y1) and (x2,y2). The rectangle is not filled, just four lines of a thickness of 1px. | |
| gd_error_e | GD_FillRectangle (gd_t *Gd, uint32_t x1, uint32_t y1, uint32_t x2, uint32_t y2, gd_error_e color) |
| Draw a filled rectangle between the pointes (x1,y1) and (x2,y2). | |
| gd_error_e | GD_DrawBitmap (gd_t *Gd, uint32_t x, uint32_t y, const unsigned char *bitmap, uint32_t w, uint32_t h, gd_color_e color) |
| Draw a bitmap into the Frame Buffer. The bitmap is an array with the pixels on/off. | |
| gd_error_e | GD_SetContrast (gd_t *Gd, const uint8_t value) |
| Set the contrast of the display, if are supported. If display doesn't have this routine, nothing will happens. | |
| gd_error_e | GD_SetDisplayOn (gd_t *Gd, bool on) |
| Set display On or Off, if the display implements this routine. | |
| bool | GD_GetDisplayOn (gd_t *Gd) |
| Gets the display On/Off state. | |
Graphic Display functions, used during Graphic Display Operation.
| gd_error_e GD_DrawArc | ( | gd_t * | Gd, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | radius, | ||
| uint16_t | start_angle, | ||
| uint16_t | sweep, | ||
| gd_color_e | color ) |
Draw an arc into the frame buffer with center, radius, start angle, and sweep.
| Gd | Pointer to the Graphic Display handle. |
| x | X axis of the center of Arc. |
| y | Y axis of the center of Arc. |
| radius | Radius of the Arc. |
| start_angle | Initial angle in degrees. |
| sweep | Sweep of the arc. |
| color | Color of the arc. |
| gd_error_e GD_DrawArcWithRadiusLine | ( | gd_t * | Gd, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| uint32_t | radius, | ||
| uint16_t | start_angle, | ||
| uint16_t | sweep, | ||
| gd_color_e | color ) |
Draw an arc into frame buffer with lines in the radius line.
| Gd | Pointer to the Graphic Display handle. |
| x | X axis of the center of Arc. |
| y | Y axis of the center of Arc. |
| radius | Radius of the Arc. |
| start_angle | Initial angle in degrees. |
| sweep | Sweep of the arc. |
| color | Color of the arc. |
| gd_error_e GD_DrawBitmap | ( | gd_t * | Gd, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| const unsigned char * | bitmap, | ||
| uint32_t | w, | ||
| uint32_t | h, | ||
| gd_color_e | color ) |
Draw a bitmap into the Frame Buffer. The bitmap is an array with the pixels on/off.
| Gd | Pointer to the Graphic Display handle. |
| x | Start X axis of bitmap. |
| y | Start Y axis of bitmap. |
| bitmap | Bitmap array containing the image. |
| w | The Width of the bitmap. This parameter must be the real size of bitmap, we do not support image resize, yet. |
| h | The Height of the bitmap. This parameter must be the real size of bitmap, we do not support image resize, yet. |
| color | The 'color' of the image. In practice, if parameter was GD_BLACK, this will invert the bitmap color, if was GD_WHITE, the original color is keeped. |
| gd_error_e GD_DrawCircle | ( | gd_t * | Gd, |
| uint32_t | par_x, | ||
| uint32_t | par_y, | ||
| uint32_t | par_r, | ||
| gd_color_e | color ) |
Draw a complete circle with defined radius.
| Gd | Pointer to the Graphic Display handle. |
| par_x | X axis of the center of circle. |
| par_y | Y axis of the center of circle. |
| par_r | Radius of the circle. |
| color | Color of the circle. |
| gd_error_e GD_DrawPixel | ( | gd_t * | Gd, |
| uint32_t | x, | ||
| uint32_t | y, | ||
| gd_color_e | color ) |
Write a color into the desired pixel in the frame buffer.
| Gd | Pointer to the Graphic Display handle. |
| x | X axis of pixel to write. |
| y | Y axis of pixel to write. |
| color | Color to write on the pixel. |
| gd_error_e GD_DrawRectangle | ( | gd_t * | Gd, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| gd_color_e | color ) |
Draw a Rectangle between the position (x1,y1) and (x2,y2). The rectangle is not filled, just four lines of a thickness of 1px.
| Gd | Pointer to the Graphic Display handle. |
| x1 | X axis of first point of rectangle. |
| y1 | Y axis of first point of rectangle. |
| x2 | X axis of second point of rectangle. |
| y2 | Y axis of first second of rectangle. |
| color | Color of the rectangle borders. |
| gd_error_e GD_Fill | ( | gd_t * | Gd, |
| gd_color_e | color ) |
Fill the Frame Buffer with the provided color.
| Gd | Pointer to the Graphic Display handle. |
| color | The color to fill the buffer, GD_BLACK to erase, GD_WHITE to turnon all pixels. |
| gd_error_e GD_FillCircle | ( | gd_t * | Gd, |
| uint32_t | par_x, | ||
| uint32_t | par_y, | ||
| uint32_t | par_r, | ||
| gd_color_e | par_color ) |
Draw a circle filled with the provided color.
| Gd | Pointer to the Graphic Display handle. |
| par_x | X axis of the center of circle. |
| par_y | Y axis of the center of circle. |
| par_r | Radius of the circle. |
| par_color | Color of the circle. |
| gd_error_e GD_FillRectangle | ( | gd_t * | Gd, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| gd_error_e | color ) |
Draw a filled rectangle between the pointes (x1,y1) and (x2,y2).
| Gd | Pointer to the Graphic Display handle. |
| x1 | X axis of first point of rectangle. |
| y1 | Y axis of first point of rectangle. |
| x2 | X axis of second point of rectangle. |
| y2 | Y axis of first second of rectangle. |
| color | Color of the entire rectangle. |
| bool GD_GetDisplayOn | ( | gd_t * | Gd | ) |
Gets the display On/Off state.
| Gd | Pointer to the Graphic Display handle. |
true if the display was online, false if not. | gd_error_e GD_Init | ( | gd_t * | Gd, |
| gd_params_t * | params ) |
Initializes the Graphic Display module, configured with the parameters provided.
| Gd | Pointer to the Graphic Display handle. |
| params | Pointer with the parameters of the Graphic Display. |
| gd_error_e GD_Line | ( | gd_t * | Gd, |
| uint32_t | x1, | ||
| uint32_t | y1, | ||
| uint32_t | x2, | ||
| uint32_t | y2, | ||
| gd_color_e | color ) |
Write a line into the frame buffer between (x1,y1) (x2,y2).
| Gd | Pointer to the Graphic Display handle. |
| x1 | X axis for the first point. |
| y1 | Y axis for the first point. |
| x2 | X axis for the second point. |
| y2 | Y axis for the second point. |
| color | Color of the line. |
| gd_error_e GD_Polyline | ( | gd_t * | Gd, |
| gd_vertex_t * | par_vertex, | ||
| uint16_t | par_size, | ||
| gd_color_e | color ) |
Draw a polyline, composed by staigth lines connecting the points given by vertex array.
| Gd | Pointer to the Graphic Display handle. |
| par_vertex | Vertex array, with (x, y) points, where the lines will be connected |
| par_size | The number of points in par_vertex. |
| color | Color of the polyline. |
| gd_error_e GD_SetContrast | ( | gd_t * | Gd, |
| const uint8_t | value ) |
Set the contrast of the display, if are supported. If display doesn't have this routine, nothing will happens.
| Gd | Pointer to the Graphic Display handle. |
| value | Value of contrast, from 0 to 100. |
| gd_error_e GD_SetCursor | ( | gd_t * | Gd, |
| uint32_t | x, | ||
| uint32_t | y ) |
Set the cursor to the position X,Y.
| Gd | Pointer to the Graphic Display handle. |
| x | X axis position. |
| y | Y axis position. |
| gd_error_e GD_SetDisplayOn | ( | gd_t * | Gd, |
| bool | on ) |
Set display On or Off, if the display implements this routine.
| Gd | Pointer to the Graphic Display handle. |
| on | Set to true to turn on, of to false. |
| gd_error_e GD_UpdateScreen | ( | gd_t * | Gd | ) |
Update and refresh the update screen with the data into Frame Buffer.
| Gd | Pointer to the Graphic Display handle. |
| gd_error_e GD_WriteChar | ( | gd_t * | Gd, |
| char | ch, | ||
| const gd_font_t * | Font, | ||
| gd_color_e | color ) |
Write a character into a Frame Buffer, with the lines with the desired color.
| Gd | Pointer to the Graphic Display handle. |
| ch | Character coded in ASCII. |
| Font | Pointer to the Fontset to write. |
| color | Color of the character. |
| gd_error_e GD_WriteString | ( | gd_t * | Gd, |
| char * | str, | ||
| const gd_font_t * | Font, | ||
| gd_color_e | color ) |
Write a string into frame buffer, with the character lines with the desired color.
| Gd | Pointer to the Graphic Display handle. |
| str | Char array, ended with '\0' character. |
| Font | Pointer to the Fontset to write. |
| color | Color of the string. |