modify clr btn 16 plugins, add regdmp for sigtraps, rework mask_engine, mask rotate...
authorGood Guy <good1.2guy@gmail.com>
Tue, 14 May 2019 21:23:17 +0000 (15:23 -0600)
committerGood Guy <good1.2guy@gmail.com>
Tue, 14 May 2019 21:23:17 +0000 (15:23 -0600)
145 files changed:
cinelerra-5.1/cinelerra/cwindowgui.C
cinelerra-5.1/cinelerra/cwindowtool.C
cinelerra-5.1/cinelerra/cwindowtool.h
cinelerra-5.1/cinelerra/cwindowtool.inc
cinelerra-5.1/cinelerra/edl.inc
cinelerra-5.1/cinelerra/maskauto.C
cinelerra-5.1/cinelerra/maskauto.h
cinelerra-5.1/cinelerra/maskauto.inc
cinelerra-5.1/cinelerra/maskautos.C
cinelerra-5.1/cinelerra/maskengine.C
cinelerra-5.1/cinelerra/playback3d.C
cinelerra-5.1/cinelerra/theme.C
cinelerra-5.1/cinelerra/theme.h
cinelerra-5.1/guicast/bcsignals.C
cinelerra-5.1/guicast/bcslider.h
cinelerra-5.1/plugins/brightness/brightnesswindow.C
cinelerra-5.1/plugins/brightness/brightnesswindow.h
cinelerra-5.1/plugins/color3way/color3waywindow.C
cinelerra-5.1/plugins/color3way/color3waywindow.h
cinelerra-5.1/plugins/colorbalance/colorbalancewindow.C
cinelerra-5.1/plugins/colorbalance/colorbalancewindow.h
cinelerra-5.1/plugins/huesaturation/huesaturation.C
cinelerra-5.1/plugins/huesaturation/huesaturation.h
cinelerra-5.1/plugins/linearblur/linearblur.C
cinelerra-5.1/plugins/linearblur/linearblur.h
cinelerra-5.1/plugins/polar/polar.C
cinelerra-5.1/plugins/radialblur/radialblur.C
cinelerra-5.1/plugins/radialblur/radialblur.h
cinelerra-5.1/plugins/rgbshift/rgbshift.C
cinelerra-5.1/plugins/rgbshift/rgbshift.h
cinelerra-5.1/plugins/sharpen/sharpenwindow.C
cinelerra-5.1/plugins/sharpen/sharpenwindow.h
cinelerra-5.1/plugins/shiftinterlace/shiftinterlace.C
cinelerra-5.1/plugins/shiftinterlace/shiftinterlace.h
cinelerra-5.1/plugins/theme_blond/blondtheme.C
cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/blondcvtheme.C
cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blond_cv/data/reset_dn.png
cinelerra-5.1/plugins/theme_blond_cv/data/reset_hi.png
cinelerra-5.1/plugins/theme_blond_cv/data/reset_up.png
cinelerra-5.1/plugins/theme_blue/bluetheme.C
cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/bluedottheme.C
cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_blue_dot/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/brighttheme.C
cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_bright/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_hulk/hulktheme.C
cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_neophyte/neophyte.C
cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_pinklady/pinkladytheme.C
cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/reset.svg [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_suv/suv.C
cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkd.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkdhi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/mask_mode_down.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/mask_mode_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/mask_mode_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/reset.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/reset_dn.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/reset_hi.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/data/reset_up.png [new file with mode: 0644]
cinelerra-5.1/plugins/theme_unflat/unflattheme.C
cinelerra-5.1/plugins/unsharp/unsharpwindow.C
cinelerra-5.1/plugins/unsharp/unsharpwindow.h
cinelerra-5.1/plugins/wave/wave.C
cinelerra-5.1/plugins/wave/wave.h
cinelerra-5.1/plugins/whirl/whirl.C
cinelerra-5.1/plugins/yuv/yuv.C
cinelerra-5.1/plugins/yuvshift/yuvshift.C
cinelerra-5.1/plugins/yuvshift/yuvshift.h
cinelerra-5.1/plugins/zoomblur/zoomblur.C
cinelerra-5.1/plugins/zoomblur/zoomblur.h

index d29e0575806dfef8687e3d8279c9db1453f7c517..af4d818d8378c257edac3ea08e54aae079ebaaa4 100644 (file)
@@ -1823,7 +1823,18 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender,
                }
                SubMask *mask = gui->mask_keyframe->get_submask(mwindow->edl->session->cwindow_mask);
 
