X-Git-Url: https://git.cinelerra-gg.org/git/?p=goodguy%2Fcinelerra.git;a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fzoomblur%2Fzoomblur.C;fp=cinelerra-5.1%2Fplugins%2Fzoomblur%2Fzoomblur.C;h=e93c100c7b78fee19546e298f1f1ca834b9f2ee3;hp=0d40b7ca2857bf86cd801a34905db5f30b9c27e7;hb=0df48ad2d876409c5beeae2e21933a728ea76c33;hpb=bd570c5fa5f5473b670673368dc30356aa6c43fa diff --git a/cinelerra-5.1/plugins/zoomblur/zoomblur.C b/cinelerra-5.1/plugins/zoomblur/zoomblur.C index 0d40b7ca..e93c100c 100644 --- a/cinelerra-5.1/plugins/zoomblur/zoomblur.C +++ b/cinelerra-5.1/plugins/zoomblur/zoomblur.C @@ -37,8 +37,8 @@ void ZoomBlurConfig::reset(int clear) { switch(clear) { case RESET_ALL : - x = 50; - y = 50; + x = xS(50); + y = yS(50); radius = 0; steps = 1; r = 1; @@ -46,9 +46,9 @@ void ZoomBlurConfig::reset(int clear) b = 1; a = 1; break; - case RESET_XSLIDER : x = 50; + case RESET_XSLIDER : x = xS(50); break; - case RESET_YSLIDER : y = 50; + case RESET_YSLIDER : y = yS(50); break; case RESET_RADIUS : radius = 0; break; @@ -56,8 +56,8 @@ void ZoomBlurConfig::reset(int clear) break; case RESET_DEFAULT_SETTINGS : default: - x = 50; - y = 50; + x = xS(50); + y = yS(50); radius = 10; steps = 10; r = 1; @@ -124,10 +124,10 @@ void ZoomBlurConfig::interpolate(ZoomBlurConfig &prev, ZoomBlurWindow::ZoomBlurWindow(ZoomBlurMain *plugin) : PluginClientWindow(plugin, - 280, - 370, - 280, - 370, + xS(280), + yS(370), + xS(280), + yS(370), 0) { this->plugin = plugin; @@ -139,46 +139,48 @@ ZoomBlurWindow::~ZoomBlurWindow() void ZoomBlurWindow::create_objects() { - int x = 10, y = 10; - int x1 = 0; int clrBtn_w = 50; - int defaultBtn_w = 100; + int xs10 = xS(10), xs50 = xS(50), xs100 = xS(100); + int ys10 = yS(10), ys20 = yS(20), ys30 = yS(30), ys40 = yS(40); + int x = xs10, y = ys10; + int x1 = 0; int clrBtn_w = xs50; + int defaultBtn_w = xs100; add_subwindow(new BC_Title(x, y, _("X:"))); - y += 20; + y += ys20; add_subwindow(this->x = new ZoomBlurSize(plugin, x, y, &plugin->config.x, 0, 100)); - x1 = x + this->x->get_w() + 10; + x1 = x + this->x->get_w() + xs10; add_subwindow(xClr = new ZoomBlurSliderClr(plugin, this, x1, y, clrBtn_w, RESET_XSLIDER)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("Y:"))); - y += 20; + y += ys20; add_subwindow(this->y = new ZoomBlurSize(plugin, x, y, &plugin->config.y, 0, 100)); add_subwindow(yClr = new ZoomBlurSliderClr(plugin, this, x1, y, clrBtn_w, RESET_YSLIDER)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("Radius:"))); - y += 20; + y += ys20; add_subwindow(radius = new ZoomBlurSize(plugin, x, y, &plugin->config.radius, -100, 100)); add_subwindow(radiusClr = new ZoomBlurSliderClr(plugin, this, x1, y, clrBtn_w, RESET_RADIUS)); - y += 30; + y += ys30; add_subwindow(new BC_Title(x, y, _("Steps:"))); - y += 20; + y += ys20; add_subwindow(steps = new ZoomBlurSize(plugin, x, y, &plugin->config.steps, 1, 100)); add_subwindow(stepsClr = new ZoomBlurSliderClr(plugin, this, x1, y, clrBtn_w, RESET_STEPS)); - y += 30; + y += ys30; add_subwindow(r = new ZoomBlurToggle(plugin, x, y, &plugin->config.r, _("Red"))); - y += 30; + y += ys30; add_subwindow(g = new ZoomBlurToggle(plugin, x, y, &plugin->config.g, _("Green"))); - y += 30; + y += ys30; add_subwindow(b = new ZoomBlurToggle(plugin, x, y, &plugin->config.b, _("Blue"))); - y += 30; + y += ys30; add_subwindow(a = new ZoomBlurToggle(plugin, x, y, &plugin->config.a, _("Alpha"))); - y += 40; + y += ys40; add_subwindow(reset = new ZoomBlurReset(plugin, this, x, y)); add_subwindow(default_settings = new ZoomBlurDefaultSettings(plugin, this, - (280 - 10 - defaultBtn_w), y, defaultBtn_w)); + (xS(280) - xS(10) - defaultBtn_w), y, defaultBtn_w)); show_window(); flush(); @@ -250,7 +252,7 @@ ZoomBlurSize::ZoomBlurSize(ZoomBlurMain *plugin, int *output, int min, int max) - : BC_ISlider(x, y, 0, 200, 200, min, max, *output) + : BC_ISlider(x, y, 0, xS(200), yS(200), min, max, *output) { this->plugin = plugin; this->output = output;