- Fixed Fl_Bitmap::copy code according to Stephans suggestions. Thanks! Good catch.

- Fixed some minor alignment in Fluid.
- Live Mode window in Fluid is now double buffered to get rid of flicker.



git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4415 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Matthias Melcher 2005-07-14 13:16:17 +00:00
parent 52960ea903
commit 7f526e1362
5 changed files with 13 additions and 12 deletions

View File

@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR - Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745) #744, STR #745)
- Fixed bitmap scaling code
- Fixed tiny memory leak (STR #878) - Fixed tiny memory leak (STR #878)
- Fixed hang on corrupt jpeg (STR #915) - Fixed hang on corrupt jpeg (STR #915)
- Fixed static allocation of font buffer in demo (STR #909) - Fixed static allocation of font buffer in demo (STR #909)

View File

@ -1504,7 +1504,7 @@ void live_mode_cb(Fl_Button*o,void *v) {
Fl_Group::current(0); Fl_Group::current(0);
int w = live_widget->w(); int w = live_widget->w();
int h = live_widget->h(); int h = live_widget->h();
live_window = new Fl_Window(w+20, h+55, "Fluid Live Mode Widget"); live_window = new Fl_Double_Window(w+20, h+55, "Fluid Live Mode Widget");
live_window->box(FL_FLAT_BOX); live_window->box(FL_FLAT_BOX);
live_window->color(FL_GREEN); live_window->color(FL_GREEN);
Fl_Group *rsz = new Fl_Group(0, h+20, 130, 35); Fl_Group *rsz = new Fl_Group(0, h+20, 130, 35);

View File

@ -51,12 +51,12 @@ Fl_Double_Window* make_widget_panel() {
w = o; w = o;
o->labelsize(11); o->labelsize(11);
w->hotspot(o); w->hotspot(o);
{ Fl_Tabs* o = new Fl_Tabs(3, 5, 402, 310); { Fl_Tabs* o = new Fl_Tabs(5, 5, 400, 310);
o->selection_color((Fl_Color)4); o->selection_color((Fl_Color)4);
o->labelsize(11); o->labelsize(11);
o->callback((Fl_Callback*)cb_); o->callback((Fl_Callback*)cb_);
o->when(FL_WHEN_NEVER); o->when(FL_WHEN_NEVER);
{ Fl_Group* o = new Fl_Group(3, 25, 402, 290, "GUI"); { Fl_Group* o = new Fl_Group(5, 25, 400, 290, "GUI");
o->labelsize(11); o->labelsize(11);
o->callback((Fl_Callback*)propagate_load); o->callback((Fl_Callback*)propagate_load);
o->when(FL_WHEN_NEVER); o->when(FL_WHEN_NEVER);
@ -387,7 +387,7 @@ Fl_Double_Window* make_widget_panel() {
o->end(); o->end();
Fl_Group::current()->resizable(o); Fl_Group::current()->resizable(o);
} }
{ Fl_Group* o = new Fl_Group(3, 25, 402, 290, "Style"); { Fl_Group* o = new Fl_Group(5, 25, 400, 290, "Style");
o->labelsize(11); o->labelsize(11);
o->callback((Fl_Callback*)propagate_load); o->callback((Fl_Callback*)propagate_load);
o->when(FL_WHEN_NEVER); o->when(FL_WHEN_NEVER);

View File

@ -39,12 +39,12 @@ Function {make_widget_panel()} {open
} { } {
Fl_Tabs {} { Fl_Tabs {} {
callback {propagate_load((Fl_Group *)o,v);} open callback {propagate_load((Fl_Group *)o,v);} open
xywh {3 5 402 310} selection_color 4 labelsize 11 when 0 resizable xywh {5 5 400 310} selection_color 4 labelsize 11 when 0 resizable
} { } {
Fl_Group {} { Fl_Group {} {
label GUI label GUI
callback propagate_load callback propagate_load
xywh {3 25 402 290} labelsize 11 when 0 resizable xywh {5 25 400 290} labelsize 11 when 0 resizable
} { } {
Fl_Group {} { Fl_Group {} {
callback propagate_load callback propagate_load
@ -290,7 +290,7 @@ Function {make_widget_panel()} {open
Fl_Group {} { Fl_Group {} {
label Style label Style
callback propagate_load callback propagate_load
xywh {3 25 402 290} labelsize 11 when 0 hide xywh {5 25 400 290} labelsize 11 when 0 hide
} { } {
Fl_Group {} { Fl_Group {} {
callback propagate_load callback propagate_load

View File

@ -476,15 +476,15 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
// Scale the image using a nearest-neighbor algorithm... // Scale the image using a nearest-neighbor algorithm...
for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) { for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) {
for (dx = W, xerr = W, old_ptr = array + sy * (w() + 7) / 8, sx = 0, new_bit = 128; for (dx = W, xerr = W, old_ptr = array + sy * ((w() + 7) / 8), sx = 0, new_bit = 1;
dx > 0; dx > 0;
dx --) { dx --) {
old_bit = (uchar)(128 >> (sx & 7)); old_bit = (uchar)(1 << (sx & 7));
if (old_ptr[sx / 8] & old_bit) *new_ptr |= new_bit; if (old_ptr[sx / 8] & old_bit) *new_ptr |= new_bit;
if (new_bit > 1) new_bit >>= 1; if (new_bit < 128) new_bit <<= 1;
else { else {
new_bit = 128; new_bit = 1;
new_ptr ++; new_ptr ++;
} }
@ -497,7 +497,7 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
} }
} }
if (new_bit < 128) new_ptr ++; if (new_bit > 1) new_ptr ++;
sy += ystep; sy += ystep;
yerr -= ymod; yerr -= ymod;