Rev 2097 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * warper.h |
||
2302 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2025 Jagannathan Sampath |
1528 | jag | 4 | * For more information, please visit http://dinisnoise.org/ |
5 | */ |
||
6 | |||
7 | |||
8 | #ifndef __WARPER |
||
9 | #define __WARPER |
||
10 | |||
11 | #include "spinner.h" |
||
12 | #include "curve_editor.h" |
||
13 | #include "curve_display.h" |
||
14 | #include "curve_library.h" |
||
15 | #include "plugin.h" |
||
16 | |||
17 | struct warper; |
||
18 | struct warp_listener : curve_listener { |
||
19 | warper* wp; |
||
20 | void edited (curve_editor* ed, int i); |
||
21 | }; |
||
22 | |||
23 | struct warper : plugin { |
||
24 | |||
25 | multi_curve x, y; |
||
26 | solver solx, soly; |
||
27 | |||
28 | warp_listener lis; |
||
29 | curve_editor ed; |
||
30 | curve_editor* back_ed; |
||
31 | |||
32 | button b_edit; |
||
33 | |||
34 | void clicked (button& b); |
||
35 | |||
36 | warper (); |
||
37 | ~warper (); |
||
38 | |||
39 | void setup (); |
||
40 | void warp (float& x, float& y, const box<float>& bbox); |
||
41 | void render (); |
||
42 | int apply (multi_curve& crv); |
||
43 | void draw (curve_editor* ed); |
||
44 | |||
45 | }; |
||
46 | |||
47 | extern warper warper_; |
||
48 | #endif |
||
49 | |||
50 | |||
51 |