1 #ifndef MYPAINTSYMMETRY_H
2 #define MYPAINTSYMMETRY_H
gint gboolean
Definition: mypaint-glib-compat.h:25
MyPaintSymmetryType
Enumeration of different kinds of symmetry.
Definition: mypaint-symmetry.h:27
@ MYPAINT_SYMMETRY_TYPE_SNOWFLAKE
rotational symmetry and its reflection
Definition: mypaint-symmetry.h:47
@ MYPAINT_SYMMETRY_TYPES_COUNT
number of available symmetry types (only use to enumerate)
Definition: mypaint-symmetry.h:51
@ MYPAINT_SYMMETRY_TYPE_ROTATIONAL
rotational symmetry
Definition: mypaint-symmetry.h:43
@ MYPAINT_SYMMETRY_TYPE_VERTICAL
reflection across the (vertical) y-axis
Definition: mypaint-symmetry.h:31
@ MYPAINT_SYMMETRY_TYPE_HORIZONTAL
reflection across the (horizontal) x-axis
Definition: mypaint-symmetry.h:35
@ MYPAINT_SYMMETRY_TYPE_VERTHORZ
reflection across both the x-axis and the y-axis
Definition: mypaint-symmetry.h:39
Contains data used for symmetry calculations.
Definition: mypaint-symmetry.h:99
void mypaint_update_symmetry_state(MyPaintSymmetryData *const symmetry_data)
If necessary, recalculate symmetry_matrices.
MyPaintSymmetryState state_pending
The pending symmetry state.
Definition: mypaint-symmetry.h:110
void mypaint_symmetry_data_destroy(MyPaintSymmetryData *)
Destroy resources used by the data struct, and the struct itself.
void mypaint_symmetry_set_pending(MyPaintSymmetryData *data, gboolean active, float center_x, float center_y, float symmetry_angle, MyPaintSymmetryType symmetry_type, int rot_symmetry_lines)
Update state_pending and active and set pending_changes to TRUE.
int num_symmetry_matrices
The size of symmetry_matrices, depends on type and num_lines of state_current.
Definition: mypaint-symmetry.h:124
MyPaintTransform * symmetry_matrices
The matrices used for the actual symmetry calculations.
Definition: mypaint-symmetry.h:128
gboolean active
Whether symmetry is used or not.
Definition: mypaint-symmetry.h:120
MyPaintSymmetryState state_current
The current symmetry state.
Definition: mypaint-symmetry.h:104
gboolean pending_changes
Flag used to check if state_pending needs to be compared against state_current (does not necessarily ...
Definition: mypaint-symmetry.h:116
MyPaintSymmetryData mypaint_default_symmetry_data()
Create a default symmetry data instance.
Contains the basis for symmetry calculations.
Definition: mypaint-symmetry.h:65
MyPaintSymmetryType type
The type of symmetry to use.
Definition: mypaint-symmetry.h:69
float center_x
The x coordinate of the symmetry center.
Definition: mypaint-symmetry.h:73
float angle
The angle of the symmetry, in radians.
Definition: mypaint-symmetry.h:81
float num_lines
The number of symmetry lines to use, only relevant when type is one of MYPAINT_SYMMETRY_TYPE_ROTATION...
Definition: mypaint-symmetry.h:86
float center_y
The y coordinate of the symmetry center.
Definition: mypaint-symmetry.h:77