LiVES 3.2.0
framedraw.h
Go to the documentation of this file.
1// LiVES
2// framedraw.h
3// (c) G. Finch (salsaman+lives@gmail.com) 2002 - 2018
4// see file COPYING for licensing details : released under the GNU GPL 3 or later
5
6#ifndef HAS_LIVES_FRAMEDRAW_H
7#define HAS_LIVES_FRAMEDRAW_H
8
9// min and max frame sizes for framedraw preview
10#define MIN_PRE_X ((int)(58. * widget_opts.scale))
11#define MIN_PRE_Y ((int)(32. * widget_opts.scale))
12
13#define MAX_PRE_X ((int)(480. * widget_opts.scale))
14#define MAX_PRE_Y ((int)(280. * widget_opts.scale))
15
16// internal padding in pixels for LiVESFrame
17#define FD_HT_ADJ 12
18
19#define CROSSHAIR_SIZE 8
20
21#define DEF_MASK_OPACITY .5
22
24void widget_add_framedraw(LiVESVBox *, int start, int end, boolean add_preview_button, int width, int height, lives_rfx_t *);
25
28
31
33void framedraw_connect(lives_special_framedraw_rect_t *, int width, int height, lives_rfx_t *);
34
37
40
42void framedraw_add_label(LiVESVBox *box);
43
45void load_framedraw_image(LiVESPixbuf *);
47
48// reset preview when any param changes
50
53
54boolean on_framedraw_mouse_start(LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *);
55boolean on_framedraw_mouse_update(LiVESWidget *, LiVESXEventMotion *, lives_special_framedraw_rect_t *);
56boolean on_framedraw_mouse_reset(LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *);
57
58boolean on_framedraw_scroll(LiVESWidget *, LiVESXEventScroll *, lives_special_framedraw_rect_t *);
59
60boolean on_framedraw_leave(LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *);
61boolean on_framedraw_enter(LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *);
62
63// graphics routines
64
65void draw_rect_demask(lives_colRGBA64_t *col, int x1, int y1, int x2, int y2, boolean filled);
66
67#endif
weed_plant_t weed_layer_t
Definition: colourspace.h:71
boolean on_framedraw_scroll(LiVESWidget *, LiVESXEventScroll *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:1263
void invalidate_preview(lives_special_framedraw_rect_t *)
Definition: framedraw.c:42
weed_plant_t * framedraw_redraw(lives_special_framedraw_rect_t *, weed_layer_t *layer)
redraw when exposed/frame number changes
Definition: framedraw.c:423
boolean on_framedraw_enter(LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:819
boolean on_framedraw_leave(LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:855
boolean on_framedraw_mouse_reset(LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:1156
void draw_rect_demask(lives_colRGBA64_t *col, int x1, int y1, int x2, int y2, boolean filled)
boolean on_framedraw_mouse_update(LiVESWidget *, LiVESXEventMotion *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:989
void framedraw_add_label(LiVESVBox *box)
add explanatory label
Definition: framedraw.c:189
void load_framedraw_image(LiVESPixbuf *)
reload and redraw the frame
void framedraw_connect(lives_special_framedraw_rect_t *, int width, int height, lives_rfx_t *)
activate the image for clicks and draws
Definition: framedraw.c:165
void load_rfx_preview(lives_rfx_t *rfx)
rfx preview
Definition: framedraw.c:671
void after_framedraw_widget_changed(LiVESWidget *, lives_special_framedraw_rect_t *)
callback for widgets
Definition: framedraw.c:1282
boolean on_framedraw_mouse_start(LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *)
Definition: framedraw.c:871
void widget_add_framedraw(LiVESVBox *, int start, int end, boolean add_preview_button, int width, int height, lives_rfx_t *)
call this to add framedraw widget to an hbox
Definition: framedraw.c:279
void framedraw_connect_spinbutton(lives_special_framedraw_rect_t *, lives_rfx_t *)
connect spinbutton to preview
Definition: framedraw.c:152
void on_framedraw_reset_clicked(LiVESButton *, lives_special_framedraw_rect_t *)
reset button
Definition: framedraw.c:1296
void framedraw_add_reset(LiVESVBox *, lives_special_framedraw_rect_t *)
add "reset values" button
Definition: framedraw.c:200