libmypaint
1.6.1
Toggle main menu visibility
Loading...
Searching...
No Matches
/builddir/build/BUILD/libmypaint-1.6.1-build/libmypaint-1.6.1/mypaint-mapping.h
Go to the documentation of this file.
1
#ifndef MAPPING_H
2
#define MAPPING_H
3
4
#include "
mypaint-config.h
"
5
#include "
mypaint-glib-compat.h
"
6
7
G_BEGIN_DECLS
8
18
typedef
struct
MyPaintMapping
MyPaintMapping
;
19
25
MyPaintMapping
*
mypaint_mapping_new
(
int
inputs_);
26
32
void
mypaint_mapping_free
(
MyPaintMapping
*self);
33
39
float
mypaint_mapping_get_base_value
(
MyPaintMapping
*self);
40
46
void
mypaint_mapping_set_base_value
(
MyPaintMapping
*self,
float
value);
47
53
void
mypaint_mapping_set_n
(
MyPaintMapping
* self,
int
input,
int
n);
54
60
int
mypaint_mapping_get_n
(
MyPaintMapping
* self,
int
input);
61
67
void
mypaint_mapping_set_point
(
MyPaintMapping
* self,
int
input,
int
index,
float
x,
float
y);
68
74
void
mypaint_mapping_get_point
(
MyPaintMapping
* self,
int
input,
int
index,
float
*x,
float
*y);
75
83
gboolean
mypaint_mapping_is_constant
(
MyPaintMapping
* self);
84
90
int
mypaint_mapping_get_inputs_used_n
(
MyPaintMapping
*self);
91
97
float
mypaint_mapping_calculate
(
MyPaintMapping
* self,
float
* data);
98
104
float
mypaint_mapping_calculate_single_input
(
MyPaintMapping
* self,
float
input);
105
106
107
G_END_DECLS
108
109
#endif
// MAPPING_H
MyPaintMapping
A sequence of piecewise linear functions.
MyPaintMapping::mypaint_mapping_get_point
void mypaint_mapping_get_point(MyPaintMapping *self, int input, int index, float *x, float *y)
Get the x, y coordinates for a control point.
MyPaintMapping::mypaint_mapping_calculate_single_input
float mypaint_mapping_calculate_single_input(MyPaintMapping *self, float input)
Calculate the output for a single-input mapping.
MyPaintMapping::mypaint_mapping_free
void mypaint_mapping_free(MyPaintMapping *self)
Free an instance of MyPaintMapping.
MyPaintMapping::mypaint_mapping_set_point
void mypaint_mapping_set_point(MyPaintMapping *self, int input, int index, float x, float y)
Set the x, y coordinates for a control point.
MyPaintMapping::mypaint_mapping_get_inputs_used_n
int mypaint_mapping_get_inputs_used_n(MyPaintMapping *self)
Get the number of inputs that have control points.
MyPaintMapping::mypaint_mapping_is_constant
gboolean mypaint_mapping_is_constant(MyPaintMapping *self)
Returns TRUE if none of the mappings are used.
MyPaintMapping::mypaint_mapping_calculate
float mypaint_mapping_calculate(MyPaintMapping *self, float *data)
Calculate the output of the mapping, given an input value for each mapping.
MyPaintMapping::mypaint_mapping_set_n
void mypaint_mapping_set_n(MyPaintMapping *self, int input, int n)
Set the number of control points used for the input.
MyPaintMapping::mypaint_mapping_set_base_value
void mypaint_mapping_set_base_value(MyPaintMapping *self, float value)
Set the base value of the mappings.
MyPaintMapping::mypaint_mapping_get_n
int mypaint_mapping_get_n(MyPaintMapping *self, int input)
Get the number of control points used for the input.
MyPaintMapping::mypaint_mapping_new
MyPaintMapping * mypaint_mapping_new(int inputs_)
Create new mappings for a set number of inputs.
MyPaintMapping::mypaint_mapping_get_base_value
float mypaint_mapping_get_base_value(MyPaintMapping *self)
Get the base value of the mappings.
mypaint-config.h
mypaint-glib-compat.h
gboolean
gint gboolean
Definition
mypaint-glib-compat.h:25
G_END_DECLS
#define G_END_DECLS
Definition
mypaint-glib-compat.h:14
G_BEGIN_DECLS
#define G_BEGIN_DECLS
Definition
mypaint-glib-compat.h:13
Generated on
for libmypaint by
1.17.0