Commit b6babc16 authored by Claes Sjöfors's avatar Claes Sjöfors

Glow buffer_background virtual function bugfix

parent 235be748
...@@ -137,7 +137,7 @@ class GlowDraw { ...@@ -137,7 +137,7 @@ class GlowDraw {
virtual void draw_background( GlowWind *wind, int x, int y, int w, int h) {} virtual void draw_background( GlowWind *wind, int x, int y, int w, int h) {}
virtual int create_buffer( GlowWind *w) {return 1;} virtual int create_buffer( GlowWind *w) {return 1;}
virtual void delete_buffer( GlowWind *w) {} virtual void delete_buffer( GlowWind *w) {}
virtual void buffer_background( GlowWind *w) {} virtual void buffer_background( DrawWind *w) {}
virtual int export_image( char *filename) { return 1;} virtual int export_image( char *filename) { return 1;}
virtual int print( char *filename, double x0, double x1, int end) { return 1;} virtual int print( char *filename, double x0, double x1, int end) { return 1;}
//virtual void set_clip( DrawWind *w, GC gc) {} //virtual void set_clip( DrawWind *w, GC gc) {}
......
...@@ -1116,7 +1116,6 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h) ...@@ -1116,7 +1116,6 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
scale_x = (x2 - select_rect_stored_ll_x) / (select_rect_stored_ur_x - select_rect_stored_ll_x); scale_x = (x2 - select_rect_stored_ll_x) / (select_rect_stored_ur_x - select_rect_stored_ll_x);
scale_y = (y2 - select_rect_stored_ll_y) / (select_rect_stored_ur_y - select_rect_stored_ll_y); scale_y = (y2 - select_rect_stored_ll_y) / (select_rect_stored_ur_y - select_rect_stored_ll_y);
} }
break; break;
case glow_eScaleType_Down: case glow_eScaleType_Down:
if ( select_rect_start_y == select_rect_stored_ll_y) if ( select_rect_start_y == select_rect_stored_ll_y)
...@@ -1190,7 +1189,7 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h) ...@@ -1190,7 +1189,7 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
x2 = select_rect_stored_ll_x + x2 = select_rect_stored_ll_x +
scale_x * (select_rect_stored_ur_x - select_rect_stored_ll_x); scale_x * (select_rect_stored_ur_x - select_rect_stored_ll_x);
y2 = select_rect_stored_ur_y; y2 = select_rect_stored_ur_y;
break;
if ( grid_on) { if ( grid_on) {
double fx, fy; double fx, fy;
find_grid( (double)(x2 + mw.offset_x) / mw.zoom_factor_x, find_grid( (double)(x2 + mw.offset_x) / mw.zoom_factor_x,
...@@ -1199,7 +1198,6 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h) ...@@ -1199,7 +1198,6 @@ int GrowCtx::event_handler( glow_eEvent event, int x, int y, int w, int h)
scale_x = (x2 - select_rect_stored_ll_x) / (select_rect_stored_ur_x - select_rect_stored_ll_x); scale_x = (x2 - select_rect_stored_ll_x) / (select_rect_stored_ur_x - select_rect_stored_ll_x);
} }
break;
case glow_eScaleType_Right: case glow_eScaleType_Right:
if ( select_rect_start_x == select_rect_stored_ur_x) if ( select_rect_start_x == select_rect_stored_ur_x)
return 1; return 1;
...@@ -2555,7 +2553,7 @@ void GrowCtx::draw( GlowWind *w, int ll_x, int ll_y, int ur_x, int ur_y) ...@@ -2555,7 +2553,7 @@ void GrowCtx::draw( GlowWind *w, int ll_x, int ll_y, int ur_x, int ur_y)
if ( redraw_callback) if ( redraw_callback)
(redraw_callback) ( redraw_data); (redraw_callback) ( redraw_data);
if ( w->double_buffer_on()) if ( w->double_buffer_on())
gdraw->buffer_background( w); gdraw->buffer_background( w->window);
for ( i = 0; i < a.a_size; i++) { for ( i = 0; i < a.a_size; i++) {
if ( a.a[i]->type() == glow_eObjectType_Con) if ( a.a[i]->type() == glow_eObjectType_Con)
a.a[i]->draw( w, ll_x, ll_y, ur_x, ur_y); a.a[i]->draw( w, ll_x, ll_y, ur_x, ur_y);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment