127 double dtime,
float viewzoom,
float viewrotation,
float barrel_rotation);
145 double dtime,
float viewzoom,
float viewrotation,
float barrel_rotation);
MyPaintBrushInput
Definition: mypaint-brush-settings-gen.h:5
MyPaintBrushSetting
Definition: mypaint-brush-settings-gen.h:27
MyPaintBrushState
Definition: mypaint-brush-settings-gen.h:95
gint gboolean
Definition: mypaint-glib-compat.h:25
#define G_END_DECLS
Definition: mypaint-glib-compat.h:14
#define G_BEGIN_DECLS
Definition: mypaint-glib-compat.h:13
Maintains the data and state required to perform brush strokes.
int mypaint_brush_stroke_to_2_linearsRGB(MyPaintBrush *self, MyPaintSurface2 *surface, float x, float y, float pressure, float xtilt, float ytilt, double dtime, float viewzoom, float viewrotation, float barrel_rotation)
Same as mypaint_brush_stroke_to_2, but using linear sRGB for color dynamics.
int mypaint_brush_get_inputs_used_n(MyPaintBrush *self, MyPaintBrushSetting id)
Get the number of input mappings for a brush setting.
void mypaint_brush_from_defaults(MyPaintBrush *self)
Initialize a brush with default values for all settings.
void mypaint_brush_reset(MyPaintBrush *self)
Request a reset if the brush state.
gboolean mypaint_brush_from_string(MyPaintBrush *self, const char *string)
Initialize a brush from a JSON string.
MyPaintBrush * mypaint_brush_new(void)
Create a new brush.
void mypaint_brush_new_stroke(MyPaintBrush *self)
Start a new stroke.
float mypaint_brush_get_state(MyPaintBrush *self, MyPaintBrushState i)
Get the value of a brush state.
MyPaintBrush * mypaint_brush_new_with_buckets(int num_smudge_buckets)
Create a new brush with smudge buckets enabled.
double mypaint_brush_get_total_stroke_painting_time(MyPaintBrush *self)
Get the total time recorded since the last call to mypaint_brush_reset.
int mypaint_brush_stroke_to(MyPaintBrush *self, MyPaintSurface *surface, float x, float y, float pressure, float xtilt, float ytilt, double dtime)
Use the brush to draw a stroke segment on a MyPaintSurface.
void mypaint_brush_unref(MyPaintBrush *self)
Decrease the reference count by one, destroying the brush if it reaches 0.
gboolean mypaint_brush_is_constant(MyPaintBrush *self, MyPaintBrushSetting id)
Check if there are no dynamics/mappings for a brush setting.
int mypaint_brush_stroke_to_2(MyPaintBrush *self, MyPaintSurface2 *surface, float x, float y, float pressure, float xtilt, float ytilt, double dtime, float viewzoom, float viewrotation, float barrel_rotation)
Use the brush to draw a stroke segment on a MyPaintSurface2.
void mypaint_brush_set_print_inputs(MyPaintBrush *self, gboolean enabled)
Enable/Disable debug printouts.
void mypaint_brush_set_state(MyPaintBrush *self, MyPaintBrushState i, float value)
Set the value of a brush state.
void mypaint_brush_set_base_value(MyPaintBrush *self, MyPaintBrushSetting id, float value)
Set the base value of a brush setting.
void mypaint_brush_get_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float *x, float *y)
Get the coordinates of a point in an input mapping for a brush setting.
void mypaint_brush_set_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int n)
Set the number of points in an input mapping for a brush setting.
void mypaint_brush_set_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float x, float y)
Set the coordinates of a point in an input mapping for a brush setting.
void mypaint_brush_ref(MyPaintBrush *self)
Increase the reference count by one.
float mypaint_brush_get_base_value(MyPaintBrush *self, MyPaintBrushSetting id)
Get the base value of a brush setting.
int mypaint_brush_get_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input)
Get the number of points in an input mapping for a brush setting.
Extends MyPaintSurface with support for spectral ops and multiple bounding boxes.
Definition: mypaint-surface.h:321
Abstract surface type for the MyPaint brush engine.
Definition: mypaint-surface.h:131