additional patchgui height icons, perspective test for zero area, es.po update
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / perspective / perspective.C
index c98e9b06baa5d9b2ce589bc20c297eddd9512d35..3bfa66fe7f13e7164fa7d2c53b725082074b41d1 100644 (file)
@@ -33,9 +33,9 @@ REGISTER_PLUGIN(PerspectiveMain)
 PerspectiveConfig::PerspectiveConfig()
 {
        x1 = 0;    y1 = 0;
-       x2 = xS(100);  y2 = 0;
-       x3 = xS(100);  y3 = yS(100);
-       x4 = 0;    y4 = yS(100);
+       x2 = 100;  y2 = 0;
+       x3 = 100;  y3 = 100;
+       x4 = 0;    y4 = 100;
        mode = AffineEngine::PERSPECTIVE;
        smoothing = AffineEngine::AF_DEFAULT;
        window_w = PERSPECTIVE_WIDTH;
@@ -810,6 +810,12 @@ int PerspectiveMain::process_buffer(VFrame *frame,
            EQUIV(config.x3, 100) && EQUIV(config.y3, 100) &&
            EQUIV(config.x4, 0)   && EQUIV(config.y4, 100) )
                return 1;
+       if( config.mode == AffineEngine::PERSPECTIVE &&
+           ( (EQUIV(config.x1, config.x2) && EQUIV(config.x3, config.x4)) ||
+             (EQUIV(config.y1, config.y3) && EQUIV(config.y2, config.y4)) ) ) {
+               frame->clear_frame();
+               return 0;
+       }
 
        if( !engine ) {
                int cpus = get_project_smp() + 1;