LiVES  3.2.0
Macros | Functions
framedraw.h File Reference

Go to the source code of this file.

Macros

#define MIN_PRE_X   ((int)(58. * widget_opts.scale))
 
#define MIN_PRE_Y   ((int)(32. * widget_opts.scale))
 
#define MAX_PRE_X   ((int)(480. * widget_opts.scale))
 
#define MAX_PRE_Y   ((int)(280. * widget_opts.scale))
 
#define FD_HT_ADJ   12
 
#define CROSSHAIR_SIZE   8
 pixel size for crosshair "arms" More...
 
#define DEF_MASK_OPACITY   .5
 

Functions

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 More...
 
weed_plant_t * framedraw_redraw (lives_special_framedraw_rect_t *, weed_layer_t *layer)
 redraw when exposed/frame number changes More...
 
void after_framedraw_widget_changed (LiVESWidget *, lives_special_framedraw_rect_t *)
 callback for widgets More...
 
void framedraw_connect (lives_special_framedraw_rect_t *, int width, int height, lives_rfx_t *)
 activate the image for clicks and draws More...
 
void framedraw_connect_spinbutton (lives_special_framedraw_rect_t *, lives_rfx_t *)
 connect spinbutton to preview More...
 
void framedraw_add_reset (LiVESVBox *, lives_special_framedraw_rect_t *)
 add "reset values" button More...
 
void framedraw_add_label (LiVESVBox *box)
 add explanatory label More...
 
void load_framedraw_image (LiVESPixbuf *)
 reload and redraw the frame More...
 
void load_rfx_preview (lives_rfx_t *rfx)
 rfx preview More...
 
void invalidate_preview (lives_special_framedraw_rect_t *)
 
void on_framedraw_reset_clicked (LiVESButton *, lives_special_framedraw_rect_t *)
 reset button More...
 
boolean on_framedraw_mouse_start (LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *)
 
boolean on_framedraw_mouse_update (LiVESWidget *, LiVESXEventMotion *, lives_special_framedraw_rect_t *)
 
boolean on_framedraw_mouse_reset (LiVESWidget *, LiVESXEventButton *, lives_special_framedraw_rect_t *)
 
boolean on_framedraw_scroll (LiVESWidget *, LiVESXEventScroll *, lives_special_framedraw_rect_t *)
 
boolean on_framedraw_leave (LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *)
 
boolean on_framedraw_enter (LiVESWidget *, LiVESXEventCrossing *, lives_special_framedraw_rect_t *)
 
void draw_rect_demask (lives_colRGBA64_t *col, int x1, int y1, int x2, int y2, boolean filled)
 

Macro Definition Documentation

◆ CROSSHAIR_SIZE

#define CROSSHAIR_SIZE   8

pixel size for crosshair "arms"

Definition at line 19 of file framedraw.h.

◆ DEF_MASK_OPACITY

#define DEF_MASK_OPACITY   .5

Definition at line 21 of file framedraw.h.

◆ FD_HT_ADJ

#define FD_HT_ADJ   12

Definition at line 17 of file framedraw.h.

◆ MAX_PRE_X

#define MAX_PRE_X   ((int)(480. * widget_opts.scale))

Definition at line 13 of file framedraw.h.

◆ MAX_PRE_Y

#define MAX_PRE_Y   ((int)(280. * widget_opts.scale))

Definition at line 14 of file framedraw.h.

◆ MIN_PRE_X

#define MIN_PRE_X   ((int)(58. * widget_opts.scale))

Definition at line 10 of file framedraw.h.

◆ MIN_PRE_Y

#define MIN_PRE_Y   ((int)(32. * widget_opts.scale))

Definition at line 11 of file framedraw.h.

Function Documentation

◆ after_framedraw_widget_changed()

void after_framedraw_widget_changed ( LiVESWidget *  ,
lives_special_framedraw_rect_t  
)

callback for widgets

