[Cin] Canvas.C

Andrew Randrianasulu randrianasulu at gmail.com
Tue Mar 3 03:27:29 CET 2020


..more debug

So, after looking at things with gdb (as suggested by Bill)

I enabled some more debug this time in canvas.C:

diff --git a/cinelerra-5.1/cinelerra/canvas.C b/cinelerra-5.1/cinelerra/canvas.C
index 17d5a42..8bfa594 100644
--- a/cinelerra-5.1/cinelerra/canvas.C
+++ b/cinelerra-5.1/cinelerra/canvas.C
@@ -368,9 +368,12 @@ int Canvas::get_scrollbars(EDL *edl)
        h_needed = h_visible = edl ? edl->session->output_h : view_h;

        int need_xscroll = 0, need_yscroll = 0;
+       printf("Canvas::get_scrollbars\n");
        if( edl && use_scrollbars ) {
                float zoom_x, zoom_y, conformed_w, conformed_h;
+               printf("before get_zoom\n");
                get_zooms(edl, 0, zoom_x, zoom_y, conformed_w, conformed_h);
+               printf("after get_zoom\n");
                w_visible = canvas_w / zoom_x;
                h_visible = canvas_h / zoom_y;
                float output_x = 0, output_y = 0;
@@ -381,6 +384,7 @@ int Canvas::get_scrollbars(EDL *edl)
                output_to_canvas(edl, 0, output_x, output_y);
                if( output_x > canvas_w ) need_xscroll = 1;
                if( output_y > canvas_h ) need_yscroll = 1;
+               printf("Need xscrool, %i , need_yscroll %i \n", need_xscroll, need_yscroll);
                if( need_xscroll ) {
                        canvas_h -= BC_ScrollBar::get_span(SCROLL_HORIZ);
                        h_visible = canvas_h / zoom_y;
@@ -438,6 +442,7 @@ int Canvas::get_scrollbars(EDL *edl)

 void Canvas::update_geometry(EDL *edl, int x, int y, int w, int h)
 {
+       printf("Canvas::update_geometry\n");
        int redraw = 0;
        if( this->x != x || this->y != y ||
            this->w != w || this->h != h )
@@ -452,9 +457,9 @@ void Canvas::reposition_window(EDL *edl, int x, int y, int w, int h)
 {
        this->x = view_x = x;  this->y = view_y = y;
        this->w = view_w = w;  this->h = view_h = h;
-//printf("Canvas::reposition_window 1\n");
+printf("Canvas::reposition_window 1\n");
        get_scrollbars(edl);
-//printf("Canvas::reposition_window %d %d %d %d\n", view_x, view_y, view_w, view_h);
+printf("Canvas::reposition_window %d %d %d %d\n", view_x, view_y, view_w, view_h);
        if( canvas_subwindow ) {
                canvas_subwindow->reposition_window(view_x, view_y, view_w, view_h);

---

and it runs up to:

BC_WindowBase::dispatch_event 956 Cinelerra: Составитель 0xe0445600 4 (ButtonPress)
CTimeBar:pixel_to_Position
CTimeBar: pixel, 83
CTimebar:pix_to_pos: Got EDL!
CTimebar:pix_to_pos: prev_start 0.000000, prev_end -1.000000
CTimeBar:pixel_to_pos start, 0, end 0
BC_WindowBase::dispatch_event this=0xd36fcc8 1360
Canvas::update_geometry
Canvas::get_scrollbars
before get_zoom
after get_zoom
Need xscrool, 1 , need_yscroll 1
Canvas::reposition_window 1
Canvas::get_scrollbars
before get_zoom
after get_zoom
Need xscrool, 1 , need_yscroll 1
Canvas::reposition_window 23 0 959 552
BC_WindowBase::dispatch_event this=0xe2f10450 1360
BC_WindowBase::dispatch_event this=0xd6373a0 1360
BC_WindowBase::dispatch_event this=0xd70da30 1360
BC_WindowBase::dispatch_event this=0xd36fcc8 1360
BC_WindowBase::dispatch_event this=0xd43ca60 1360
BC_WindowBase::dispatch_event this=0xd36fcc8 1360



More information about the Cin mailing list