|
|
bf1d82 |
#ifndef MYPAINTBRUSH_H
|
|
|
bf1d82 |
#define MYPAINTBRUSH_H
|
|
|
bf1d82 |
|
|
|
bf1d82 |
/* libmypaint - The MyPaint Brush Library
|
|
|
bf1d82 |
* Copyright (C) 2008 Martin Renold <martinxyz@gmx.ch></martinxyz@gmx.ch>
|
|
|
bf1d82 |
* Copyright (C) 2012 Jon Nordby <jononor@gmail.com></jononor@gmail.com>
|
|
|
bf1d82 |
*
|
|
|
bf1d82 |
* Permission to use, copy, modify, and/or distribute this software for any
|
|
|
bf1d82 |
* purpose with or without fee is hereby granted, provided that the above
|
|
|
bf1d82 |
* copyright notice and this permission notice appear in all copies.
|
|
|
bf1d82 |
*
|
|
|
bf1d82 |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
bf1d82 |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
bf1d82 |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
bf1d82 |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
bf1d82 |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
bf1d82 |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
bf1d82 |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
bf1d82 |
*/
|
|
|
bf1d82 |
|
|
|
bf1d82 |
#include <mypaint-config.h></mypaint-config.h>
|
|
|
bf1d82 |
#include <mypaint-surface.h></mypaint-surface.h>
|
|
|
bf1d82 |
#include <mypaint-brush-settings.h></mypaint-brush-settings.h>
|
|
|
bf1d82 |
|
|
|
bf1d82 |
G_BEGIN_DECLS
|
|
|
bf1d82 |
|
|
|
bf1d82 |
typedef struct MyPaintBrush MyPaintBrush;
|
|
|
bf1d82 |
|
|
|
bf1d82 |
MyPaintBrush *
|
|
|
bf1d82 |
mypaint_brush_new(void);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_unref(MyPaintBrush *self);
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_ref(MyPaintBrush *self);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_reset(MyPaintBrush *self);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_new_stroke(MyPaintBrush *self);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
int
|
|
|
bf1d82 |
mypaint_brush_stroke_to(MyPaintBrush *self, MyPaintSurface *surface, float x, float y,
|
|
|
bf1d82 |
float pressure, float xtilt, float ytilt, double dtime);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_set_base_value(MyPaintBrush *self, MyPaintBrushSetting id, float value);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
float
|
|
|
bf1d82 |
mypaint_brush_get_base_value(MyPaintBrush *self, MyPaintBrushSetting id);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
gboolean
|
|
|
bf1d82 |
mypaint_brush_is_constant(MyPaintBrush *self, MyPaintBrushSetting id);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
int
|
|
|
bf1d82 |
mypaint_brush_get_inputs_used_n(MyPaintBrush *self, MyPaintBrushSetting id);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_set_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int n);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
int
|
|
|
bf1d82 |
mypaint_brush_get_mapping_n(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_set_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float x, float y);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_get_mapping_point(MyPaintBrush *self, MyPaintBrushSetting id, MyPaintBrushInput input, int index, float *x, float *y);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
float
|
|
|
bf1d82 |
mypaint_brush_get_state(MyPaintBrush *self, MyPaintBrushState i);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_set_state(MyPaintBrush *self, MyPaintBrushState i, float value);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
double
|
|
|
bf1d82 |
mypaint_brush_get_total_stroke_painting_time(MyPaintBrush *self);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_set_print_inputs(MyPaintBrush *self, gboolean enabled);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
void
|
|
|
bf1d82 |
mypaint_brush_from_defaults(MyPaintBrush *self);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
|
|
|
bf1d82 |
gboolean
|
|
|
bf1d82 |
mypaint_brush_from_string(MyPaintBrush *self, const char *string);
|
|
|
bf1d82 |
|
|
|
bf1d82 |
|
|
|
bf1d82 |
G_END_DECLS
|
|
|
bf1d82 |
|
|
|
bf1d82 |
#endif // MYPAINTBRUSH_H
|