-
+               if( get_buttonpress() == WHEEL_UP || get_buttonpress() == WHEEL_DOWN ) {
+                       if( !gui->shift_down() ) {
+                               mwindow->undo->update_undo_before(_("mask rotate"), this);
+                               gui->current_operation = CWINDOW_MASK_ROTATE;
+                       }
+                       else {
+                               mwindow->undo->update_undo_before(_("mask scale"), this);
+                               gui->current_operation = CWINDOW_MASK_SCALE;
+                       }
+                       gui->affected_point = 0;
+               }
+               else
 // Translate entire keyframe
                if(gui->alt_down() && mask->points.size()) {
                        mwindow->undo->update_undo_before(_("mask translate"), 0);
@@ -1993,17 +2004,12 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender,
 
        if(button_press && result) {
 #ifdef USE_KEYFRAME_SPANNING
-               MaskPoint *point = points.values[gui->affected_point];
-               gui->center_x = point->x;
-               gui->center_y = point->y;
-               gui->control_in_x = point->control_x1;
-               gui->control_in_y = point->control_y1;
-               gui->control_out_x = point->control_x2;
-               gui->control_out_y = point->control_y2;
-               gui->tool_panel->raise_window();
+               ArrayList<MaskPoint*> &mask_points = points;
 #else
                SubMask *mask = gui->mask_keyframe->get_submask(mwindow->edl->session->cwindow_mask);
-               MaskPoint *point = mask->points.values[gui->affected_point];
+               ArrayList<MaskPoint*> &mask_points = mask->points;
+#endif
+               MaskPoint *point = mask_points.values[gui->affected_point];
                gui->center_x = point->x;
                gui->center_y = point->y;
                gui->control_in_x = point->control_x1;
@@ -2011,18 +2017,15 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender,
                gui->control_out_x = point->control_x2;
                gui->control_out_y = point->control_y2;
                gui->tool_panel->raise_window();
-#endif
        }
 
 //printf("CWindowCanvas::do_mask 8\n");
-       if(cursor_motion) {
+       if( cursor_motion ) {
 
 #ifdef USE_KEYFRAME_SPANNING
 // Must update the reference keyframes for every cursor motion
-               gui->mask_keyframe =
-                       (MaskAuto*)gui->cwindow->calculate_affected_auto(
-                               mask_autos,
-                               0);
+               gui->mask_keyframe = (MaskAuto*)gui->cwindow->
+                       calculate_affected_auto(mask_autos, 0);
                gui->orig_mask_keyframe->copy_data(gui->mask_keyframe);
 #endif
 
@@ -2033,12 +2036,13 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender,
                        gui->current_operation != CWINDOW_NONE) {
 //                     mwindow->undo->update_undo_before(_("mask point"), this);
 #ifdef USE_KEYFRAME_SPANNING
-                       MaskPoint *point = points.get(gui->affected_point);
+                       ArrayList<MaskPoint*> &mask_points = points;
 #else
-                       MaskPoint *point = mask->points.get(gui->affected_point);
+                       ArrayList<MaskPoint*> &mask_points = mask->points;
 #endif
+                       MaskPoint *point = mask_points.get(gui->affected_point);
 //                     canvas_to_output(mwindow->edl, 0, cursor_x, cursor_y);
-//printf("CWindowCanvas::do_mask 9 %d %d\n", mask->points.size(), gui->affected_point);
+//printf("CWindowCanvas::do_mask 9 %d %d\n", mask_points.size(), gui->affected_point);
 
                        float last_x = point->x;
                        float last_y = point->y;
@@ -2046,39 +2050,52 @@ int CWindowCanvas::do_mask(int &redraw, int &rerender,
                        float last_control_y1 = point->control_y1;
                        float last_control_x2 = point->control_x2;
                        float last_control_y2 = point->control_y2;
+                       int rotate = 0;
 
                        switch(gui->current_operation) {
-                               case CWINDOW_MASK:
+                       case CWINDOW_MASK:
 //printf("CWindowCanvas::do_mask %d %d\n", __LINE__, gui->affected_point);
-                                       point->x = mask_cursor_x - gui->x_origin + gui->center_x;
-                                       point->y = mask_cursor_y - gui->y_origin + gui->center_y;
-                                       break;
+                               point->x = mask_cursor_x - gui->x_origin + gui->center_x;
+                               point->y = mask_cursor_y - gui->y_origin + gui->center_y;
+                               break;
 
-                               case CWINDOW_MASK_CONTROL_IN:
-                                       point->control_x1 = mask_cursor_x - gui->x_origin + gui->control_in_x;
-                                       point->control_y1 = mask_cursor_y - gui->y_origin + gui->control_in_y;
-                                       break;
+                       case CWINDOW_MASK_CONTROL_IN:
+                               point->control_x1 = mask_cursor_x - gui->x_origin + gui->control_in_x;
+                               point->control_y1 = mask_cursor_y - gui->y_origin + gui->control_in_y;
+                               break;
 
-                               case CWINDOW_MASK_CONTROL_OUT:
-                                       point->control_x2 = mask_cursor_x - gui->x_origin + gui->control_out_x;
-                                       point->control_y2 = mask_cursor_y - gui->y_origin + gui->control_out_y;
-                                       break;
+                       case CWINDOW_MASK_CONTROL_OUT:
+                               point->control_x2 = mask_cursor_x - gui->x_origin + gui->control_out_x;
+                               point->control_y2 = mask_cursor_y - gui->y_origin + gui->control_out_y;
+                               break;
 
-                               case CWINDOW_MASK_TRANSLATE:
-#ifdef USE_KEYFRAME_SPANNING
-                                       for(int i = 0; i < points.size(); i++) {
-                                               points.values[i]->x += mask_cursor_x - gui->x_origin;
-                                               points.values[i]->y += mask_cursor_y - gui->y_origin;
-                                       }
-#else
-                                       for(int i = 0; i < mask->points.size(); i++) {
-                                               mask->points.values[i]->x += mask_cursor_x - gui->x_origin;
-                                               mask->points.values[i]->y += mask_cursor_y - gui->y_origin;
-                                       }
-#endif
-                                       gui->x_origin = mask_cursor_x;
-                                       gui->y_origin = mask_cursor_y;
-                                       break;
+                       case CWINDOW_MASK_TRANSLATE:
+                               for(int i = 0; i < mask_points.size(); i++) {
+                                       mask_points.values[i]->x += mask_cursor_x - gui->x_origin;
+                                       mask_points.values[i]->y += mask_cursor_y - gui->y_origin;
+                               }
+                               gui->x_origin = mask_cursor_x;
+                               gui->y_origin = mask_cursor_y;
+                               break;
+                       case CWINDOW_MASK_ROTATE:
+                               rotate = 1;
+                       case CWINDOW_MASK_SCALE: {
+                               int button_no = get_buttonpress();
+                               double scale = button_no == WHEEL_UP ? 1.02 : 0.98;
+                               double theta = button_no == WHEEL_UP ? M_PI/360. : -M_PI/360.;
+                               float st = sin(theta), ct = cos(theta);
+                               gui->x_origin = mask_cursor_x;
+                               gui->y_origin = mask_cursor_y;
+                               for( int i=0; i<mask_points.size(); ++i ) {
+                                       MaskPoint *point = mask_points.values[i];
+                                       float px = point->x - mask_cursor_x;
+                                       float py = point->y - mask_cursor_y;
+                                       float nx = !rotate ? px*scale : px*ct + py*st;
+                                       float ny = !rotate ? py*scale : py*ct - px*st;
+                                       point->x = nx + mask_cursor_x;
+                                       point->y = ny + mask_cursor_y;
+                               }
+                               break; }
                        }
 
                        if( !EQUIV(last_x, point->x) ||
@@ -3297,8 +3314,16 @@ int CWindowCanvas::button_press_event()
                                break;
 
                        case CWINDOW_MASK:
-                               if(get_buttonpress() == 1)
+                               switch( get_buttonpress() ) {
+                               case LEFT_BUTTON:
                                        result = do_mask(redraw, rerender, 1, 0, 0);
+                                       break;
+                               case WHEEL_UP:
+                               case WHEEL_DOWN:
+                                       result = do_mask(redraw, rerender, 1, 1, 0);
+                                       break;
+                               }
+                               if( result ) redraw_canvas = 1;
                                break;
 
                        case CWINDOW_EYEDROP:
@@ -3316,6 +3341,7 @@ int CWindowCanvas::button_press_event()
 int CWindowCanvas::button_release_event()
 {
        int result = 0;
+       const char *undo_label = 0;
 
        switch(gui->current_operation)
        {
@@ -3328,11 +3354,11 @@ int CWindowCanvas::button_release_event()
                        break;
 
                case CWINDOW_CAMERA:
-                       mwindow->undo->update_undo_after(_("camera"), LOAD_AUTOMATION);
+                       undo_label = _("camera");
                        break;
 
                case CWINDOW_PROJECTOR:
-                       mwindow->undo->update_undo_after(_("projector"), LOAD_AUTOMATION);
+                       undo_label = _("projector");
                        break;
 
                case CWINDOW_MASK:
@@ -3341,13 +3367,23 @@ int CWindowCanvas::button_release_event()
                case CWINDOW_MASK_TRANSLATE:
 // Finish mask operation
                        gui->mask_keyframe = 0;
-                       mwindow->undo->update_undo_after(_("mask"), LOAD_AUTOMATION);
+                       undo_label = _("mask");
+                       break;
+               case CWINDOW_MASK_ROTATE:
+                       gui->mask_keyframe = 0;
+                       undo_label = _("mask rotate");
+                       break;
+               case CWINDOW_MASK_SCALE:
+                       gui->mask_keyframe = 0;
+                       undo_label = _("mask scale");
                        break;
                case CWINDOW_NONE:
                        result = Canvas::button_release_event();
                        break;
        }
 
+       if( undo_label )
+               mwindow->undo->update_undo_after(undo_label, LOAD_AUTOMATION);
        gui->current_operation = CWINDOW_NONE;
        return result;
 }
index 99577fd85a63e1b6c4c34d287b09834b3bc2eeb4..4a76981c229588077cc50221bd692a90c7e9c164 100644 (file)
@@ -330,14 +330,14 @@ int CWindowToolGUI::translation_event()
 
 
 CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, float value, int log_increment = 0)
- : BC_TumbleTextBox(gui, (float)value, (float)-65536, (float)65536, x, y, 100)
+ : BC_TumbleTextBox(gui, (float)value, (float)-65536, (float)65536, x, y, 100, 3)
 {
        this->gui = gui;
        set_log_floatincrement(log_increment);
 }
 
 CWindowCoord::CWindowCoord(CWindowToolGUI *gui, int x, int y, int value)
- : BC_TumbleTextBox(gui, (int64_t)value, (int64_t)-65536, (int64_t)65536, x, y, 100)
+ : BC_TumbleTextBox(gui, (int64_t)value, (int64_t)-65536, (int64_t)65536, x, y, 100, 3)
 {
        this->gui = gui;
 }
@@ -1481,111 +1481,140 @@ int CWindowProjectorBottom::handle_event()
 }
 
 
-CWindowMaskMode::CWindowMaskMode(MWindow *mwindow,
+CWindowMaskName::CWindowMaskName(MWindow *mwindow,
        CWindowToolGUI *gui, int x, int y, const char *text)
- : BC_PopupMenu(x, y, 220, text, 1)
+ : BC_PopupTextBox(gui, 0, text, x, y, 100, 160)
 {
        this->mwindow = mwindow;
        this->gui = gui;
 }
 
-void CWindowMaskMode::create_objects()
+CWindowMaskName::~CWindowMaskName()
 {
-       add_item(new BC_MenuItem(mode_to_text(MASK_MULTIPLY_ALPHA)));
-       add_item(new BC_MenuItem(mode_to_text(MASK_SUBTRACT_ALPHA)));
 }
 
-char* CWindowMaskMode::mode_to_text(int mode)
+int CWindowMaskName::handle_event()
 {
-       switch(mode)
-       {
-               case MASK_MULTIPLY_ALPHA:
-                       return _("Multiply alpha");
-                       break;
-
-               case MASK_SUBTRACT_ALPHA:
-                       return _("Subtract alpha");
-                       break;
+       Track *track;
+       MaskAutos *autos;
+       MaskAuto *keyframe;
+       SubMask *mask;
+       MaskPoint *point;
+//printf("CWindowMaskGUI::update 1\n");
+       ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
+       if( track ) {
+               int k = get_number();
+               if( k < 0 ) k = mwindow->edl->session->cwindow_mask;
+               else mwindow->edl->session->cwindow_mask = k;
+               if( k >= 0 && k < mask_items.size() ) {
+                       mask_items[k]->set_text(get_text());
+                       update_list(&mask_items);
+               }
+#ifdef USE_KEYFRAME_SPANNING
+               MaskAuto temp_keyframe(mwindow->edl, autos);
+               temp_keyframe.copy_data(keyframe);
+               SubMask *submask = temp_keyframe.get_submask(mwindow->edl->session->cwindow_mask);
+               memset(submask->name, 0, sizeof(submask->name));
+               strncpy(submask->name, get_text(), sizeof(submask->name)-1);
+               ((MaskAutos*)track->automation->autos[AUTOMATION_MASK])->update_parameter(&temp_keyframe);
+#else
+               for(MaskAuto *current = (MaskAuto*)autos->default_auto; current; ) {
+                       SubMask *submask = current->get_submask(mwindow->edl->session->cwindow_mask);
+                       memset(submask->name, 0, sizeof(submask->name));
+                       strncpy(submask->name, get_text(), sizeof(submask->name));
+                       current = current == (MaskAuto*)autos->default_auto ?
+                               (MaskAuto*)autos->first : (MaskAuto*)NEXT;
+               }
+#endif
+               gui->update();
+               gui->update_preview();
        }
-
-       return _("Subtract alpha");
+       return 1;
 }
 
-int CWindowMaskMode::text_to_mode(char *text)
+void CWindowMaskName::update_items(MaskAuto *keyframe)
 {
-       if(!strcasecmp(text, _("Multiply alpha")))
-               return MASK_MULTIPLY_ALPHA;
-       else
-       if(!strcasecmp(text, _("Subtract alpha")))
-               return MASK_SUBTRACT_ALPHA;
+       mask_items.remove_all_objects();
+       int sz = keyframe->masks.size();
+       for( int i=0; i<sz; ++i ) {
+               SubMask *sub_mask = keyframe->masks.get(i);
+               char *text = sub_mask->name;
+               mask_items.append(new BC_ListBoxItem(text));
+       }
+       update_list(&mask_items);
+}
 
-       return MASK_SUBTRACT_ALPHA;
+
+CWindowMaskDelMask::CWindowMaskDelMask(MWindow *mwindow,
+       CWindowToolGUI *gui, int x, int y)
+ : BC_GenericButton(x, y, _("Delete"))
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Delete mask"));
 }
 
-int CWindowMaskMode::handle_event()
+int CWindowMaskDelMask::handle_event()
 {
        MaskAutos *autos;
        MaskAuto *keyframe;
        Track *track;
        MaskPoint *point;
        SubMask *mask;
+
 // Get existing keyframe
        ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
-       if(track)
-       {
-               mwindow->undo->update_undo_before(_("mask mode"), 0);
+
+       if( track ) {
+               mwindow->undo->update_undo_before(_("mask delete"), 0);
+
 #ifdef USE_KEYFRAME_SPANNING
 // Create temp keyframe
                MaskAuto temp_keyframe(mwindow->edl, autos);
                temp_keyframe.copy_data(keyframe);
 // Update parameter
-               temp_keyframe.mode = text_to_mode(get_text());
+               SubMask *submask = temp_keyframe.get_submask(mwindow->edl->session->cwindow_mask);
+               submask->points.remove_all_objects();
 // Commit change to span of keyframes
-               autos->update_parameter(&temp_keyframe);
+               ((MaskAutos*)track->automation->autos[AUTOMATION_MASK])->update_parameter(&temp_keyframe);
 #else
-               ((MaskAuto*)autos->default_auto)->mode =
-                       text_to_mode(get_text());
+               for(MaskAuto *current = (MaskAuto*)autos->default_auto; current; ) {
+                       SubMask *submask = current->get_submask(mwindow->edl->session->cwindow_mask);
+                       submask->points.remove_all_objects();
+                       current = current == (MaskAuto*)autos->default_auto ?
+                               (MaskAuto*)autos->first : (MaskAuto*)NEXT;
+               }
 #endif
-               mwindow->undo->update_undo_after(_("mask mode"), LOAD_AUTOMATION);
+               gui->update();
+               gui->update_preview();
+               mwindow->undo->update_undo_after(_("mask delete"), LOAD_AUTOMATION);
        }
 
-//printf("CWindowMaskMode::handle_event 1\n");
-       gui->update_preview();
        return 1;
 }
 
-
-
-
-
-
-
-
-CWindowMaskDelete::CWindowMaskDelete(MWindow *mwindow,
-       CWindowToolGUI *gui,
-       int x,
-       int y)
+CWindowMaskDelPoint::CWindowMaskDelPoint(MWindow *mwindow,
+       CWindowToolGUI *gui, int x, int y)
  : BC_GenericButton(x, y, _("Delete"))
 {
        this->mwindow = mwindow;
        this->gui = gui;
+       set_tooltip(_("Delete point"));
 }
 
-int CWindowMaskDelete::handle_event()
+int CWindowMaskDelPoint::handle_event()
 {
        MaskAutos *autos;
        MaskAuto *keyframe;
        Track *track;
        MaskPoint *point;
        SubMask *mask;
-       int total_points = 0;
+       int total_points;
 
 // Get existing keyframe
        ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
-
-       if(track)
-       {
-               mwindow->undo->update_undo_before(_("mask delete"), 0);
+       if( track ) {
+               mwindow->undo->update_undo_before(_("point delete"), 0);
 
 #ifdef USE_KEYFRAME_SPANNING
 // Create temp keyframe
@@ -1593,51 +1622,31 @@ int CWindowMaskDelete::handle_event()
                temp_keyframe.copy_data(keyframe);
 // Update parameter
                SubMask *submask = temp_keyframe.get_submask(mwindow->edl->session->cwindow_mask);
-               if( shift_down() )
-                       submask->points.remove_all_objects();
-
-               for(int i = mwindow->cwindow->gui->affected_point;
-                       i < submask->points.total - 1;
-                       i++)
-               {
-                       *submask->points.values[i] = *submask->points.values[i + 1];
-               }
-
-               if(submask->points.total)
-               {
-                       submask->points.remove_object(
-                               submask->points.values[submask->points.total - 1]);
+               int i = mwindow->cwindow->gui->affected_point;
+               for( ; i<submask->points.total-1; ++i )
+                       *submask->points.values[i] = *submask->points.values[i+1];
+               if( submask->points.total > 0 ) {
+                       point = submask->points.values[submask->points.total-1];
+                       submask->points.remove_object(point);
                }
                total_points = submask->points.total;
 
 // Commit change to span of keyframes
                ((MaskAutos*)track->automation->autos[AUTOMATION_MASK])->update_parameter(&temp_keyframe);
 #else
-               for(MaskAuto *current = (MaskAuto*)autos->default_auto;
-                       current; )
-               {
+               MaskAuto *current = (MaskAuto*)autos->default_auto;
+               while( current ) {
                        SubMask *submask = current->get_submask(mwindow->edl->session->cwindow_mask);
-                       if( shift_down() )
-                               submask->points.remove_all_objects();
-
-                       for(int i = mwindow->cwindow->gui->affected_point;
-                               i < submask->points.total - 1;
-                               i++)
-                       {
-                               *submask->points.values[i] = *submask->points.values[i + 1];
-                       }
-
-                       if(submask->points.total)
-                       {
-                               submask->points.remove_object(
-                                       submask->points.values[submask->points.total - 1]);
+                       int i = mwindow->cwindow->gui->affected_point;
+                       for( ; i<submask->points.total-1; ++i ) {
+                               *submask->points.values[i] = *submask->points.values[i+1];
+                       if( submask->points.total > 0 ) {
+                               point = submask->points.values[submask->points.total-1];
+                               submask->points.remove_object(point);
                        }
                        total_points = submask->points.total;
-
-                       if(current == (MaskAuto*)autos->default_auto)
-                               current = (MaskAuto*)autos->first;
-                       else
-                               current = (MaskAuto*)NEXT;
+                       current = current == (MaskAuto*)autos->default_auto ?
+                               (MaskAuto*)autos->first : (MaskAuto*)NEXT;
                }
 #endif
                if( mwindow->cwindow->gui->affected_point >= total_points )
@@ -1649,123 +1658,18 @@ int CWindowMaskDelete::handle_event()
                mwindow->undo->update_undo_after(_("mask delete"), LOAD_AUTOMATION);
        }
 
-
        return 1;
 }
 
-int CWindowMaskDelete::keypress_event()
+int CWindowMaskDelPoint::keypress_event()
 {
-       if(get_keypress() == BACKSPACE ||
-               get_keypress() == DELETE)
+       if( get_keypress() == BACKSPACE ||
+           get_keypress() == DELETE )
                return handle_event();
        return 0;
 }
 
 
-// CWindowMaskCycleNext::CWindowMaskCycleNext(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
-//  : BC_GenericButton(x, y, _("Cycle next"))
-// {
-//     this->mwindow = mwindow;
-//     this->gui = gui;
-// }
-// int CWindowMaskCycleNext::handle_event()
-// {
-//     MaskAuto *keyframe;
-//     MaskAutos *autos;
-//     Track *track;
-//     MaskPoint *point;
-//     SubMask *mask;
-//     ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
-//
-//     MaskPoint *temp;
-//
-// // Should apply to all keyframes
-//     if(keyframe && mask->points.total)
-//     {
-//             temp = mask->points.values[0];
-//
-//             for(int i = 0; i < mask->points.total - 1; i++)
-//             {
-//                     mask->points.values[i] = mask->points.values[i + 1];
-//             }
-//             mask->points.values[mask->points.total - 1] = temp;
-//
-//             mwindow->cwindow->gui->affected_point--;
-//             if(mwindow->cwindow->gui->affected_point < 0)
-//                     mwindow->cwindow->gui->affected_point = mask->points.total - 1;
-//
-//             gui->update();
-//             gui->update_preview();
-//     }
-//
-//     return 1;
-// }
-//
-// CWindowMaskCyclePrev::CWindowMaskCyclePrev(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
-//  : BC_GenericButton(x, y, _("Cycle prev"))
-// {
-//     this->mwindow = mwindow;
-//     this->gui = gui;
-// }
-// int CWindowMaskCyclePrev::handle_event()
-// {
-//     MaskAuto *keyframe;
-//     MaskAutos *autos;
-//     Track *track;
-//     MaskPoint *point;
-//     SubMask *mask;
-//     ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
-//
-// // Should apply to all keyframes
-//     MaskPoint *temp;
-//     if(keyframe && mask->points.total)
-//     {
-//             temp = mask->points.values[mask->points.total - 1];
-//
-//             for(int i = mask->points.total - 1; i > 0; i--)
-//             {
-//                     mask->points.values[i] = mask->points.values[i - 1];
-//             }
-//             mask->points.values[0] = temp;
-//
-//             mwindow->cwindow->gui->affected_point++;
-//             if(mwindow->cwindow->gui->affected_point >= mask->points.total)
-//                     mwindow->cwindow->gui->affected_point = 0;
-//
-//             gui->update();
-//             gui->update_preview();
-//     }
-//     return 1;
-// }
-
-
-CWindowMaskNumber::CWindowMaskNumber(MWindow *mwindow,
-       CWindowToolGUI *gui,
-       int x,
-       int y)
- : BC_TumbleTextBox(gui,
-               (int64_t)mwindow->edl->session->cwindow_mask,
-               (int64_t)0,
-               (int64_t)SUBMASKS - 1,
-               x,
-               y,
-               100)
-{
-       this->mwindow = mwindow;
-       this->gui = gui;
-}
-
-CWindowMaskNumber::~CWindowMaskNumber()
-{
-}
-
-int CWindowMaskNumber::handle_event()
-{
-       mwindow->edl->session->cwindow_mask = atol(get_text());
-       gui->update();
-       gui->update_preview();
-       return 1;
-}
 
 
 CWindowMaskAffectedPoint::CWindowMaskAffectedPoint(MWindow *mwindow,
@@ -1809,17 +1713,8 @@ int CWindowMaskAffectedPoint::handle_event()
 }
 
 
-
-
-
 CWindowMaskFeather::CWindowMaskFeather(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
- : BC_TumbleTextBox(gui,
-               (int64_t)0,
-               (int64_t)0,
-               (int64_t)0xff,
-               x,
-               y,
-               100)
+ : BC_TumbleTextBox(gui, 0, 0, 0xff, x, y, 64, 2)
 {
        this->mwindow = mwindow;
        this->gui = gui;
@@ -1827,7 +1722,15 @@ CWindowMaskFeather::CWindowMaskFeather(MWindow *mwindow, CWindowToolGUI *gui, in
 CWindowMaskFeather::~CWindowMaskFeather()
 {
 }
-int CWindowMaskFeather::handle_event()
+
+int CWindowMaskFeather::update(float v)
+{
+       CWindowMaskGUI *mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->feather_slider->update(v);
+       return BC_TumbleTextBox::update(v);
+}
+
+int CWindowMaskFeather::update_value(float v)
 {
        MaskAutos *autos;
        MaskAuto *keyframe;
@@ -1845,19 +1748,17 @@ int CWindowMaskFeather::handle_event()
 // Get existing keyframe
        ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe,
                        mask, point, create_it);
-
-       if(track)
-       {
+       if( track ) {
 #ifdef USE_KEYFRAME_SPANNING
 // Create temp keyframe
                MaskAuto temp_keyframe(mwindow->edl, autos);
                temp_keyframe.copy_data(keyframe);
 // Update parameter
-               temp_keyframe.feather = atof(get_text());
+               temp_keyframe.feather = v;
 // Commit change to span of keyframes
                autos->update_parameter(&temp_keyframe);
 #else
-               keyframe->feather = atof(get_text());
+               keyframe->feather = v;
 #endif
 
                gui->update_preview();
@@ -1867,26 +1768,58 @@ int CWindowMaskFeather::handle_event()
        return 1;
 }
 
+int CWindowMaskFeather::handle_event()
+{
+       float v = atof(get_text());
+       CWindowMaskGUI * mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->feather_slider->update(v);
+       return mask_gui->feather->update_value(v);
+}
 
-CWindowMaskValue::CWindowMaskValue(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
- : BC_ISlider(x,
-                       y,
-                       0,
-                       200,
-                       200,
-                       0,
-                       100,
-                       0)
+CWindowMaskFeatherSlider::CWindowMaskFeatherSlider(MWindow *mwindow,
+               CWindowToolGUI *gui, int x, int y, int w, float v)
+ : BC_FSlider(x, y, 0, w, w, 0.f, 255.f, v)
 {
        this->mwindow = mwindow;
        this->gui = gui;
+       set_precision(0.01);
+}
+
+CWindowMaskFeatherSlider::~CWindowMaskFeatherSlider()
+{
+}
+
+int CWindowMaskFeatherSlider::handle_event()
+{
+       float v = get_value();
+       CWindowMaskGUI * mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->feather->update(v);
+       return mask_gui->feather->update_value(v);
+}
+
+int CWindowMaskFeatherSlider::update(float v)
+{
+       return BC_FSlider::update(v);
+}
+
+CWindowMaskFade::CWindowMaskFade(MWindow *mwindow, CWindowToolGUI *gui, int x, int y)
+ : BC_TumbleTextBox(gui, 0, -100.f, 100.f, x, y, 64, 2)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+}
+CWindowMaskFade::~CWindowMaskFade()
+{
 }
 
-CWindowMaskValue::~CWindowMaskValue()
+int CWindowMaskFade::update(float v)
 {
+       CWindowMaskGUI *mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->fade_slider->update(v);
+       return BC_TumbleTextBox::update(v);
 }
 
-int CWindowMaskValue::handle_event()
+int CWindowMaskFade::update_value(float v)
 {
        MaskAutos *autos;
        MaskAuto *keyframe;
@@ -1899,27 +1832,104 @@ int CWindowMaskValue::handle_event()
        int create_it = 1;
 #endif
 
-       mwindow->undo->update_undo_before(_("mask value"), this);
+       mwindow->undo->update_undo_before(_("mask fade"), this);
+
+// Get existing keyframe
        ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe,
-               mask, point, create_it);
+                       mask, point, create_it);
+       if( track ) {
+#ifdef USE_KEYFRAME_SPANNING
+// Create temp keyframe
+               MaskAuto temp_keyframe(mwindow->edl, autos);
+               temp_keyframe.copy_data(keyframe);
+// Update parameter
+               temp_keyframe.value = v;
+// Commit change to span of keyframes
+               autos->update_parameter(&temp_keyframe);
+#else
+               keyframe->value = v;
+#endif
 
-       if(track)
-       {
+               gui->update_preview();
+       }
+
+       mwindow->undo->update_undo_after(_("mask fade"), LOAD_AUTOMATION);
+       return 1;
+}
+
+int CWindowMaskFade::handle_event()
+{
+       float v = atof(get_text());
+       CWindowMaskGUI * mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->fade_slider->update(v);
+       return mask_gui->fade->update_value(v);
+}
+
+CWindowMaskFadeSlider::CWindowMaskFadeSlider(MWindow *mwindow, CWindowToolGUI *gui,
+               int x, int y, int w)
+ : BC_ISlider(x, y, 0, w, w, -200, 200, 0)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+}
+
+CWindowMaskFadeSlider::~CWindowMaskFadeSlider()
+{
+}
+
+int CWindowMaskFadeSlider::handle_event()
+{
+       float v = 100*get_value()/200;
+       CWindowMaskGUI *mask_gui = (CWindowMaskGUI*)gui;
+       mask_gui->fade->BC_TumbleTextBox::update(v);
+       return mask_gui->fade->update_value(v);
+}
+
+int CWindowMaskFadeSlider::update(int64_t v)
+{
+       return BC_ISlider::update(200*v/100);
+}
+
+CWindowMaskMode::CWindowMaskMode(MWindow *mwindow,
+       CWindowToolGUI *gui, int x, int y)
+ : BC_Toggle(x, y, mwindow->theme->mask_mode_toggle, 0)
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Mode"));
+}
+
+CWindowMaskMode::~CWindowMaskMode()
+{
+}
+
+int CWindowMaskMode::handle_event()
+{
+       MaskAutos *autos;
+       MaskAuto *keyframe;
+       Track *track;
+       MaskPoint *point;
+       SubMask *mask;
+// Get existing keyframe
+       ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
+       if( track ) {
+               mwindow->undo->update_undo_before(_("mask mode"), 0);
 #ifdef USE_KEYFRAME_SPANNING
 // Create temp keyframe
                MaskAuto temp_keyframe(mwindow->edl, autos);
                temp_keyframe.copy_data(keyframe);
 // Update parameter
-               temp_keyframe.value = get_value();
+               temp_keyframe.mode = get_value();
 // Commit change to span of keyframes
                autos->update_parameter(&temp_keyframe);
 #else
-               keyframe->value = get_value();
+               ((MaskAuto*)autos->default_auto)->mode = get_value();
 #endif
+               mwindow->undo->update_undo_after(_("mask mode"), LOAD_AUTOMATION);
        }
 
+//printf("CWindowMaskMode::handle_event 1\n");
        gui->update_preview();
-       mwindow->undo->update_undo_after(_("mask value"), LOAD_AUTOMATION);
        return 1;
 }
 
@@ -1973,28 +1983,120 @@ int CWindowDisableOpenGLMasking::handle_event()
 }
 
 
+CWindowMaskClrMask::CWindowMaskClrMask(MWindow *mwindow,
+               CWindowMaskGUI *gui, int x, int y)
+ : BC_Button(x, y, mwindow->theme->get_image_set("reset_button"))
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Delete all masks"));
+}
+
+CWindowMaskClrMask::~CWindowMaskClrMask()
+{
+}
+
+int CWindowMaskClrMask::calculate_w(MWindow *mwindow)
+{
+       VFrame *vfrm = *mwindow->theme->get_image_set("reset_button");
+       return vfrm->get_w();
+}
+
+int CWindowMaskClrMask::handle_event()
+{
+       MaskAutos *autos;
+       MaskAuto *keyframe;
+       Track *track;
+       MaskPoint *point;
+       SubMask *mask;
 
+// Get existing keyframe
+       ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
 
+       if( track ) {
+               mwindow->undo->update_undo_before(_("del masks"), 0);
+               ((MaskAutos*)track->automation->autos[AUTOMATION_MASK])->clear_all();
+               gui->update();
+               gui->update_preview();
+               mwindow->undo->update_undo_after(_("del masks"), LOAD_AUTOMATION);
+       }
 
+       return 1;
+}
 
+CWindowMaskClrPoint::CWindowMaskClrPoint(MWindow *mwindow,
+               CWindowMaskGUI *gui, int x, int y)
+ : BC_Button(x, y, mwindow->theme->get_image_set("reset_button"))
+{
+       this->mwindow = mwindow;
+       this->gui = gui;
+       set_tooltip(_("Delete all points"));
+}
 
+CWindowMaskClrPoint::~CWindowMaskClrPoint()
+{
+}
+
+int CWindowMaskClrPoint::handle_event()
+{
+       MaskAutos *autos;
+       MaskAuto *keyframe;
+       Track *track;
+       MaskPoint *point;
+       SubMask *mask;
+       int total_points;
+
+// Get existing keyframe
+       ((CWindowMaskGUI*)gui)->get_keyframe(track, autos, keyframe, mask, point, 0);
+       if( track ) {
+               mwindow->undo->update_undo_before(_("clr points"), 0);
+#ifdef USE_KEYFRAME_SPANNING
+// Create temp keyframe
+               MaskAuto temp_keyframe(mwindow->edl, autos);
+               temp_keyframe.copy_data(keyframe);
+               SubMask *submask = temp_keyframe.get_submask(mwindow->edl->session->cwindow_mask);
+               submask->points.remove_all_objects();
+               total_points = 0;
+// Commit change to span of keyframes
+               ((MaskAutos*)track->automation->autos[AUTOMATION_MASK])->update_parameter(&temp_keyframe);
+#else
+               MaskAuto *current = (MaskAuto*)autos->default_auto;
+               while( current ) {
+                       SubMask *submask = current->get_submask(mwindow->edl->session->cwindow_mask);
+                       submask->points.clear();
+                       current = current == (MaskAuto*)autos->default_auto ?
+                               (MaskAuto*)autos->first : (MaskAuto*)NEXT;
+               }
+               total_points = 0;
+#endif
+               if( mwindow->cwindow->gui->affected_point >= total_points )
+                       mwindow->cwindow->gui->affected_point =
+                               total_points > 0 ? total_points-1 : 0;
+
+               gui->update();
+               gui->update_preview();
+               mwindow->undo->update_undo_after(_("clr points"), LOAD_AUTOMATION);
+       }
+
+       return 1;
+}
 
 
 CWindowMaskGUI::CWindowMaskGUI(MWindow *mwindow, CWindowTool *thread)
  : CWindowToolGUI(mwindow, thread,
-       _(PROGRAM_NAME ": Mask"), 330, 320)
+       _(PROGRAM_NAME ": Mask"), 340, 350)
 {
        this->mwindow = mwindow;
        this->thread = thread;
-       number = 0;
        active_point = 0;
+       fade = 0;
        feather = 0;
 }
 CWindowMaskGUI::~CWindowMaskGUI()
 {
        lock_window("CWindowMaskGUI::~CWindowMaskGUI");
-       delete number;
        delete active_point;
+       delete fade;
        delete feather;
        unlock_window();
 }
@@ -2002,6 +2104,8 @@ CWindowMaskGUI::~CWindowMaskGUI()
 void CWindowMaskGUI::create_objects()
 {
        int x = 10, y = 10, margin = mwindow->theme->widget_border;
+       int clr_x = get_w()-x - CWindowMaskClrMask::calculate_w(mwindow);
+       int del_x = clr_x-margin - CWindowMaskDelMask::calculate_w(this,_("Delete"));
        //MaskAuto *keyframe = 0;
        //Track *track = mwindow->cwindow->calculate_affected_track();
        //if(track)
@@ -2009,56 +2113,63 @@ void CWindowMaskGUI::create_objects()
 
        lock_window("CWindowMaskGUI::create_objects");
        BC_Title *title;
-       add_subwindow(title = new BC_Title(x, y, _("Mode:")));
-       add_subwindow(mode = new CWindowMaskMode(mwindow,
-               this, x + title->get_w() + margin, y, ""));
-       mode->create_objects();
-       y += mode->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Value:")));
-       add_subwindow(value = new CWindowMaskValue(mwindow, this, x + title->get_w() + margin, y));
-       y += value->get_h() + margin;
-       add_subwindow(delete_point = new CWindowMaskDelete(mwindow, this, x, y));
-       int x1 = x + delete_point->get_w() + 2*margin;
-       add_subwindow(title = new BC_Title(x1, y, _("Point:")));
-       x1 += title->get_w() + margin;
+       add_subwindow(title = new BC_Title(x, y, _("Mask:")));
+       int x1 = x + title->get_w() + margin;
+       name = new CWindowMaskName(mwindow, this, x + title->get_w() + margin, y, "");
+       name->create_objects();
+       x1 = x + name->get_w() + 2*margin;
+       add_subwindow(clr_mask = new CWindowMaskClrMask(mwindow, this, clr_x, y));
+       add_subwindow(del_mask = new CWindowMaskDelMask(mwindow, this, del_x, y));
+       y += name->get_h() + margin;
+       add_subwindow(title = new BC_Title(x, y, _("Fade:")));
+       x1 = x + title->get_w() + margin;
+       fade = new CWindowMaskFade(mwindow, this, x1, y);
+       fade->create_objects();
+       x1 += fade->get_w() + 2*margin;
+       int w1 = clr_x-2*margin - x1;
+       add_subwindow(fade_slider = new CWindowMaskFadeSlider(mwindow, this, x1, y, w1));
+       x1 += fade_slider->get_w() + 2*margin;
+       add_subwindow(mode = new CWindowMaskMode(mwindow, this, clr_x, y));
+       y += fade->get_h() + 3*margin;
+       add_subwindow(title = new BC_Title(x, y, _("Point:")));
+       x1 = x + title->get_w() + margin;
        active_point = new CWindowMaskAffectedPoint(mwindow, this, x1, y);
        active_point->create_objects();
-       y += delete_point->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Mask number:")));
-       number = new CWindowMaskNumber(mwindow,
-               this, x + title->get_w() + margin, y);
-       number->create_objects();
-       y += number->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Feather:")));
-       feather = new CWindowMaskFeather(mwindow,
-               this, x + title->get_w() + margin, y);
-       feather->create_objects();
-       y += feather->get_h() + margin;
+       x1 += active_point->get_w() + margin;
+       add_subwindow(clr_point = new CWindowMaskClrPoint(mwindow, this, clr_x, y));
+       add_subwindow(del_point = new CWindowMaskDelPoint(mwindow, this, del_x, y));
+       y += active_point->get_h() + margin;
        add_subwindow(title = new BC_Title(x, y, "X:"));
-       x += title->get_w() + margin;
-       this->x = new CWindowCoord(this, x, y, (float)0.0);
+       x1 = x + title->get_w() + margin;
+       this->x = new CWindowCoord(this, x1, y, (float)0.0);
        this->x->create_objects();
-       x += this->x->get_w() + margin;
-       add_subwindow(title = new BC_Title(x, y, "Y:"));
-       x += title->get_w() + margin;
-       this->y = new CWindowCoord(this, x, y, (float)0.0);
+       x1 += this->x->get_w() + 3*margin;
+       add_subwindow(title = new BC_Title(x1, y, "Y:"));
+       x1 += title->get_w() + margin;
+       this->y = new CWindowCoord(this, x1, y, (float)0.0);
        this->y->create_objects();
-
-       x = 10;
-       y += this->y->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Press Shift to move an end point")));
-       y += title->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Press Ctrl to move a control point")));
-       y += title->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Shift+click Delete to delete the mask")));
-       y += title->get_h() + margin;
-       add_subwindow(title = new BC_Title(x, y, _("Press Alt to translate the mask")));
-       y += 30;
-
+       y += this->x->get_h() + 3*margin;
+       add_subwindow(title = new BC_Title(x, y, _("Feather:")));
+       x1 = x + title->get_w() + margin;
+       feather = new CWindowMaskFeather(mwindow, this, x1, y);
+       feather->create_objects();
+       x1 += feather->get_w() + margin;
+       feather_slider = new CWindowMaskFeatherSlider(mwindow, this, x1, y, 140, 0);
+       add_subwindow(feather_slider);
+       y += feather->get_h() + margin;
        add_subwindow(this->apply_before_plugins = new CWindowMaskBeforePlugins(this, 10, y));
        y += this->apply_before_plugins->get_h() + margin;
        add_subwindow(this->disable_opengl_masking = new CWindowDisableOpenGLMasking(this, 10, y));
-
+       y += this->disable_opengl_masking->get_h() + 3*margin;
+       add_subwindow(new BC_Bar(x, y, get_w()-2*x));
+       y += 2*margin;
+       add_subwindow(title = new BC_Title(x, y, _(
+               "Shift+LMB: move an end point\n"
+               "Ctrl+LMB: move a control point\n"
+               "Wheel Up/Dn: rotate around pointer\n"
+               "Shift+Wheel Up/Dn: scale around pointer\n"
+               "Alt+LMB: to drag translate the mask\n"
+               "Shift+Key Delete to delete the mask")));
        update();
        unlock_window();
 }
@@ -2122,26 +2233,27 @@ void CWindowMaskGUI::update()
 
                if(mask)
                {
-                       feather->update((int64_t)autos->get_feather(position_i, PLAY_FORWARD));
-                       value->update((int64_t)autos->get_value(position_i, PLAY_FORWARD));
-                       apply_before_plugins->update((int64_t)keyframe->apply_before_plugins);
-                       disable_opengl_masking->update((int64_t)keyframe->disable_opengl_masking);
+                       feather->update(autos->get_feather(position_i, PLAY_FORWARD));
+                       fade->update(autos->get_value(position_i, PLAY_FORWARD));
+                       apply_before_plugins->update(keyframe->apply_before_plugins);
+                       disable_opengl_masking->update(keyframe->disable_opengl_masking);
                }
        }
 
 //printf("CWindowMaskGUI::update 1\n");
        active_point->update((int64_t)mwindow->cwindow->gui->affected_point);
-       number->update((int64_t)mwindow->edl->session->cwindow_mask);
+       name->update_items(keyframe);
+       int k = mwindow->edl->session->cwindow_mask;
+       const char *text = k >= 0 && k < keyframe->masks.size() ?
+               keyframe->masks[k]->name : "";
+       name->update(text);
 
 //printf("CWindowMaskGUI::update 1\n");
-       if(track)
-       {
+       if( track ) {
 #ifdef USE_KEYFRAME_SPANNING
-               mode->set_text(
-                       CWindowMaskMode::mode_to_text(keyframe->mode));
+               mode->update(keyframe->mode);
 #else
-               mode->set_text(
-                       CWindowMaskMode::mode_to_text(((MaskAuto*)autos->default_auto)->mode));
+               mode->set_text(((MaskAuto*)autos->default_auto)->mode);
 #endif
        }
 //printf("CWindowMaskGUI::update 2\n");
index 92fa72b9e6251fe01c899148a184624e2d9b7906..1eb5002ebb1b39aa22b1b30d304a56fd537ca81f 100644 (file)
 
 #include "condition.inc"
 #include "cwindowgui.inc"
+#include "cwindowtool.inc"
 #include "guicast.h"
+#include "keyframe.inc"
 #include "maskauto.inc"
 #include "maskautos.inc"
 #include "mwindow.inc"
 
 
-class CWindowToolGUI;
-class CWindowCoord;
-class CWindowCurveToggle;
-
-
 // This common thread supports all the tool GUI's.
 class CWindowTool : public Thread
 {
@@ -128,57 +125,70 @@ public:
        CWindowCoord *x1, *y1, *width, *height;
 };
 
-class CWindowMaskMode : public BC_PopupMenu
+class CWindowMaskItems : public ArrayList<BC_ListBoxItem*>
 {
 public:
-       CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y, const char *text);
-       void create_objects();
-       int handle_event();
-       static char* mode_to_text(int mode);
-       int text_to_mode(char *text);
+       CWindowMaskItems() {}
+       ~CWindowMaskItems() { remove_all_objects(); }
+};
+
+class CWindowMaskName : public BC_PopupTextBox
+{
+public:
+       CWindowMaskName(MWindow *mwindow, CWindowToolGUI *gui, int x, int y, const char *text);
+       ~CWindowMaskName();
        MWindow *mwindow;
        CWindowToolGUI *gui;
+       CWindowMaskItems mask_items;
+
+       int handle_event();
+       void update_items(MaskAuto *keyframe);
 };
 
-class CWindowMaskDelete : public BC_GenericButton
+class CWindowMaskFade : public BC_TumbleTextBox
 {
 public:
-       CWindowMaskDelete(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       CWindowMaskFade(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskFade();
+       int update(float v);
+       int update_value(float v);
        int handle_event();
-       int keypress_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskCycleNext : public BC_GenericButton
+class CWindowMaskFadeSlider : public BC_ISlider
 {
 public:
-       CWindowMaskCycleNext(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       CWindowMaskFadeSlider(MWindow *mwindow, CWindowToolGUI *gui,
+               int x, int y, int w);
+       ~CWindowMaskFadeSlider();
        int handle_event();
+       int update(int64_t v);
+       char *get_caption() { return 0; }
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskCyclePrev : public BC_GenericButton
+class CWindowMaskMode : public BC_Toggle
 {
 public:
-       CWindowMaskCyclePrev(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       CWindowMaskMode(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       ~CWindowMaskMode();
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskNumber : public BC_TumbleTextBox
+class CWindowMaskDelMask : public BC_GenericButton
 {
 public:
-       CWindowMaskNumber(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
-       ~CWindowMaskNumber();
+       CWindowMaskDelMask(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-
 class CWindowMaskAffectedPoint : public BC_TumbleTextBox
 {
 public:
@@ -189,27 +199,63 @@ public:
        CWindowToolGUI *gui;
 };
 
+class CWindowMaskDelPoint : public BC_GenericButton
+{
+public:
+       CWindowMaskDelPoint(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
+       int handle_event();
+       int keypress_event();
+       MWindow *mwindow;
+       CWindowToolGUI *gui;
+};
 
 class CWindowMaskFeather : public BC_TumbleTextBox
 {
 public:
        CWindowMaskFeather(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
        ~CWindowMaskFeather();
+       int update(float v);
+       int update_value(float v);
        int handle_event();
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
-class CWindowMaskValue : public BC_ISlider
+class CWindowMaskFeatherSlider : public BC_FSlider
 {
 public:
-       CWindowMaskValue(MWindow *mwindow, CWindowToolGUI *gui, int x, int y);
-       ~CWindowMaskValue();
+       CWindowMaskFeatherSlider(MWindow *mwindow, CWindowToolGUI *gui,
+               int x, int y, int w, float v);
+       ~CWindowMaskFeatherSlider();
        int handle_event();
+       int update(float v);
+       char *get_caption() { return 0; }
        MWindow *mwindow;
        CWindowToolGUI *gui;
 };
 
+class CWindowMaskClrMask : public BC_Button
+{
+public:
+       CWindowMaskClrMask(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y);
+       ~CWindowMaskClrMask();
+       static int calculate_w(MWindow *mwindow);
+       int handle_event();
+       MWindow *mwindow;
+       CWindowMaskGUI *gui;
+};
+
+class CWindowMaskClrPoint : public BC_Button
+{
+public:
+       CWindowMaskClrPoint(MWindow *mwindow, CWindowMaskGUI *gui, int x, int y);
+       ~CWindowMaskClrPoint();
+
+       int handle_event();
+       MWindow *mwindow;
+       CWindowMaskGUI *gui;
+};
+
 class CWindowMaskBeforePlugins : public BC_CheckBox
 {
 public:
@@ -238,22 +284,23 @@ public:
                SubMask* &mask, MaskPoint* &point, int create_it);
        void update_preview();
 
-       CWindowCoord *x, *y;
+       CWindowMaskName *name;
+       CWindowMaskClrMask *clr_mask;
+       CWindowMaskDelMask *del_mask;
+       CWindowMaskFade *fade;
+       CWindowMaskFadeSlider *fade_slider;
        CWindowMaskMode *mode;
-       CWindowMaskFeather *feather;
-       CWindowMaskDelete *delete_point;
        CWindowMaskAffectedPoint *active_point;
-// Not necessary if all keyframes have same points
-//     CWindowMaskCycleNext *next_point;
-//     CWindowMaskCyclePrev *prev_point;
-       CWindowMaskNumber *number;
-       CWindowMaskValue *value;
+       CWindowMaskClrPoint *clr_point;
+       CWindowMaskDelPoint *del_point;
+       CWindowCoord *x, *y;
+       CWindowMaskFeather *feather;
+       CWindowMaskFeatherSlider *feather_slider;
        CWindowMaskBeforePlugins *apply_before_plugins;
        CWindowDisableOpenGLMasking *disable_opengl_masking;
 };
 
 
-class CWindowEyedropCheckBox;
 class CWindowEyedropGUI : public CWindowToolGUI
 {
 public:
index 60e241536379f6a7ee89db70bd08a1018be66a9e..0d284c05794ce4b71265222c084bb43cdc2600c4 100644 (file)
 
 
 class CWindowTool;
+class CWindowToolGUI;
+class CWindowCoord;
+class CWindowCurveToggle;
+class CWindowCropOK;
+class CWindowCropGUI;
+class CWindowMaskList;
+class CWindowMaskName;
+class CWindowMaskFade;
+class CWindowMaskMode;
+class CWindowMaskDelMask;
+class CWindowMaskAffectedPoint;
+class CWindowMaskDelPoint;
+class CWindowMaskFeather;
+class CWindowMaskFeatherSlider;
+class CWindowMaskBeforePlugins;
+class CWindowDisableOpenGLMasking;
+class CWindowMaskGUI;
+class CWindowEyedropGUI;
+class CWindowEyedropCheckBox;
+class CWindowCameraGUI;
+class CWindowCameraLeft;
+class CWindowCameraCenter;
+class CWindowCameraRight;
+class CWindowCameraTop;
+class CWindowCameraMiddle;
+class CWindowCameraBottom;
+class CWindowProjectorGUI;
+class CWindowProjectorLeft;
+class CWindowProjectorCenter;
+class CWindowProjectorRight;
+class CWindowProjectorTop;
+class CWindowProjectorMiddle;
+class CWindowProjectorBottom;
+class CWindowRulerGUI;
 
 #endif
index 29c5ec3e175ea1bb21ad4fcfe54d5662ee563b96..c798319f3ff587279dfc20af89876d4168051e37 100644 (file)
@@ -151,6 +151,8 @@ class EDL;
 #define CWINDOW_MASK_CONTROL_IN 0x15
 #define CWINDOW_MASK_CONTROL_OUT 0x16
 #define CWINDOW_MASK_TRANSLATE 0x17
+#define CWINDOW_MASK_ROTATE 0x18
+#define CWINDOW_MASK_SCALE 0x19
 
 // Inclusive limits for zoom panel
 #define MIN_ZOOM_TIME 1
index 1b1f9600e665033da139e1c90be7b9bf44363ee9..74eec3a857bbf549f8d51bef2db2c48d80165de2 100644 (file)
@@ -64,9 +64,11 @@ int MaskPoint::operator==(MaskPoint& ptr)
                EQUIV(control_y2, ptr.control_y2);
 }
 
-SubMask::SubMask(MaskAuto *keyframe)
+SubMask::SubMask(MaskAuto *keyframe, int no)
 {
        this->keyframe = keyframe;
+       memset(name, 0, sizeof(name));
+       sprintf(name, "%d", no);
 }
 
 SubMask::~SubMask()
@@ -95,6 +97,8 @@ int SubMask::operator==(SubMask& ptr)
 
 void SubMask::copy_from(SubMask& ptr)
 {
+       memset(name, 0, sizeof(name));
+       strncpy(name, ptr.name, sizeof(name-1));
        points.remove_all_objects();
 //printf("SubMask::copy_from 1 %p %d\n", this, ptr.points.total);
        for(int i = 0; i < ptr.points.total; i++)
@@ -171,6 +175,7 @@ void SubMask::copy(FileXML *file)
        {
                file->tag.set_title("MASK");
                file->tag.set_property("NUMBER", keyframe->masks.number_of(this));
+               file->tag.set_property("NAME", name);
                file->append_tag();
                file->append_newline();
 
@@ -230,7 +235,7 @@ MaskAuto::MaskAuto(EDL *edl, MaskAutos *autos)
 // submask matches.
 
        for(int i = 0; i < SUBMASKS; i++)
-               masks.append(new SubMask(this));
+               masks.append(new SubMask(this, i));
 }
 
 MaskAuto::~MaskAuto()
@@ -312,7 +317,7 @@ void MaskAuto::copy_data(MaskAuto *src)
        masks.remove_all_objects();
        for(int i = 0; i < src->masks.size(); i++)
        {
-               masks.append(new SubMask(this));
+               masks.append(new SubMask(this, i));
                masks.values[i]->copy_from(*src->masks.values[i]);
        }
 }
@@ -340,7 +345,7 @@ int MaskAuto::interpolate_from(Auto *a1, Auto *a2, int64_t position, Auto *templ
                i < mask_auto1->masks.total;
                i++)
        {
-               SubMask *new_submask = new SubMask(this);
+               SubMask *new_submask = new SubMask(this, i);
                masks.append(new_submask);
                SubMask *mask1 = mask_auto1->masks.values[i];
                SubMask *mask2 = mask_auto2->masks.values[i];
@@ -408,24 +413,21 @@ void MaskAuto::load(FileXML *file)
        for(int i = 0; i < masks.size(); i++)
        {
                delete masks.values[i];
-               masks.values[i] = new SubMask(this);
+               masks.values[i] = new SubMask(this, i);
        }
 
        int result = 0;
-       while(!result)
-       {
-               result = file->read_tag();
-
-               if(!result)
-               {
-                       if(file->tag.title_is("/AUTO"))
-                               result = 1;
-                       else
-                       if(file->tag.title_is("MASK"))
-                       {
-                               SubMask *mask = masks.values[file->tag.get_property("NUMBER", 0)];
-                               mask->load(file);
-                       }
+       while( !(result = file->read_tag()) ) {
+               if( file->tag.title_is("/AUTO") ) break;
+               if( file->tag.title_is("MASK") ) {
+                       int no = file->tag.get_property("NUMBER", 0);
+                       char name[BCTEXTLEN];  name[0] = 0;
+                       file->tag.get_property("NAME", name);
+                       if( !name[0] ) sprintf(name, "%d", no);
+                       SubMask *mask = masks.values[no];
+                       memset(mask->name, 0, sizeof(mask->name));
+                       strncpy(mask->name, name, sizeof(mask->name));
+                       mask->load(file);
                }
        }
 //     dump();
@@ -454,7 +456,6 @@ void MaskAuto::copy(int64_t start, int64_t end, FileXML *file, int default_auto)
 //printf("MaskAuto::copy 10\n");
        }
 
-       file->append_newline();
        file->tag.set_title("/AUTO");
        file->append_tag();
        file->append_newline();
index 5162d8e97d6fef901b478daeabc96c5bffad65fa..1bae9ab8a7a375e3d28887b9fc1becc13d3f3c14 100644 (file)
@@ -47,7 +47,7 @@ public:
 class SubMask
 {
 public:
-       SubMask(MaskAuto *keyframe);
+       SubMask(MaskAuto *keyframe, int no);
        ~SubMask();
 
 // Don't use ==
@@ -58,6 +58,7 @@ public:
        void copy(FileXML *file);
        void dump();
 
+       char name[BCSTRLEN];
        ArrayList<MaskPoint*> points;
        MaskAuto *keyframe;
 };
index 21a067b6cdde1759cf03c054b79e8655dd20e518..5d144612bad7f41e2a2217e88401098a5343bf42 100644 (file)
@@ -28,10 +28,9 @@ class MaskAuto;
 class MaskPoint;
 class SubMask;
 
-enum
-{
+enum {
        MASK_MULTIPLY_ALPHA,
-       MASK_SUBTRACT_ALPHA
+       MASK_SUBTRACT_ALPHA,
 };
 
 #define SUBMASKS 8
index 843d76ee3cd75da64e75a38c2adc67287b3acb1f..62b6ad74ea9d8d7d8253502abbcf89969104b3f3 100644 (file)
@@ -190,30 +190,19 @@ int MaskAutos::get_value(int64_t position, int direction)
 
        int result = (int)((double)((MaskAuto*)begin)->value * (1.0 - weight) +
                (double)((MaskAuto*)end)->value * weight + 0.5);
-// printf("MaskAutos::get_value %d %d %f %d %f %d\n",
-// __LINE__,
-// ((MaskAuto*)begin)->value,
-// 1.0 - weight,
-// ((MaskAuto*)end)->value,
-// weight,
-// result);
+// printf("MaskAutos::get_value %d %d %f %d %f %d\n", __LINE__,
+// ((MaskAuto*)begin)->value, 1.0 - weight, ((MaskAuto*)end)->value, weight, result);
        return result;
 }
 
 
-void MaskAutos::avg_points(MaskPoint *output,
-               MaskPoint *input1,
-               MaskPoint *input2,
-               int64_t output_position,
-               int64_t position1,
-               int64_t position2)
+void MaskAutos::avg_points(MaskPoint *output, MaskPoint *input1, MaskPoint *input2,
+               int64_t output_position, int64_t position1, int64_t position2)
 {
-       if(position2 == position1)
-       {
+       if(position2 == position1) {
                *output = *input1;
        }
-       else
-       {
+       else {
                float fraction2 = (float)(output_position - position1) / (position2 - position1);
                float fraction1 = 1 - fraction2;
                output->x = input1->x * fraction1 + input2->x * fraction2;
index ed7cbaaebdbddfafcf72709f205eb891f5542e42..fd7458e1bb54d9eb9bcbb44b8e5a00bc926f5350 100644 (file)
@@ -41,12 +41,6 @@ MaskPackage::~MaskPackage()
 {
 }
 
-
-
-
-
-
-
 MaskUnit::MaskUnit(MaskEngine *engine)
  : LoadClient(engine)
 {
@@ -54,10 +48,9 @@ MaskUnit::MaskUnit(MaskEngine *engine)
        this->temp = 0;
 }
 
-
 MaskUnit::~MaskUnit()
 {
-       if(temp) delete temp;
+       if( temp ) delete temp;
 }
 
 
@@ -69,7 +62,7 @@ void MaskUnit::draw_line_clamped(VFrame *frame,
        int draw_x1, draw_y1;
        int draw_x2, draw_y2;
 
-       if(y2 < y1) {
+       if( y2 < y1 ) {
                draw_x1 = x2;  draw_y1 = y2;
                draw_x2 = x1;  draw_y2 = y1;
        }
@@ -80,18 +73,18 @@ void MaskUnit::draw_line_clamped(VFrame *frame,
 
        unsigned char **rows = (unsigned char**)frame->get_rows();
 
-       if(draw_y2 != draw_y1) {
+       if( draw_y2 != draw_y1 ) {
                float slope = ((float)draw_x2 - draw_x1) / ((float)draw_y2 - draw_y1);
                int w = frame->get_w() - 1;
                int h = frame->get_h();
 
-               for(float y = draw_y1; y < draw_y2; y++) {
-                       if(y >= 0 && y < h) {
+               for( float y = draw_y1; y < draw_y2; y++ ) {
+                       if( y >= 0 && y < h ) {
                                int x = (int)((y - draw_y1) * slope + draw_x1);
                                int y_i = (int)y;
                                int x_i = CLIP(x, 0, w);
 
-                               if(rows[y_i][x_i] == k)
+                               if( rows[y_i][x_i] == k )
                                        rows[y_i][x_i] = 0;
                                else
                                        rows[y_i][x_i] = k;
@@ -100,12 +93,8 @@ void MaskUnit::draw_line_clamped(VFrame *frame,
        }
 }
 
-void MaskUnit::blur_strip(double *val_p,
-       double *val_m,
-       double *dst,
-       double *src,
-       int size,
-       int max)
+void MaskUnit::blur_strip(double *val_p, double *val_m,
+       double *dst, double *src, int size, int max)
 {
        double *sp_p = src;
        double *sp_m = src + size - 1;
@@ -115,42 +104,31 @@ void MaskUnit::blur_strip(double *val_p,
        double initial_m = sp_m[0];
 
 //printf("MaskUnit::blur_strip %d\n", size);
-       for(int k = 0; k < size; k++)
-       {
+       for( int k = 0; k < size; k++ ) {
                int terms = (k < 4) ? k : 4;
                int l;
-               for(l = 0; l <= terms; l++)
-               {
+               for( l = 0; l <= terms; l++ ) {
                        *vp += n_p[l] * sp_p[-l] - d_p[l] * vp[-l];
                        *vm += n_m[l] * sp_m[l] - d_m[l] * vm[l];
                }
 
-               for( ; l <= 4; l++)
-               {
+               for( ; l <= 4; l++) {
                        *vp += (n_p[l] - bd_p[l]) * initial_p;
                        *vm += (n_m[l] - bd_m[l]) * initial_m;
                }
-               sp_p++;
-               sp_m--;
-               vp++;
-               vm--;
+               sp_p++;  sp_m--;
+               vp++;    vm--;
        }
 
-       for(int i = 0; i < size; i++)
-       {
+       for( int i = 0; i < size; i++ ) {
                double sum = val_p[i] + val_m[i];
                CLAMP(sum, 0, max);
                dst[i] = sum;
        }
 }
 
-void MaskUnit::do_feather(VFrame *output,
-       VFrame *input,
-       double feather,
-       int start_y,
-       int end_y,
-       int start_x,
-       int end_x)
+void MaskUnit::do_feather(VFrame *output, VFrame *input, double feather,
+               int start_y, int end_y, int start_x, int end_x)
 {
 //printf("MaskUnit::do_feather %f\n", feather);
 // Get constants
@@ -204,10 +182,10 @@ void MaskUnit::do_feather(VFrame *output,
 
        d_p[4] = exp(2 * constants[0] + 2 * constants[1]);
 
-       for(int i = 0; i < 5; i++) d_m[i] = d_p[i];
+       for( int i = 0; i < 5; i++ ) d_m[i] = d_p[i];
 
        n_m[0] = 0.0;
-       for(int i = 1; i <= 4; i++)
+       for( int i = 1; i <= 4; i++ )
                n_m[i] = n_p[i] - d_p[i] * n_p[0];
 
        double sum_n_p, sum_n_m, sum_d;
@@ -216,8 +194,7 @@ void MaskUnit::do_feather(VFrame *output,
        sum_n_p = 0.0;
        sum_n_m = 0.0;
        sum_d = 0.0;
-       for(int i = 0; i < 5; i++)
-       {
+       for( int i = 0; i < 5; i++ ) {
                sum_n_p += n_p[i];
                sum_n_m += n_m[i];
                sum_d += d_p[i];
@@ -226,35 +203,11 @@ void MaskUnit::do_feather(VFrame *output,
        a = sum_n_p / (1 + sum_d);
        b = sum_n_m / (1 + sum_d);
 
-       for(int i = 0; i < 5; i++)
-       {
+       for( int i = 0; i < 5; i++ ) {
                bd_p[i] = d_p[i] * a;
                bd_m[i] = d_m[i] * b;
        }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#define DO_FEATHER(type, max) \
-{ \
+#define DO_FEATHER(type, max) { \
        int frame_w = input->get_w(); \
        int frame_h = input->get_h(); \
        int size = MAX(frame_w, frame_h); \
@@ -267,50 +220,35 @@ void MaskUnit::do_feather(VFrame *output,
        int j; \
  \
 /* printf("DO_FEATHER 1\n"); */ \
-       if(end_x > start_x) \
-       { \
-               for(j = start_x; j < end_x; j++) \
-               { \
+       if( end_x > start_x ) { \
+               for( j = start_x; j < end_x; j++ ) { \
        /* printf("DO_FEATHER 1.1 %d\n", j); */ \
                        bzero(val_p, sizeof(double) * frame_h); \
                        bzero(val_m, sizeof(double) * frame_h); \
-                       for(int k = 0; k < frame_h; k++) \
-                       { \
+                       for( int k = 0; k < frame_h; k++ ) { \
                                src[k] = (double)in_rows[k][j]; \
                        } \
-        \
                        blur_strip(val_p, val_m, dst, src, frame_h, max); \
-        \
-                       for(int k = 0; k < frame_h; k++) \
-                       { \
+                       for( int k = 0; k < frame_h; k++ ) { \
                                out_rows[k][j] = (type)dst[k]; \
                        } \
                } \
        } \
- \
-       if(end_y > start_y) \
-       { \
-               for(j = start_y; j < end_y; j++) \
-               { \
+       if( end_y > start_y ) { \
+               for( j = start_y; j < end_y; j++ ) { \
        /* printf("DO_FEATHER 2 %d\n", j); */ \
                        bzero(val_p, sizeof(double) * frame_w); \
                        bzero(val_m, sizeof(double) * frame_w); \
-                       for(int k = 0; k < frame_w; k++) \
-                       { \
+                       for( int k = 0; k < frame_w; k++ ) { \
                                src[k] = (double)out_rows[j][k]; \
                        } \
-        \
                        blur_strip(val_p, val_m, dst, src, frame_w, max); \
-        \
-                       for(int k = 0; k < frame_w; k++) \
-                       { \
+                       for( int k = 0; k < frame_w; k++ ) { \
                                out_rows[j][k] = (type)dst[k]; \
                        } \
                } \
        } \
- \
 /* printf("DO_FEATHER 3\n"); */ \
- \
        delete [] src; \
        delete [] dst; \
        delete [] val_p; \
@@ -318,85 +256,51 @@ void MaskUnit::do_feather(VFrame *output,
 /* printf("DO_FEATHER 4\n"); */ \
 }
 
-
-
-
-
-
-
-
 //printf("do_feather %d\n", frame->get_color_model());
-       switch(input->get_color_model())
-       {
-               case BC_A8:
-                       DO_FEATHER(unsigned char, 0xff);
-                       break;
-
-               case BC_A16:
-                       DO_FEATHER(uint16_t, 0xffff);
-                       break;
-
-               case BC_A_FLOAT:
-                       DO_FEATHER(float, 1);
-                       break;
+       switch( input->get_color_model() ) {
+       case BC_A8:
+               DO_FEATHER(unsigned char, 0xff);
+               break;
+       case BC_A16:
+               DO_FEATHER(uint16_t, 0xffff);
+               break;
+       case BC_A_FLOAT:
+               DO_FEATHER(float, 1);
+               break;
        }
-
-
-
-
 }
 
 void MaskUnit::process_package(LoadPackage *package)
 {
        MaskPackage *ptr = (MaskPackage*)package;
+       float engine_value = engine->value;
+       int engine_mode = engine->mode;
 
-       if(engine->recalculate &&
-               engine->step == DO_MASK)
-       {
-               VFrame *mask;
-               if(engine->feather > 0)
-                       mask = engine->temp_mask;
-               else
-                       mask = engine->mask;
-
-SET_TRACE
+       if( engine->recalculate && engine->step == DO_MASK ) {
+               VFrame *mask = engine->feather > 0 ? engine->temp_mask : engine->mask;
 // Generated oversampling frame
                int mask_w = mask->get_w();
                //int mask_h = mask->get_h();
                int oversampled_package_w = mask_w * OVERSAMPLE;
                int oversampled_package_h = (ptr->end_y - ptr->start_y) * OVERSAMPLE;
-//printf("MaskUnit::process_package 1\n");
-
-SET_TRACE
-               if(temp &&
-                       (temp->get_w() != oversampled_package_w ||
-                       temp->get_h() != oversampled_package_h)) {
+               if( temp &&
+                   (temp->get_w() != oversampled_package_w ||
+                    temp->get_h() != oversampled_package_h) ) {
                        delete temp;  temp = 0;
                }
-//printf("MaskUnit::process_package 1\n");
-
-SET_TRACE
-               if(!temp) {
+               if( !temp ) {
                        temp = new VFrame(oversampled_package_w, oversampled_package_h, BC_A8, 0);
                }
-
-SET_TRACE
                temp->clear_frame();
-//printf("MaskUnit::process_package 1 %d\n", engine->point_sets.total);
-
-SET_TRACE
-
 // Draw oversampled region of polygons on temp
-               for(int k = 0; k < engine->point_sets.total; k++)
-               {
+               for( int k=0; k<engine->point_sets.total; ++k ) {
                        int old_x, old_y;
                        unsigned char max = k + 1;
                        ArrayList<MaskPoint*> *points = engine->point_sets.values[k];
 
-                       if(points->total < 3) continue;
+                       if( points->total < 3 ) continue;
 //printf("MaskUnit::process_package 2 %d %d\n", k, points->total);
-                       for(int i = 0; i < points->total; i++)
-                       {
+                       for( int i=0; i<points->total; ++i ) {
                                MaskPoint *point1 = points->values[i];
                                MaskPoint *point2 = (i >= points->total - 1) ?
                                        points->values[0] :
@@ -404,10 +308,10 @@ SET_TRACE
 
                                float x, y;
                                int segments = (int)(sqrt(SQR(point1->x - point2->x) + SQR(point1->y - point2->y)));
-                               if(point1->control_x2 == 0 &&
+                               if( point1->control_x2 == 0 &&
                                        point1->control_y2 == 0 &&
                                        point2->control_x1 == 0 &&
-                                       point2->control_y1 == 0)
+                                       point2->control_y1 == 0 )
                                        segments = 1;
                                float x0 = point1->x;
                                float y0 = point1->y;
@@ -418,8 +322,7 @@ SET_TRACE
                                float x3 = point2->x;
                                float y3 = point2->y;
 
-                               for(int j = 0; j <= segments; j++)
-                               {
+                               for( int j = 0; j <= segments; j++ ) {
                                        float t = (float)j / segments;
                                        float tpow2 = t * t;
                                        float tpow3 = t * t * t;
@@ -440,8 +343,7 @@ SET_TRACE
                                        x *= OVERSAMPLE;
                                        y *= OVERSAMPLE;
 
-                                       if(j > 0)
-                                       {
+                                       if( j > 0 ) {
                                                draw_line_clamped(temp, old_x, old_y, (int)x, (int)y, max);
                                        }
 
@@ -449,298 +351,145 @@ SET_TRACE
                                        old_y = (int)y;
                                }
                        }
-
-SET_TRACE
-//printf("MaskUnit::process_package 1\n");
-
-
-
-
-
 // Fill in the polygon in the horizontal direction
-                       for(int i = 0; i < oversampled_package_h; i++)
-                       {
+                       for( int i=0; i<oversampled_package_h; ++i ) {
                                unsigned char *row = (unsigned char*)temp->get_rows()[i];
-                               int value = 0x0;
-                               int total = 0;
-
-                               for(int j = 0; j < oversampled_package_w; j++)
-                                       if(row[j] == max) total++;
-
-                               if(total > 1)
-                               {
-                                       if(total & 0x1) total--;
-                                       for(int j = 0; j < oversampled_package_w; j++)
-                                       {
-                                               if(row[j] == max && total > 0)
-                                               {
-                                                       if(value)
-                                                               value = 0x0;
-                                                       else
-                                                               value = max;
-                                                       total--;
-                                               }
-                                               else
-                                               {
-                                                       if(value) row[j] = value;
+                               int value = 0, total = 0;
+
+                               for( int j=0; j<oversampled_package_w; ++j )
+                                       if( row[j] == max ) ++total;
+
+                               if( total > 1 ) {
+                                       if( total & 0x1 ) --total;
+                                       for( int j=0; j<oversampled_package_w; ++j ) {
+                                               if( row[j]==max && total>0 ) {
+                                                       --total;
+                                                       value = value ? 0 : max;
                                                }
+                                               else if( value )
+                                                       row[j] = value;
                                        }
                                }
                        }
                }
-
-
-SET_TRACE
-
-
-
-
-
-#define DOWNSAMPLE(type, temp_type, value) \
-for(int i = 0; i < ptr->end_y - ptr->start_y; i++) \
-{ \
-       type *output_row = (type*)mask->get_rows()[i + ptr->start_y]; \
-       unsigned char **input_rows = (unsigned char**)temp->get_rows() + i * OVERSAMPLE; \
- \
- \
-       for(int j = 0; j < mask_w; j++) \
-       { \
+#define DOWNSAMPLE(type, temp_type, value, v) do { \
+for( int y=0; y<ptr->end_y-ptr->start_y; ++y ) { \
+       type *output_row = (type*)mask->get_rows()[y + ptr->start_y]; \
+       unsigned char **input_rows = (unsigned char**)temp->get_rows() + y * OVERSAMPLE; \
+       for( int x=0; x<mask_w; ++x ) { \
                temp_type total = 0; \
- \
 /* Accumulate pixel */ \
-               for(int k = 0; k < OVERSAMPLE; k++) \
-               { \
-                       unsigned char *input_vector = input_rows[k] + j * OVERSAMPLE; \
-                       for(int l = 0; l < OVERSAMPLE; l++) \
-                       { \
+               for( int k=0; k<OVERSAMPLE; ++k ) { \
+                       unsigned char *input_vector = input_rows[k] + x * OVERSAMPLE; \
+                       for( int l=0; l<OVERSAMPLE; ++l ) { \
                                total += (input_vector[l] ? value : 0); \
                        } \
                } \
- \
 /* Divide pixel */ \
                total /= OVERSAMPLE * OVERSAMPLE; \
- \
-               output_row[j] = total; \
+               output_row[x] = v; \
        } \
-}
-
-SET_TRACE
+} } while(0)
 
+               if( engine_value < 0 ) {
+                       engine_value = -engine_value;
+                       engine_mode = 1-engine_mode;
+               }
 // Downsample polygon
-               switch(mask->get_color_model())
-               {
-                       case BC_A8:
-                       {
-                               unsigned char value;
-                               value = (int)((float)engine->value / 100 * 0xff);
-                               DOWNSAMPLE(unsigned char, int64_t, value);
-                               break;
-                       }
-
-                       case BC_A16:
-                       {
-                               uint16_t value;
-                               value = (int)((float)engine->value / 100 * 0xffff);
-                               DOWNSAMPLE(uint16_t, int64_t, value);
-                               break;
-                       }
-
-                       case BC_A_FLOAT:
-                       {
-                               float value;
-                               value = (float)engine->value / 100;
-                               DOWNSAMPLE(float, double, value);
-                               break;
-                       }
+               switch( mask->get_color_model() ) {
+               case BC_A8: {
+                       unsigned char value;
+                       value = (int)(engine_value / 100 * 0xff);
+                       if( engine->value >= 0 )
+                               DOWNSAMPLE(unsigned char, int64_t, value, total);
+                       else
+                               DOWNSAMPLE(unsigned char, int64_t, value, value-total);
+                       break; }
+
+               case BC_A16: {
+                       uint16_t value;
+                       value = (int)(engine_value / 100 * 0xffff);
+                       if( engine->value >= 0 )
+                               DOWNSAMPLE(uint16_t, int64_t, value, total);
+                       else
+                               DOWNSAMPLE(uint16_t, int64_t, value, value-total);
+                       break; }
+
+               case BC_A_FLOAT: {
+                       float value;
+                       value = engine_value / 100;
+                       if( engine->value >= 0 )
+                               DOWNSAMPLE(float, double, value, total);
+                       else
+                               DOWNSAMPLE(float, double, value, value-total);
+                       break; }
                }
        }
 
-SET_TRACE
-
-SET_TRACE
-
-       if(engine->step == DO_X_FEATHER)
-       {
-
-               if(engine->recalculate)
-               {
-// Feather polygon
-                       if(engine->feather > 0) do_feather(engine->mask,
-                               engine->temp_mask,
-                               engine->feather,
-                               ptr->start_y,
-                               ptr->end_y,
-                               0,
-                               0);
-               }
+       if( engine->step == DO_X_FEATHER && engine->recalculate && // Feather polygon
+           engine->feather > 0 ) {
+               do_feather(engine->mask,
+                       engine->temp_mask, engine->feather,
+                       ptr->start_y, ptr->end_y, 0, 0);
 //printf("MaskUnit::process_package 3 %f\n", engine->feather);
        }
 
-       if(engine->step == DO_Y_FEATHER)
-       {
-               if(engine->recalculate)
-               {
-// Feather polygon
-                       if(engine->feather > 0) do_feather(engine->mask,
-                               engine->temp_mask,
-                               engine->feather,
-                               0,
-                               0,
-                               ptr->start_x,
-                               ptr->end_x);
-               }
+       if( engine->step == DO_Y_FEATHER && engine->recalculate && // Feather polygon
+           engine->feather > 0 ) {
+               do_feather(engine->mask,
+                       engine->temp_mask, engine->feather,
+                       0, 0, ptr->start_x, ptr->end_x);
        }
 
-       if(engine->step == DO_APPLY)
-       {
-// Apply mask
-               int mask_w = engine->mask->get_w();
-
-
-#define APPLY_MASK_SUBTRACT_ALPHA(type, max, components, do_yuv) \
-{ \
-       type *output_row = (type*)engine->output->get_rows()[i]; \
-       type *mask_row = (type*)engine->mask->get_rows()[i]; \
-       int chroma_offset = (int)(max + 1) / 2; \
- \
-       for(int j  = 0; j < mask_w; j++) \
-       { \
-               if(components == 4) \
-               { \
-                       output_row[j * 4 + 3] = output_row[j * 4 + 3] * (max - mask_row[j]) / max; \
-               } \
-               else \
-               { \
-                       output_row[j * 3] = output_row[j * 3] * (max - mask_row[j]) / max; \
- \
-                       output_row[j * 3 + 1] = output_row[j * 3 + 1] * (max - mask_row[j]) / max; \
-                       output_row[j * 3 + 2] = output_row[j * 3 + 2] * (max - mask_row[j]) / max; \
- \
-                       if(do_yuv) \
-                       { \
-                               output_row[j * 3 + 1] += chroma_offset * mask_row[j] / max; \
-                               output_row[j * 3 + 2] += chroma_offset * mask_row[j] / max; \
-                       } \
-               } \
-       } \
-}
-
-#define APPLY_MASK_MULTIPLY_ALPHA(type, max, components, do_yuv) \
-{ \
-       type *output_row = (type*)engine->output->get_rows()[i]; \
-       type *mask_row = (type*)engine->mask->get_rows()[i]; \
+       if( engine->step == DO_APPLY ) { // Apply mask
+#define APPLY_MASK_ALPHA(cmodel, type, max, components, do_yuv, a, b) \
+case cmodel: \
+for( int y=ptr->start_y; y<ptr->end_y; ++y ) { \
+       type *output_row = (type*)engine->output->get_rows()[y]; \
+       type *mask_row = (type*)engine->mask->get_rows()[y]; \
        int chroma_offset = (int)(max + 1) / 2; \
- \
-       for(int j  = 0; j < mask_w; j++) \
-       { \
-               if(components == 4) \
-               { \
-                       output_row[j * 4 + 3] = output_row[j * 4 + 3] * mask_row[j] / max; \
+       for( int x=0; x<mask_w; ++x ) { \
+               int m = mask_row[x], n = max-m; \
+               if( components == 4 ) { \
+                       output_row[x*4 + 3] = output_row[x*4 + 3]*a / max; \
                } \
-               else \
-               { \
-                       output_row[j * 3] = output_row[j * 3] * mask_row[j] / max; \
- \
-                       output_row[j * 3 + 1] = output_row[j * 3 + 1] * mask_row[j] / max; \
-                       output_row[j * 3 + 2] = output_row[j * 3 + 2] * mask_row[j] / max; \
- \
-                       if(do_yuv) \
-                       { \
-                               output_row[j * 3 + 1] += chroma_offset * (max - mask_row[j]) / max; \
-                               output_row[j * 3 + 2] += chroma_offset * (max - mask_row[j]) / max; \
+               else { \
+                       output_row[x*3 + 0] = output_row[x*3 + 0]*a / max; \
+                       output_row[x*3 + 1] = output_row[x*3 + 1]*a / max; \
+                       output_row[x*3 + 2] = output_row[x*3 + 2]*a / max; \
+                       if( do_yuv ) { \
+                               output_row[x*3 + 1] += chroma_offset*b / max; \
+                               output_row[x*3 + 2] += chroma_offset*b / max; \
                        } \
                } \
        } \
-}
-
-
-
+} break
+
+#define MASK_ALPHA(mode, a, b) \
+case mode: \
+       switch( engine->output->get_color_model() ) { \
+       APPLY_MASK_ALPHA(BC_RGB888, unsigned char, 0xff, 3, 0, a, b); \
+       APPLY_MASK_ALPHA(BC_RGB_FLOAT, float, 1.0, 3, 0, a, b); \
+       APPLY_MASK_ALPHA(BC_YUV888, unsigned char, 0xff, 3, 1, a, b); \
+       APPLY_MASK_ALPHA(BC_RGBA_FLOAT, float, 1.0, 4, 0, a, b); \
+       APPLY_MASK_ALPHA(BC_YUVA8888, unsigned char, 0xff, 4, 1, a, b); \
+       APPLY_MASK_ALPHA(BC_RGBA8888, unsigned char, 0xff, 4, 0, a, b); \
+       APPLY_MASK_ALPHA(BC_RGB161616, uint16_t, 0xffff, 3, 0, a, b); \
+       APPLY_MASK_ALPHA(BC_YUV161616, uint16_t, 0xffff, 3, 1, a, b); \
+       APPLY_MASK_ALPHA(BC_YUVA16161616, uint16_t, 0xffff, 4, 1, a, b); \
+       APPLY_MASK_ALPHA(BC_RGBA16161616, uint16_t, 0xffff, 4, 0, a, b); \
+} break
 
 //printf("MaskUnit::process_package 1 %d\n", engine->mode);
-               for(int i = ptr->start_y; i < ptr->end_y; i++)
-               {
-                       switch(engine->mode)
-                       {
-                               case MASK_MULTIPLY_ALPHA:
-                                       switch(engine->output->get_color_model())
-                                       {
-                                               case BC_RGB888:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(unsigned char, 0xff, 3, 0);
-                                                       break;
-                                               case BC_RGB_FLOAT:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(float, 1.0, 3, 0);
-                                                       break;
-                                               case BC_YUV888:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(unsigned char, 0xff, 3, 1);
-                                                       break;
-                                               case BC_RGBA_FLOAT:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(float, 1.0, 4, 0);
-                                                       break;
-                                               case BC_YUVA8888:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(unsigned char, 0xff, 4, 1);
-                                                       break;
-                                               case BC_RGBA8888:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(unsigned char, 0xff, 4, 0);
-                                                       break;
-                                               case BC_RGB161616:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(uint16_t, 0xffff, 3, 0);
-                                                       break;
-                                               case BC_YUV161616:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(uint16_t, 0xffff, 3, 1);
-                                                       break;
-                                               case BC_YUVA16161616:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(uint16_t, 0xffff, 4, 1);
-                                                       break;
-                                               case BC_RGBA16161616:
-                                                       APPLY_MASK_MULTIPLY_ALPHA(uint16_t, 0xffff, 4, 0);
-                                                       break;
-                                       }
-                                       break;
-
-                               case MASK_SUBTRACT_ALPHA:
-                                       switch(engine->output->get_color_model())
-                                       {
-                                               case BC_RGB888:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(unsigned char, 0xff, 3, 0);
-                                                       break;
-                                               case BC_RGB_FLOAT:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(float, 1.0, 3, 0);
-                                                       break;
-                                               case BC_RGBA_FLOAT:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(float, 1.0, 4, 0);
-                                                       break;
-                                               case BC_RGBA8888:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(unsigned char, 0xff, 4, 0);
-                                                       break;
-                                               case BC_YUV888:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(unsigned char, 0xff, 3, 1);
-                                                       break;
-                                               case BC_YUVA8888:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(unsigned char, 0xff, 4, 1);
-                                                       break;
-                                               case BC_RGB161616:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(uint16_t, 0xffff, 3, 0);
-                                                       break;
-                                               case BC_RGBA16161616:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(uint16_t, 0xffff, 4, 0);
-                                                       break;
-                                               case BC_YUV161616:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(uint16_t, 0xffff, 3, 1);
-                                                       break;
-                                               case BC_YUVA16161616:
-                                                       APPLY_MASK_SUBTRACT_ALPHA(uint16_t, 0xffff, 4, 1);
-                                                       break;
-                                       }
-                                       break;
-                       }
+               int mask_w = engine->mask->get_w();
+               switch( engine_mode ) {
+               MASK_ALPHA(MASK_MULTIPLY_ALPHA, m, n);
+               MASK_ALPHA(MASK_SUBTRACT_ALPHA, n, m);
                }
        }
 }
 
 
-
-
-
 MaskEngine::MaskEngine(int cpus)
  : LoadServer(cpus, cpus * OVERSAMPLE * 2)
 // : LoadServer(1, OVERSAMPLE * 2)
@@ -750,14 +499,12 @@ MaskEngine::MaskEngine(int cpus)
 
 MaskEngine::~MaskEngine()
 {
-       if(mask)
-       {
+       if( mask ) {
                delete mask;
                delete temp_mask;
        }
 
-       for(int i = 0; i < point_sets.total; i++)
-       {
+       for( int i = 0; i < point_sets.total; i++ ) {
                ArrayList<MaskPoint*> *points = point_sets.values[i];
                points->remove_all_objects();
        }
@@ -768,11 +515,10 @@ int MaskEngine::points_equivalent(ArrayList<MaskPoint*> *new_points,
        ArrayList<MaskPoint*> *points)
 {
 //printf("MaskEngine::points_equivalent %d %d\n", new_points->total, points->total);
-       if(new_points->total != points->total) return 0;
+       if( new_points->total != points->total ) return 0;
 
-       for(int i = 0; i < new_points->total; i++)
-       {
-               if(!(*new_points->values[i] == *points->values[i])) return 0;
+       for( int i = 0; i < new_points->total; i++ ) {
+               if( !(*new_points->values[i] == *points->values[i]) ) return 0;
        }
 
        return 1;
@@ -787,64 +533,55 @@ void MaskEngine::do_mask(VFrame *output,
        int new_color_model = 0;
        recalculate = 0;
 
-       switch(output->get_color_model())
-       {
-               case BC_RGB_FLOAT:
-               case BC_RGBA_FLOAT:
-                       new_color_model = BC_A_FLOAT;
-                       break;
-
-               case BC_RGB888:
-               case BC_RGBA8888:
-               case BC_YUV888:
-               case BC_YUVA8888:
-                       new_color_model = BC_A8;
-                       break;
-
-               case BC_RGB161616:
-               case BC_RGBA16161616:
-               case BC_YUV161616:
-               case BC_YUVA16161616:
-                       new_color_model = BC_A16;
-                       break;
+       switch( output->get_color_model() ) {
+       case BC_RGB_FLOAT:
+       case BC_RGBA_FLOAT:
+               new_color_model = BC_A_FLOAT;
+               break;
+
+       case BC_RGB888:
+       case BC_RGBA8888:
+       case BC_YUV888:
+       case BC_YUVA8888:
+               new_color_model = BC_A8;
+               break;
+
+       case BC_RGB161616:
+       case BC_RGBA16161616:
+       case BC_YUV161616:
+       case BC_YUVA16161616:
+               new_color_model = BC_A16;
+               break;
        }
 
 // Determine if recalculation is needed
 SET_TRACE
 
-       if(mask &&
-               (mask->get_w() != output->get_w() ||
-               mask->get_h() != output->get_h() ||
-               mask->get_color_model() != new_color_model))
-       {
+       if( mask &&
+           (mask->get_w() != output->get_w() ||
+            mask->get_h() != output->get_h() ||
+            mask->get_color_model() != new_color_model) ) {
                delete mask;
                delete temp_mask;
                mask = 0;
                recalculate = 1;
        }
 
-       if(!recalculate)
-       {
-               if(point_sets.total != keyframe_set->total_submasks(start_position_project,
-                       PLAY_FORWARD))
+       if( !recalculate ) {
+               if( point_sets.total != keyframe_set->total_submasks(start_position_project,
+                       PLAY_FORWARD) )
                        recalculate = 1;
        }
 
-       if(!recalculate)
-       {
-               for(int i = 0;
-                       i < keyframe_set->total_submasks(start_position_project,
-                               PLAY_FORWARD) && !recalculate;
-                       i++)
-               {
-                       ArrayList<MaskPoint*> *new_points = new ArrayList<MaskPoint*>;
-                       keyframe_set->get_points(new_points,
-                               i,
-                               start_position_project,
-                               PLAY_FORWARD);
-                       if(!points_equivalent(new_points, point_sets.values[i])) recalculate = 1;
-                       new_points->remove_all_objects();
-                       delete new_points;
+       if( !recalculate ) {
+               for( int i=0,n=keyframe_set->total_submasks(start_position_project, PLAY_FORWARD);
+                               i<n && !recalculate; ++i ) {
+                       ArrayList<MaskPoint*> new_points;
+                       keyframe_set->get_points(&new_points, i,
+                               start_position_project, PLAY_FORWARD);
+                       if( !points_equivalent(&new_points, point_sets.values[i]) )
+                               recalculate = 1;
+                       new_points.remove_all_objects();
                }
        }
 
@@ -853,35 +590,31 @@ SET_TRACE
        float new_feather = keyframe_set->get_feather(start_position_project,
                PLAY_FORWARD);
 
-       if(recalculate ||
+       if( recalculate ||
                !EQUIV(new_feather, feather) ||
-               !EQUIV(new_value, value))
-       {
+               !EQUIV(new_value, value) ) {
                recalculate = 1;
-               if(!mask)
-               {
+               if( !mask ) {
                        mask = new VFrame(output->get_w(), output->get_h(),
                                        new_color_model, 0);
                        temp_mask = new VFrame(output->get_w(), output->get_h(),
                                        new_color_model, 0);
                }
-               if(new_feather > 0)
+               if( new_feather > 0 )
                        temp_mask->clear_frame();
                else
                        mask->clear_frame();
 
-               for(int i = 0; i < point_sets.total; i++)
-               {
+               for( int i = 0; i < point_sets.total; i++ ) {
                        ArrayList<MaskPoint*> *points = point_sets.values[i];
                        points->remove_all_objects();
                }
                point_sets.remove_all_objects();
 
-               for(int i = 0;
+               for( int i = 0;
                        i < keyframe_set->total_submasks(start_position_project,
                                PLAY_FORWARD);
-                       i++)
-               {
+                       i++ ) {
                        ArrayList<MaskPoint*> *new_points = new ArrayList<MaskPoint*>;
                        keyframe_set->get_points(new_points,
                                i,
index 8d58deb3787880a2bd6dc3d1206163c8763b6337..eed42cd9f76e352825b8fb68870f745bbbfccb33 100644 (file)
@@ -1208,19 +1208,29 @@ void Playback3D::do_mask_sync(Playback3DCommand *command)
 
 // Clear screen
                glDisable(GL_TEXTURE_2D);
-               if( command->default_auto->mode == MASK_MULTIPLY_ALPHA ) {
-                       glClearColor(0.0, 0.0, 0.0, 0.0);
-                       glColor4f((float)command->keyframe->value / 100,
-                               (float)command->keyframe->value / 100,
-                               (float)command->keyframe->value / 100,
-                               1.0);
+               float value = command->keyframe->value / 100.f;
+               if( value >= 0 ) {
+                       if( command->default_auto->mode == MASK_MULTIPLY_ALPHA ) {
+                               glClearColor(0.f, 0.f, 0.f, 0.f);
+                               glColor4f(value, value, value, 1.f);
+                       }
+                       else {
+                               glClearColor(1.f, 1.f, 1.f, 1.f);
+                               value = 1.f - value;
+                               glColor4f(value, value, value, 1.f);
+                       }
                }
                else {
-                       glClearColor(1.0, 1.0, 1.0, 1.0);
-                       glColor4f((float)1.0 - (float)command->keyframe->value / 100,
-                               (float)1.0 - (float)command->keyframe->value / 100,
-                               (float)1.0 - (float)command->keyframe->value / 100,
-                               1.0);
+                       if( command->default_auto->mode == MASK_MULTIPLY_ALPHA ) {
+                               value = -value;
+                               glClearColor(value, value, value, 1.f);
+                               glColor4f(0.f, 0.f, 0.f, 0.f);
+                       }
+                       else {
+                               value = 1.f + value;
+                               glClearColor(value, value, value, 1.f);
+                               glColor4f(1.f, 1.f, 1.f, 1.f);
+                       }
                }
                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
index 946eb37e9fabd2f8b42b9d6afa131e24dae1511b..3b5de9539a5891d058cc1f892655729a37776500 100644 (file)
@@ -131,6 +131,7 @@ Theme::Theme()
        ffmpeg_toggle = 0;
        proxy_s_toggle = 0;
        proxy_p_toggle = 0;
+       mask_mode_toggle = 0;
        infoasset_data = 0;
        in_point = 0;
        insert_data = 0;
index 5873fcd865e9d4ff7a397282930a597faaac14b7..1845b8710d012483fff05fa496de687aa29ca9f0 100644 (file)
@@ -322,6 +322,7 @@ public:
        VFrame **ffmpeg_toggle;
        VFrame **proxy_p_toggle;
        VFrame **proxy_s_toggle;
+       VFrame **mask_mode_toggle;
        VFrame **infoasset_data;
        VFrame **in_point;
        VFrame **insert_data;
index 59597ffa80161cd8a174d98ad3db5e54ceb6a249..0aed3c8bf227e5226d7451c491e737e31b9f385c 100644 (file)
@@ -386,17 +386,77 @@ const char* BC_Signals::sig_to_str(int number)
 #if __i386__
 #define IP eip
 #define sigregs_t sigcontext
+
+static void reg_dump(FILE *fp,sigregs_t *rp)
+{
+       fprintf(fp,"REGS:\n");
+       fprintf(fp,"  gs: %04x:%04x\n", rp->gs,rp->__gsh);
+       fprintf(fp,"  fs: %04x:%04x\n", rp->fs,rp->__fsh);
+       fprintf(fp,"  es: %04x:%04x\n", rp->es,rp->__esh);
+       fprintf(fp,"  ds: %04x:%04x\n", rp->ds,rp->__dsh);
+       fprintf(fp," edi: %14p %d\n", (void*)rp->edi,rp->edi);
+       fprintf(fp," esi: %14p %d\n", (void*)rp->esi,rp->esi);
+       fprintf(fp," ebp: %14p %d\n", (void*)rp->ebp,rp->ebp);
+       fprintf(fp," esp: %14p %d\n", (void*)rp->esp,rp->esp);
+       fprintf(fp," ebx: %14p %d\n", (void*)rp->ebx,rp->ebx);
+       fprintf(fp," edx: %14p %d\n", (void*)rp->edx,rp->edx);
+       fprintf(fp," ecx: %14p %d\n", (void*)rp->ecx,rp->ecx);
+       fprintf(fp," eax: %14p %d\n", (void*)rp->eax,rp->eax);
+       fprintf(fp," trapno: %14p %d\n", (void*)rp->trapno,rp->trapno);
+       fprintf(fp," err: %14p %d\n", (void*)rp->err,rp->err);
+       fprintf(fp," eip: %14p %d\n", (void*)rp->eip,rp->eip);
+       fprintf(fp," cs: %04xd : %04x\n", rp->cs,rp->__csh);
+       fprintf(fp," eflags: %14p %d\n", (void*)rp->eflags,rp->eflags);
+       fprintf(fp," esp_at_signal: %p %d\n", (void*)rp->esp_at_signal,rp->esp_at_signal);
+       fprintf(fp," ss: %04xd : %04x\n", rp->ss,rp->__ssh);
+       fprintf(fp," oldmask: %14p %d\n", (void*)rp->oldmask,rp->oldmask);
+       fprintf(fp," cr2: %14p %d\n", (void*)rp->cr2,rp->cr2);
+       fprintf(fp,"\n");
+}
 #endif
 
 #if __x86_64__
 #define IP rip
 #define sigregs_t sigcontext
+
+static void reg_dump(FILE *fp,sigregs_t *rp)
+{
+       fprintf(fp,"REGS:\n");
+       fprintf(fp,"  r8: %20p %jd\n", (void*)rp->r8,rp->r8);
+       fprintf(fp,"  r9: %20p %jd\n", (void*)rp->r9,rp->r9);
+       fprintf(fp," r10: %20p %jd\n", (void*)rp->r10,rp->r10);
+       fprintf(fp," r11: %20p %jd\n", (void*)rp->r11,rp->r11);
+       fprintf(fp," r12: %20p %jd\n", (void*)rp->r12,rp->r12);
+       fprintf(fp," r13: %20p %jd\n", (void*)rp->r13,rp->r13);
+       fprintf(fp," r14: %20p %jd\n", (void*)rp->r14,rp->r14);
+       fprintf(fp," r15: %20p %jd\n", (void*)rp->r15,rp->r15);
+       fprintf(fp," rdi: %20p %jd\n", (void*)rp->rdi,rp->rdi);
+       fprintf(fp," rsi: %20p %jd\n", (void*)rp->rsi,rp->rsi);
+       fprintf(fp," rbp: %20p %jd\n", (void*)rp->rbp,rp->rbp);
+       fprintf(fp," rbx: %20p %jd\n", (void*)rp->rbx,rp->rbx);
+       fprintf(fp," rdx: %20p %jd\n", (void*)rp->rdx,rp->rdx);
+       fprintf(fp," rax: %20p %jd\n", (void*)rp->rax,rp->rax);
+       fprintf(fp," rcx: %20p %jd\n", (void*)rp->rcx,rp->rcx);
+       fprintf(fp," rsp: %20p %jd\n", (void*)rp->rsp,rp->rsp);
+       fprintf(fp," rip: %20p %jd\n", (void*)rp->rip,rp->rip);
+       fprintf(fp," eflags: %14p %jd\n", (void*)rp->eflags,rp->eflags);
+       fprintf(fp,"  cs: %04x\n", rp->cs);
+       fprintf(fp,"  gs: %04x\n", rp->gs);
+       fprintf(fp,"  fs: %04x\n", rp->fs);
+       fprintf(fp," err: %20p %jd\n", (void*)rp->err,rp->err);
+       fprintf(fp," trapno: %20p %jd\n", (void*)rp->trapno,rp->trapno);
+       fprintf(fp," oldmask: %20p %jd\n", (void*)rp->oldmask,rp->oldmask);
+       fprintf(fp," cr2: %20p %jd\n", (void*)rp->cr2,rp->cr2);
+       fprintf(fp,"\n");
+}
+
 #endif
 
 #if __powerpc__ || __powerpc64__ || __powerpc64le__
 #include <asm/ptrace.h>
 #define IP nip
 #define sigregs_t pt_regs
+static void reg_dump(FILE *fp,sigregs_t *rp) {}
 #endif
 
 #ifndef IP
@@ -481,6 +541,7 @@ static void handle_dump(int n, siginfo_t * info, void *sc)
        else
                fprintf(fp,"err opening: %s, %m\n", proc_mem);
 
+       reg_dump(fp, c);
        fprintf(fp,"\n\n");
        if( fp != stdout ) fclose(fp);
        char cmd[1024], *cp = cmd;
index 18bb5181f7aaad435738e51bbf4e43936a58ef4f..093b9620ab5dca83e9b0f91d725e80a1cb1b299c 100644 (file)
@@ -32,13 +32,8 @@ class BC_PercentageSlider;
 class BC_Slider : public BC_SubWindow
 {
 public:
-       BC_Slider(int x,
-               int y,
-               int pixels,
-               int pointer_motion_range,
-               VFrame **images,
-               int show_number,
-               int vertical,
+       BC_Slider(int x, int y, int pixels, int pointer_motion_range,
+               VFrame **images, int show_number, int vertical,
                int use_caption);
        virtual ~BC_Slider();
 
@@ -108,18 +103,9 @@ private:
 class BC_ISlider : public BC_Slider
 {
 public:
-       BC_ISlider(int x,
-                       int y,
-                       int vertical,
-                       int pixels,
-                       int pointer_motion_range,
-                       int64_t minvalue,
-                       int64_t maxvalue,
-                       int64_t value,
-                       int use_caption = 0,
-                       VFrame **data = 0,
-                       int *output = 0);
-
+       BC_ISlider(int x, int y, int vertical, int pixels, int pointer_motion_range,
+               int64_t minvalue, int64_t maxvalue, int64_t value,
+               int use_caption = 0, VFrame **data = 0, int *output = 0);
        int update(int64_t value);
        int update(int pointer_motion_range, int64_t value, int64_t minvalue, int64_t maxvalue);
        int64_t get_value();
@@ -142,16 +128,9 @@ private:
 class BC_FSlider : public BC_Slider
 {
 public:
-       BC_FSlider(int x,
-                       int y,
-                       int vertical,
-                       int pixels,
-                       int pointer_motion_range,
-                       float minvalue,
-                       float maxvalue,
-                       float value,
-                       int use_caption = 0,
-                       VFrame **data = 0);
+       BC_FSlider(int x, int y, int vertical, int pixels, int pointer_motion_range,
+               float minvalue, float maxvalue, float value,
+               int use_caption = 0, VFrame **data = 0);
 
        friend class BC_PercentageSlider;
 
@@ -179,20 +158,11 @@ private:
 class BC_PercentageSlider : public BC_FSlider
 {
 public:
-       BC_PercentageSlider(int x,
-                       int y,
-                       int vertical,
-                       int pixels,
-                       int pointer_motion_range,
-                       float minvalue,
-                       float maxvalue,
-                       float value,
-                       int use_caption = 0,
-                       VFrame **data = 0);
-
+       BC_PercentageSlider(int x, int y, int vertical, int pixels, int pointer_motion_range,
+               float minvalue, float maxvalue, float value,
+               int use_caption = 0, VFrame **data = 0);
        char* get_caption();
 private:
 };
 
-
 #endif
index 72d9e82ac0afb78246869f0e30bdccd077fdf824..b127e275fa2de3175a79f2f643abf97adc6aeca4 100644 (file)
@@ -22,6 +22,7 @@
 #include "bcdisplayinfo.h"
 #include "brightnesswindow.h"
 #include "language.h"
+#include "theme.h"
 
 
 
@@ -179,7 +180,7 @@ int BrightnessReset::handle_event()
 }
 
 BrightnessSliderClr::BrightnessSliderClr(BrightnessMain *client, BrightnessWindow *window, int x, int y, int w, int is_brightness)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, client->get_theme()->get_image_set("reset_button"))
 {
        this->client = client;
        this->window = window;
index 1b122ed3468a4ebf1c140558ac69309cecc7334f..877d216b528f0495007adcdb546a672bce98169e 100644 (file)
@@ -91,7 +91,7 @@ public:
        BrightnessWindow *window;
 };
 
-class BrightnessSliderClr : public BC_GenericButton
+class BrightnessSliderClr : public BC_Button
 {
 public:
        BrightnessSliderClr(BrightnessMain *client, BrightnessWindow *window, int x, int y, int w, int is_brightness);
index 78203e86936d0662e9e2a848dee7af1d5e4e6472..1e188f26dbf07ab570beaff0dd179a6481b85043 100644 (file)
@@ -677,7 +677,7 @@ Color3WaySliderClrSection::Color3WaySliderClrSection(Color3WayMain *plugin,
        int w,
        int clear,
        int section)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index 6c6d728b5c3a6226811626c82adc7b73b260cd35..672de5c62a5baf6f144bad8818f008bba9d927dd 100644 (file)
@@ -142,7 +142,7 @@ public:
 };
 
 
-class Color3WaySliderClrSection : public BC_GenericButton
+class Color3WaySliderClrSection : public BC_Button
 {
 public:
        Color3WaySliderClrSection(Color3WayMain *plugin,
index 1719fee85621db12aa43f6e896878e2c07b2f1da..56d3c27bed309713b4d94cc3492ab1e4d8e4f995 100644 (file)
@@ -22,6 +22,7 @@
 #include "bcdisplayinfo.h"
 #include "colorbalancewindow.h"
 #include "language.h"
+#include "theme.h"
 
 
 
@@ -241,7 +242,7 @@ int ColorBalanceReset::handle_event()
 
 ColorBalanceSliderClr::ColorBalanceSliderClr(ColorBalanceMain *plugin,
        ColorBalanceWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index 02b3e39ad607f86fa70f42a422bb142b4ae9c38a..3076691a3f20852452eb4221d3c9f8b00179cb6c 100644 (file)
@@ -119,7 +119,7 @@ public:
        ColorBalanceWindow *gui;
 };
 
-class ColorBalanceSliderClr : public BC_GenericButton
+class ColorBalanceSliderClr : public BC_Button
 {
 public:
        ColorBalanceSliderClr(ColorBalanceMain *plugin, ColorBalanceWindow *gui, int x, int y, int w, int clear);
index c6a232904b3132ef1a94a32ff908b6c9dec513c8..ce1e1512dc28849f982712f1914ece4a5f92aeb5 100644 (file)
@@ -31,6 +31,7 @@
 #include "bccolors.h"
 #include "playback3d.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <stdint.h>
@@ -202,7 +203,7 @@ int HueReset::handle_event()
 
 
 HueSliderClr::HueSliderClr(HueEffect *plugin, HueWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index a591a852425727b53f2b5c03dce5742247e3c18a..c763ba4f168664d80cc0cfff188ce1bb9801593f 100644 (file)
@@ -111,7 +111,7 @@ public:
        HueWindow *gui;
 };
 
-class HueSliderClr : public BC_GenericButton
+class HueSliderClr : public BC_Button
 {
 public:
        HueSliderClr(HueEffect *plugin, HueWindow *gui, int x, int y, int w, int clear);
index d5d326f0cc028cc162d04336ca4e111a2073ace9..dab0043a700d38c4d2d730c2405f7b0e69679fb1 100644 (file)
@@ -33,6 +33,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 
@@ -302,7 +303,7 @@ int LinearBlurDefaultSettings::handle_event()
 
 
 LinearBlurSliderClr::LinearBlurSliderClr(LinearBlurMain *plugin, LinearBlurWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index 88f49a8129d7df2ebbee041370bc56581fa26b9b..676f033190cb27ad5fc5275c2c2d06f657a35fb1 100644 (file)
@@ -124,7 +124,7 @@ public:
        LinearBlurWindow *gui;
 };
 
-class LinearBlurSliderClr : public BC_GenericButton
+class LinearBlurSliderClr : public BC_Button
 {
 public:
        LinearBlurSliderClr(LinearBlurMain *plugin, LinearBlurWindow *gui, int x, int y, int w, int clear);
index 1681284363deb8545c4ee20111ea8bde4de25722..ffdc0ae565541e2236ec0b7b7154104487c5b5eb 100644 (file)
@@ -28,6 +28,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 
@@ -98,7 +99,7 @@ public:
        PolarWindow *window;
 };
 
-class PolarSliderClr : public BC_GenericButton
+class PolarSliderClr : public BC_Button
 {
 public:
        PolarSliderClr(PolarEffect *plugin, PolarWindow *window, int x, int y, int w, int clear);
@@ -347,7 +348,7 @@ int PolarReset::handle_event()
 
 
 PolarSliderClr::PolarSliderClr(PolarEffect *plugin, PolarWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index 5137a6f2572a1d882742e2deea7368a360730c74..5b80b0b85e233b99f102d10f699b951afcc2178e 100644 (file)
@@ -306,7 +306,7 @@ int RadialBlurDefaultSettings::handle_event()
 
 
 RadialBlurSliderClr::RadialBlurSliderClr(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index c111b55ec396549f7b1049a2b0edd0befc846a15..368c0e0c5a478f1a72abf045a18cc80bf5629d76 100644 (file)
@@ -37,6 +37,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #define RESET_DEFAULT_SETTINGS 10
@@ -128,7 +129,7 @@ public:
        RadialBlurWindow *gui;
 };
 
-class RadialBlurSliderClr : public BC_GenericButton
+class RadialBlurSliderClr : public BC_Button
 {
 public:
        RadialBlurSliderClr(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w, int clear);
index dca56c2d48b1d97606ffd9f560edb6ae08ea411f..f05cb3a0b28f01523c1818a78a8206c9508747d8 100644 (file)
@@ -130,7 +130,7 @@ int RGBShiftReset::handle_event()
 
 
 RGBShiftSliderClr::RGBShiftSliderClr(RGBShiftEffect *plugin, RGBShiftWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index e948c40d5191f97a99aefee9938baed61f0db708..4d71e6a8851290bc1bad00282223dac46418db13 100644 (file)
@@ -31,6 +31,7 @@
 #include "language.h"
 #include "bccolors.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <stdint.h>
@@ -86,7 +87,7 @@ public:
        RGBShiftWindow *window;
 };
 
-class RGBShiftSliderClr : public BC_GenericButton
+class RGBShiftSliderClr : public BC_Button
 {
 public:
        RGBShiftSliderClr(RGBShiftEffect *plugin, RGBShiftWindow *window, int x, int y, int w, int clear);
index 18ddefd9d5ddd8604452c3fee3514d5f25f14aa6..67f31bcfe36ec34db1ffccf2702ab9e7495fef9d 100644 (file)
@@ -198,7 +198,7 @@ int SharpenDefaultSettings::handle_event()
 
 
 SharpenSliderClr::SharpenSliderClr(SharpenMain *client, SharpenWindow *gui, int x, int y, int w)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, client->get_theme()->get_image_set("reset_button"))
 {
        this->client = client;
        this->gui = gui;
index b1e684c44c10e6ef52c7b2fca2a13f23af0ed716..6cc217068fc651ea7edb3838bf292f9fb1a2e703 100644 (file)
@@ -26,6 +26,7 @@
 #include "filexml.h"
 #include "mutex.h"
 #include "sharpen.h"
+#include "theme.h"
 
 #define RESET_DEFAULT_SETTINGS 10
 #define RESET_ALL 0
@@ -120,7 +121,7 @@ public:
        SharpenWindow *gui;
 };
 
-class SharpenSliderClr : public BC_GenericButton
+class SharpenSliderClr : public BC_Button
 {
 public:
        SharpenSliderClr(SharpenMain *client, SharpenWindow *gui, int x, int y, int w);
index 3c8b15f305fafc4316bddc813f1784a4ccb98bf1..4d57888612ed0a364b552374aedf6a1536860022 100644 (file)
@@ -201,7 +201,7 @@ int ShiftInterlaceReset::handle_event()
 
 
 ShiftInterlaceSliderClr::ShiftInterlaceSliderClr(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index 4bba77e210811a841bd6ac71259a364ea4236b6a..68a8735fe757da8232bc18658259d7258f952a12 100644 (file)
@@ -29,6 +29,7 @@
 #include "guicast.h"
 #include "language.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 
@@ -91,7 +92,7 @@ public:
        ShiftInterlaceWindow *gui;
 };
 
-class ShiftInterlaceSliderClr : public BC_GenericButton
+class ShiftInterlaceSliderClr : public BC_Button
 {
 public:
        ShiftInterlaceSliderClr(ShiftInterlaceMain *plugin, ShiftInterlaceWindow *gui, int x, int y, int w, int clear);
index ce13c51f6fc76a83ca9f1165b4322243f5e9d609..5423dde985ff8791733993e4ea3c3554026442c8 100644 (file)
@@ -275,6 +275,12 @@ void BlondTheme::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -636,6 +642,13 @@ void BlondTheme::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/reset.png b/cinelerra-5.1/plugins/theme_blond/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/reset_dn.png b/cinelerra-5.1/plugins/theme_blond/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/reset_hi.png b/cinelerra-5.1/plugins/theme_blond/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond/data/reset_up.png b/cinelerra-5.1/plugins/theme_blond/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond/data/reset_up.png differ
index 4d396a3e38a093ec48b2d4312e840d7ead4c4bb1..2ae271607871ac05eeaaa3a6e68224ad50c1a6af 100644 (file)
@@ -328,6 +328,12 @@ void BlondCVTheme::initialize()
                "generic_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "generic_up.png",
                "generic_hi.png",
@@ -656,6 +662,13 @@ void BlondCVTheme::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_blond_cv/data/reset.png b/cinelerra-5.1/plugins/theme_blond_cv/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blond_cv/data/reset.png differ
index 335def5561640832d1d69803865bcc450121f948..3362081b1f2f8435b054f843a51331e449012ebe 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blond_cv/data/reset_dn.png and b/cinelerra-5.1/plugins/theme_blond_cv/data/reset_dn.png differ
index 55dc379cd09627cf0814ca3a2441837f03f03424..49bfefe9fc0eb5dbd20074e54831db65d84c52b3 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blond_cv/data/reset_hi.png and b/cinelerra-5.1/plugins/theme_blond_cv/data/reset_hi.png differ
index 4ce4270d2178a16c84327d1367111ed43636f888..a9ced0f8be903d0c9c721232a5b59e180db7ebbe 100644 (file)
Binary files a/cinelerra-5.1/plugins/theme_blond_cv/data/reset_up.png and b/cinelerra-5.1/plugins/theme_blond_cv/data/reset_up.png differ
index 8cfd267f7befa5e478a4a7c6e63286a485ded30a..4f2785deb0de8c59eafa8f3c2912ed18f211dce2 100644 (file)
@@ -275,6 +275,12 @@ void BlueDotTheme::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -636,6 +642,13 @@ void BlueDotTheme::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/reset.png b/cinelerra-5.1/plugins/theme_blue/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/reset_dn.png b/cinelerra-5.1/plugins/theme_blue/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/reset_hi.png b/cinelerra-5.1/plugins/theme_blue/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue/data/reset_up.png b/cinelerra-5.1/plugins/theme_blue/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue/data/reset_up.png differ
index 2d956f6f07036404a135d163c9f1a11376f93c2b..b2f3565a938bfddc3ecce714bd64fd5bc5e985d6 100644 (file)
@@ -286,6 +286,12 @@ void BlueDotTheme::initialize()
                "generic_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "generic_up.png",
                "generic_hi.png",
@@ -681,6 +687,13 @@ void BlueDotTheme::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/reset.png b/cinelerra-5.1/plugins/theme_blue_dot/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/reset_dn.png b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/reset_hi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/reset_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_blue_dot/data/reset_up.png differ
index 1060171675037dfc4cfa70ac3f82ada05e02c6e7..a33d70e61381e27c543913aa4285366eb9b9059e 100644 (file)
@@ -282,6 +282,12 @@ void BrightTheme::initialize()
                "bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "bigbutton_up.png",
                "bigbutton_hi.png",
@@ -642,6 +648,13 @@ void BrightTheme::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/reset.png b/cinelerra-5.1/plugins/theme_bright/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/reset_dn.png b/cinelerra-5.1/plugins/theme_bright/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/reset_hi.png b/cinelerra-5.1/plugins/theme_bright/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_bright/data/reset_up.png b/cinelerra-5.1/plugins/theme_bright/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_bright/data/reset_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/reset.png b/cinelerra-5.1/plugins/theme_hulk/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/reset_dn.png b/cinelerra-5.1/plugins/theme_hulk/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/reset_hi.png b/cinelerra-5.1/plugins/theme_hulk/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_hulk/data/reset_up.png b/cinelerra-5.1/plugins/theme_hulk/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_hulk/data/reset_up.png differ
index cd479fcf13458e435922c1f2ca2a9abe8f298a0f..42bfe88ec961e0b999df714aebc87f2c1d3106c6 100644 (file)
@@ -276,6 +276,12 @@ void HULKTHEME::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -637,6 +643,13 @@ void HULKTHEME::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/reset.png b/cinelerra-5.1/plugins/theme_neophyte/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/reset_dn.png b/cinelerra-5.1/plugins/theme_neophyte/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/reset_hi.png b/cinelerra-5.1/plugins/theme_neophyte/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_neophyte/data/reset_up.png b/cinelerra-5.1/plugins/theme_neophyte/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_neophyte/data/reset_up.png differ
index b23ddf59b7a995de2109467bc0f5376d61f7980b..de9d59c0f59fd91c9d95b5b5febd056a47dc66e7 100644 (file)
@@ -354,6 +354,12 @@ void NEOPHYTETHEME::initialize()
                "new_bigbutton_hi.png",
                "new_bigbutton_dn.png",
                "new_ok_images");
+        new_button(
+               "reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
        resources->cancel_images = new_button(
                "cancel.png",
                "filebox_bigbutton_up.png",
@@ -766,6 +772,12 @@ void NEOPHYTETHEME::initialize()
                "proxy_s_chkd.png",
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
        shbtn_data = new_image_set(
                3,
                "shbtn_up.png",
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/reset.png b/cinelerra-5.1/plugins/theme_pinklady/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/reset_dn.png b/cinelerra-5.1/plugins/theme_pinklady/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/reset_hi.png b/cinelerra-5.1/plugins/theme_pinklady/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_pinklady/data/reset_up.png b/cinelerra-5.1/plugins/theme_pinklady/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_pinklady/data/reset_up.png differ
index bc4b0f0e16b2e961a977bca341b39cc6f1d3e0c0..9a8c63228741329f6ae813220fafbac3454ce9fc 100644 (file)
@@ -261,6 +261,12 @@ void PINKLADY::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -622,6 +628,13 @@ void PINKLADY::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/reset.png b/cinelerra-5.1/plugins/theme_suv/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/reset.svg b/cinelerra-5.1/plugins/theme_suv/data/reset.svg
new file mode 100644 (file)
index 0000000..b3778c7
--- /dev/null
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="16"
+   height="16"
+   viewBox="0 0 4.2333333 4.2333335"
+   version="1.1"
+   id="svg884"
+   inkscape:export-filename="/tmp/reset_hi.png"
+   inkscape:export-xdpi="106.54334"
+   inkscape:export-ydpi="106.54334"
+   sodipodi:docname="r.svg"
+   inkscape:version="0.92.4 (unknown)">
+  <defs
+     id="defs878" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="32"
+     inkscape:cx="8.2629635"
+     inkscape:cy="8.7057912"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:pagecheckerboard="true"
+     units="px"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:snap-global="false"
+     inkscape:snap-midpoints="true"
+     inkscape:object-paths="true"
+     inkscape:snap-intersection-paths="true"
+     inkscape:snap-bbox="true"
+     inkscape:bbox-paths="true"
+     inkscape:bbox-nodes="true"
+     inkscape:snap-bbox-edge-midpoints="true"
+     inkscape:window-width="1920"
+     inkscape:window-height="1043"
+     inkscape:window-x="1920"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1">
+    <sodipodi:guide
+       position="0.26458334,2.1166667"
+       orientation="1,0"
+       id="guide1431"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="3.9687501,2.1166667"
+       orientation="1,0"
+       id="guide1433"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="2.1166667,3.9687501"
+       orientation="0,1"
+       id="guide1435"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="2.1166667,0.26458334"
+       orientation="0,1"
+       id="guide1437"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="2.1166667,2.1166667"
+       orientation="1,0"
+       id="guide817"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="2.1166667,2.1166667"
+       orientation="0,1"
+       id="guide819"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+    <sodipodi:guide
+       position="3.4395834,2.1166667"
+       orientation="1,0"
+       id="guide827"
+       inkscape:locked="false"
+       inkscape:label=""
+       inkscape:color="rgb(0,0,255)" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata881">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+        <cc:license
+           rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
+      </cc:Work>
+      <cc:License
+         rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Reproduction" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#Distribution" />
+        <cc:requires
+           rdf:resource="http://creativecommons.org/ns#Notice" />
+        <cc:requires
+           rdf:resource="http://creativecommons.org/ns#Attribution" />
+        <cc:permits
+           rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+        <cc:requires
+           rdf:resource="http://creativecommons.org/ns#ShareAlike" />
+      </cc:License>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Ebene 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-292.76665)">
+    <rect
+       style="opacity:0.13999999;fill:#ffffff;fill-opacity:0;stroke-width:0.52467513;stroke-miterlimit:4;stroke-dasharray:none"
+       id="rect821"
+       width="5.8208332"
+       height="4.2333336"
+       x="-6.9388939e-18"
+       y="292.76666"
+       ry="0.0081253769" />
+    <path
+       style="opacity:1;vector-effect:none;fill:#e6e6e6;fill-opacity:1;stroke:none;stroke-width:0.26143712;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+       d="m 3.2983459,293.35434 a 1.4889471,1.5620282 0 0 0 -1.4889588,1.56204 h 0.4362186 a 1.0528507,1.1045272 0 0 1 1.0527402,-1.10441 1.0528507,1.1045272 0 0 1 1.0527403,1.10441 1.0528507,1.1045272 0 0 1 -1.0527403,1.1044 v 0.45763 a 1.4889471,1.5620282 0 0 0 1.4889589,-1.56203 1.4889471,1.5620282 0 0 0 -1.4889589,-1.56204 z"
+       id="path823"
+       inkscape:connector-curvature="0"
+       inkscape:export-xdpi="106.54334"
+       inkscape:export-ydpi="106.54334" />
+    <path
+       style="fill:#f2f2f2;fill-opacity:1;stroke:none;stroke-width:0.41270712px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 1.1138606,294.65462 h 1.9119255 l -0.9559628,1.45953 z"
+       id="path844"
+       inkscape:connector-curvature="0"
+       inkscape:export-xdpi="106.54334"
+       inkscape:export-ydpi="106.54334" />
+    <path
+       style="fill:none;stroke:#000000;stroke-width:0.24772261px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 0.12408457,296.85988 0.007379,-3.96898 5.56550943,0.0168 v 3.96805 z"
+       id="path824"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ccccc" />
+  </g>
+</svg>
diff --git a/cinelerra-5.1/plugins/theme_suv/data/reset_dn.png b/cinelerra-5.1/plugins/theme_suv/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/reset_hi.png b/cinelerra-5.1/plugins/theme_suv/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_suv/data/reset_up.png b/cinelerra-5.1/plugins/theme_suv/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_suv/data/reset_up.png differ
index c2a072a1c5320afeb4c450d31ce569afd2541112..c1aacc253e0f1328c9edc21405c3d0489fd592fc 100644 (file)
@@ -272,6 +272,12 @@ void SUV::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+       new_button("reset.png",
+               "reset_up.png",
+               "reset_dn.png",
+               "reset_hi.png",
+               "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -623,6 +629,13 @@ void SUV::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkd.png b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkd.png
new file mode 100644 (file)
index 0000000..f02f1ad
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkd.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkdhi.png b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkdhi.png
new file mode 100644 (file)
index 0000000..2c24ad8
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_chkdhi.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_down.png b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_down.png
new file mode 100644 (file)
index 0000000..c5946a0
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_down.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_hi.png b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_hi.png
new file mode 100644 (file)
index 0000000..f3f3060
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_up.png b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_up.png
new file mode 100644 (file)
index 0000000..566432c
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/mask_mode_up.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/reset.png b/cinelerra-5.1/plugins/theme_unflat/data/reset.png
new file mode 100644 (file)
index 0000000..bd714a1
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/reset.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/reset_dn.png b/cinelerra-5.1/plugins/theme_unflat/data/reset_dn.png
new file mode 100644 (file)
index 0000000..3362081
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/reset_dn.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/reset_hi.png b/cinelerra-5.1/plugins/theme_unflat/data/reset_hi.png
new file mode 100644 (file)
index 0000000..49bfefe
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/reset_hi.png differ
diff --git a/cinelerra-5.1/plugins/theme_unflat/data/reset_up.png b/cinelerra-5.1/plugins/theme_unflat/data/reset_up.png
new file mode 100644 (file)
index 0000000..a9ced0f
Binary files /dev/null and b/cinelerra-5.1/plugins/theme_unflat/data/reset_up.png differ
index 231d33b2d17e400aea644fe13c87aaa9b56e0b28..be1da538803ca6ab84520cf7feff653d7e6eba36 100644 (file)
@@ -270,6 +270,12 @@ void UNFLATTHEME::initialize()
                "new_bigbutton_dn.png",
                "new_ok_images");
 
+        new_button("reset.png",
+                "reset_up.png",
+                "reset_dn.png",
+                "reset_hi.png",
+                "reset_button");
+
        resources->cancel_images = new_button("cancel.png",
                "filebox_bigbutton_up.png",
                "filebox_bigbutton_hi.png",
@@ -631,6 +637,13 @@ void UNFLATTHEME::initialize()
                "proxy_s_down.png",
                "proxy_s_chkdhi.png");
 
+       mask_mode_toggle = new_image_set(5,
+               "mask_mode_up.png",
+               "mask_mode_hi.png",
+               "mask_mode_chkd.png",
+               "mask_mode_down.png",
+               "mask_mode_chkdhi.png");
+
        shbtn_data = new_image_set(3,
                "shbtn_up.png",
                "shbtn_hi.png",
index 270131ddd3f19a671dbc09d945a2c7e9389e7bd4..18a0403dc68604764fbedce748cab0815edda4e7 100644 (file)
 
 #include "bcdisplayinfo.h"
 #include "language.h"
+#include "theme.h"
 #include "unsharp.h"
 #include "unsharpwindow.h"
 
 
-
-
-
-
-
-
-
-
 UnsharpWindow::UnsharpWindow(UnsharpMain *plugin)
  : PluginClientWindow(plugin, 285, 170, 285, 170, 0)
 {
@@ -174,7 +167,7 @@ int UnsharpDefaultSettings::handle_event()
 }
 
 UnsharpSliderClr::UnsharpSliderClr(UnsharpMain *plugin, UnsharpWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index b04f6239b782809ec424982076e0dde3afaf42cf..3b4ef7ca03b582237cafb91d87b41eaacea9a202 100644 (file)
@@ -77,7 +77,7 @@ public:
        UnsharpWindow *window;
 };
 
-class UnsharpSliderClr : public BC_GenericButton
+class UnsharpSliderClr : public BC_Button
 {
 public:
        UnsharpSliderClr(UnsharpMain *plugin, UnsharpWindow *window, int x, int y, int w, int clear);
index 8a80c6872d712bb0f25e2e38a7d87d74e032adb5..c5f0c3f39b87ed66f85fe83e3be85e416b46e689 100644 (file)
@@ -246,7 +246,7 @@ int WaveDefaultSettings::handle_event()
 }
 
 WaveSliderClr::WaveSliderClr(WaveEffect *plugin, WaveWindow *gui, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->gui = gui;
index 2c206a2cfcb5cf82b73108d58addd069e29d8f1d..e8ba8d0ace5a58744b196fc06db120d0b5bf087f 100644 (file)
@@ -32,6 +32,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <math.h>
@@ -147,7 +148,7 @@ public:
        WaveWindow *gui;
 };
 
-class WaveSliderClr : public BC_GenericButton
+class WaveSliderClr : public BC_Button
 {
 public:
        WaveSliderClr(WaveEffect *plugin, WaveWindow *gui, int x, int y, int w, int clear);
index ff8eb44cda9f89f6d1cc4ddaaf78f4c7720cb21c..ed84243dd6e4629c303f19dcbf5d49d018cc03da 100644 (file)
@@ -28,6 +28,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 
@@ -121,7 +122,7 @@ public:
        WhirlWindow *window;
 };
 
-class WhirlSliderClr : public BC_GenericButton
+class WhirlSliderClr : public BC_Button
 {
 public:
        WhirlSliderClr(WhirlEffect *plugin, WhirlWindow *window, int x, int y, int w, int clear);
@@ -459,7 +460,7 @@ int WhirlDefaultSettings::handle_event()
 }
 
 WhirlSliderClr::WhirlSliderClr(WhirlEffect *plugin, WhirlWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index 845ca48aabb7d171340e9310c2479b1e31a45fe3..868137f859ff98496dad3b9cb0862ec9da962d2d 100644 (file)
@@ -27,6 +27,7 @@
 #include "language.h"
 #include "bccolors.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <stdint.h>
@@ -79,7 +80,7 @@ public:
        YUVWindow *window;
 };
 
-class YUVSliderClr : public BC_GenericButton
+class YUVSliderClr : public BC_Button
 {
 public:
        YUVSliderClr(YUVEffect *plugin, YUVWindow *window, int x, int y, int w, int clear);
@@ -226,7 +227,7 @@ int YUVReset::handle_event()
 
 
 YUVSliderClr::YUVSliderClr(YUVEffect *plugin, YUVWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index 6f5aad0b160c615216bc4d0008fc7a63b4898b88..0f0b85b663d845e785fceeae382e7ce6a199e061 100644 (file)
@@ -130,7 +130,7 @@ int YUVShiftReset::handle_event()
 
 
 YUVShiftSliderClr::YUVShiftSliderClr(YUVShiftEffect *plugin, YUVShiftWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index 1c2a2c10119339a80b89b1c202bc5b4f4f7c59cd..b6dfae8b24370a9528802d5b93ccada584730f29 100644 (file)
@@ -30,6 +30,7 @@
 #include "language.h"
 #include "bccolors.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #include <stdint.h>
@@ -85,7 +86,7 @@ public:
        YUVShiftWindow *window;
 };
 
-class YUVShiftSliderClr : public BC_GenericButton
+class YUVShiftSliderClr : public BC_Button
 {
 public:
        YUVShiftSliderClr(YUVShiftEffect *plugin, YUVShiftWindow *window, int x, int y, int w, int clear);
index 9637d79efaa0ba79a2e74d674290a39a3ce923dc..0d40b7ca2857bf86cd801a34905db5f30b9c27e7 100644 (file)
@@ -300,7 +300,7 @@ int ZoomBlurDefaultSettings::handle_event()
 
 
 ZoomBlurSliderClr::ZoomBlurSliderClr(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y, int w, int clear)
- : BC_GenericButton(x, y, w, _("⌂"))
+ : BC_Button(x, y, w, plugin->get_theme()->get_image_set("reset_button"))
 {
        this->plugin = plugin;
        this->window = window;
index a39cde3e52a8d6626e862f4c1c396daad9aca43e..cd78677fa8bc91455ddb14335e9254847075a7e0 100644 (file)
@@ -32,6 +32,7 @@
 #include "language.h"
 #include "loadbalance.h"
 #include "pluginvclient.h"
+#include "theme.h"
 #include "vframe.h"
 
 #define RESET_DEFAULT_SETTINGS 10
@@ -141,7 +142,7 @@ public:
 };
 
 
-class ZoomBlurSliderClr : public BC_GenericButton
+class ZoomBlurSliderClr : public BC_Button
 {
 public:
        ZoomBlurSliderClr(ZoomBlurMain *plugin, ZoomBlurWindow *window, int x, int y, int w, int clear);