Getters functions

This functions are convienence functions to get the current value of the generic Form type members.

note:But you can easily access the members directly with the -> pointer notation.

Center

Pixel get_form_center(Form *form)
Parameters:
  • form (Form) – The form to get the center from.
Return type:

Pixel

Returns:

The current center Pixel member of the given form from type Form.

Color

Color get_form_color(Form *form)
Parameters:
  • form (Form) – The form to get the Color from.
Return type:

Color

Returns:

The current Color member of the given form from type Form.

Length

float get_form_length(Form *form)
Parameters:
  • form (Form) – The form to get the length from.
Return type:

float

Returns:

The current length member of the given form from type Form.

Note

The member named length is very often the radius from the form.

See the Forms generating functions page for the what the length member represent.

Or in other words how it is compute from the often, radius argument value.

Real length

float get_form_real_length(Form *form)
Parameters:
  • form (Form) – The form to get the real length from.
Return type:

float

Returns:

The current real_length member of the given form from type Form.

Note

The member named real_length is the distance between the center and the farest coordinates from the center.

note:It can be used per example to build a bounding box from a polygon for collision detection or the purpose you want.
Warning:The member name real_length is not always exactly after executing set_form_radius() but nearly approximate.

Orientation

float get_form_orientation(Form *form)
Parameters:
  • form (Form) – The form to get the length from.
Return type:

float

Returns:

The current orientation member of the given form from type Form.

Note

The member and argument named orientation is always given as argument.

It represent the incline of the forms according the angle measurement convention.

You can use the orientation argument value to rotate a form if you generate and destroy the Form.

Table Of Contents

Previous topic

Setters functions

Next topic

Miscellaneous

This Page