back to Icon
Description
This function is used to set the properties of an icon.
Syntax
.SetProperties(char name[20], int start_x, int start_y, int w, int h, unsigned int c, unsigned int tc);
Parameters
name[20]: character string to be label of icon
start_x: integer pixel position in x direction for the top left corner of icon (min 0, max 319)
start_y: integer pixel position in y direction for the top left corner of icon (min 0, max 239)
w: integer pixel width for icon
h: integer pixel height for icon
c: color designation for border of icon (see LCDColors.h)
tc: color designation for text of icon label (see LCDColors.h)
Returns
None.
Examples
#include <FEHLCD.h>
int main(void)
{
// declare a single icon called software_button
FEHIcon::Icon software_button;
// set its parameters with "BUTTON" as the label,
// top left corner at 120,80 and size 80 by 80,
// and make the border scarlet and the text gray
software_button.SetProperties("BUTTON", 120, 80, 80, 80, SCARLET, GRAY);
// draw the icon
software_button.Draw();
}