This is the quick start guide for the Graphics (GFX) service", with step-by-step instructions on how to configure and use it for a specific use case.
Basic usage of the graphics service
This use case will demonstrate initializing the graphics service and then drawing a red line on the screen from coordinate X=10, Y=10 to X=20, Y=20.
Workflow
Example code
Add to, e.g., the main function in the application C-file:
Workflow
- Initialize board IO:
- Initialize clocks:
- Initialize graphics service
- Note
- This will call the init function for the low level display controller driver and initialize the screen to a white background.
- Draw a red line from 10,10 to 20,20:
- Attention
- This uses the GFX_COLOR macro to convert a RGB (Red,Green,Blue) value to a color value native to the display. In this case the color is a constant, so we use the macro. If you need to create the color from a non-constant value you must use the gfx_color function to generate the color.