Definition at line 1282 of file framedraw.c.

◆ draw_rect_demask()

void draw_rect_demask ( lives_colRGBA64_t col,
int  x1,
int  y1,
int  x2,
int  y2,
boolean  filled 
)

◆ framedraw_add_label()

void framedraw_add_label ( LiVESVBox *  box)

add explanatory label

Definition at line 189 of file framedraw.c.

◆ framedraw_add_reset()

void framedraw_add_reset ( LiVESVBox *  ,
lives_special_framedraw_rect_t  
)

add "reset values" button

Definition at line 200 of file framedraw.c.

◆ framedraw_connect()

void framedraw_connect ( lives_special_framedraw_rect_t ,
int  width,
int  height,
lives_rfx_t  
)

activate the image for clicks and draws

Definition at line 165 of file framedraw.c.

◆ framedraw_connect_spinbutton()

void framedraw_connect_spinbutton ( lives_special_framedraw_rect_t ,
lives_rfx_t  
)

connect spinbutton to preview

Definition at line 152 of file framedraw.c.

Referenced by fd_connect_spinbutton().

◆ framedraw_redraw()

weed_plant_t* framedraw_redraw ( lives_special_framedraw_rect_t ,
weed_layer_t layer 
)

redraw when exposed/frame number changes

Definition at line 423 of file framedraw.c.

◆ invalidate_preview()

void invalidate_preview ( lives_special_framedraw_rect_t )

this is called when a parameter in a rendered effect is changed the current preview is invalid and we must reset back to the start frame

the exception is for effects which can resize, since we can only show an approximate preview anyway

Definition at line 42 of file framedraw.c.

Referenced by reset_framedraw_preview().

◆ load_framedraw_image()

void load_framedraw_image ( LiVESPixbuf *  )

reload and redraw the frame

◆ load_rfx_preview()

void load_rfx_preview ( lives_rfx_t rfx)

rfx preview

Definition at line 671 of file framedraw.c.

◆ on_framedraw_enter()

boolean on_framedraw_enter ( LiVESWidget *  ,
LiVESXEventCrossing *  ,
lives_special_framedraw_rect_t  
)

Definition at line 819 of file framedraw.c.

◆ on_framedraw_leave()

boolean on_framedraw_leave ( LiVESWidget *  ,
LiVESXEventCrossing *  ,
lives_special_framedraw_rect_t  
)

Definition at line 855 of file framedraw.c.

◆ on_framedraw_mouse_reset()

boolean on_framedraw_mouse_reset ( LiVESWidget *  ,
LiVESXEventButton *  ,
lives_special_framedraw_rect_t  
)

the focus is at xend, yend, but the crosshair may be offcenter. We need its position, and then we can find the offset to xcurrent, ycurrent. The offset is then added to the center.

Definition at line 1156 of file framedraw.c.

◆ on_framedraw_mouse_start()

boolean on_framedraw_mouse_start ( LiVESWidget *  ,
LiVESXEventButton *  ,
lives_special_framedraw_rect_t  
)

Definition at line 871 of file framedraw.c.

◆ on_framedraw_mouse_update()

boolean on_framedraw_mouse_update ( LiVESWidget *  ,
LiVESXEventMotion *  ,
lives_special_framedraw_rect_t  
)

Definition at line 989 of file framedraw.c.

◆ on_framedraw_reset_clicked()

void on_framedraw_reset_clicked ( LiVESButton *  ,
lives_special_framedraw_rect_t  
)

reset button

Definition at line 1296 of file framedraw.c.

◆ on_framedraw_scroll()

boolean on_framedraw_scroll ( LiVESWidget *  ,
LiVESXEventScroll *  ,
lives_special_framedraw_rect_t  
)

Definition at line 1263 of file framedraw.c.

◆ widget_add_framedraw()

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 at line 279 of file framedraw.c.

Referenced by on_fx_pre_activate().