Setters functions

This functions will permit you to change and so transform and or animating your forms.

Or to change their colors.

Center

void set_form_center(Form *form, Pixel center, bool translate)
Parameters:
  • form (Form) – The form to set a new center.
  • center (Pixel) – The new center to set.
  • translate (bool) – Translating all coordinates according the new center.
Return type:

void

Returns:

void

This function set a new center to the given form with or without translating all coordinates from the Form according the new center.

Radius (size)

void set_form_radius(Form *form, float radius)
Parameters:
  • form (Form) – The form to set a new radius.
  • radius (float) – The new radius to set.
Return type:

void

Returns:

void

This function set a new radius to the given form.

What permit to change the Form size directly by setting a new radius by given a value and not a scaling factor as in the scale_form() function.

Warning:Use only integers values or not more than 3 precision (%.3f) in the radius, Form generating functions, argument.

Color

void set_form_color(Form *form, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
Parameters:
  • form (Form) – The Form to change the color from.
  • red (uint8_t) – a value between 0 and 255.
  • green (uint8_t) – a value between 0 and 255.
  • blue (uint8_t) – a value between 0 and 255.
  • alpha (uint8_t) – a value between 0 and 255.
Return type:

void

Returns:

void

This function set a new color by updating the Color type members from the given form.

void set_line_color(Line *line, uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
Parameters:
  • form (Form) – The Line to change the color from.
  • red (uint8_t) – a value between 0 and 255.
  • green (uint8_t) – a value between 0 and 255.
  • blue (uint8_t) – a value between 0 and 255.
  • alpha (uint8_t) – a value between 0 and 255.
Return type:

void

Returns:

void

This function set a new color by updating the Color type members from the given line.

Table Of Contents

Previous topic

Operations

Next topic

Getters functions

This Page