X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fviewer.c;h=8967b9cbc4a645f26a9ae383d1f09ba9b24949ef;hb=6daddf39485747a5aa004a3a0a7d7a893807def1;hp=3494d19df0b4ee45d450d609da3831403ab92368;hpb=e8d9022f32f7fedb8de1c86231d5db506ba8411f;p=libopano.git diff --git a/src/viewer.c b/src/viewer.c index 3494d19..8967b9c 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -286,7 +286,7 @@ int main( int argc, char** argv ) 1); visual_g = DefaultVisual(disp_g, screen_g); - pl_extract_view (view, pano, pitch, yaw, fov); + pl_extract_view (view, pano, pitch, yaw, fov, BILINEAR); draw_window (view); done = 0; @@ -341,8 +341,6 @@ int main( int argc, char** argv ) case ConfigureNotify: { XConfigureEvent *cev = (XConfigureEvent *) &event; - printf ("XConfigureEvent received: width = %i; height = %i;\n", - cev->width, cev->height); ui_destroy (view); view = ui_create (cev->width, cev->height); @@ -434,6 +432,9 @@ int main( int argc, char** argv ) case ButtonRelease: btn_current_pressed = 0; + /* Re-draw the image (when no button is pressed better interpolation is + * used. */ + isChanged = 1; break; case MotionNotify: @@ -495,7 +496,8 @@ int main( int argc, char** argv ) if (isChanged != 0) { - pl_extract_view (view, pano, pitch, yaw, fov); + pl_extract_view (view, pano, pitch, yaw, fov, + (btn_current_pressed == 0) ? BILINEAR : NNEIGHBOUR); draw_window (view); } } /* while (done == 0) */