- 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:
parent
52960ea903
commit
7f526e1362
1
CHANGES
1
CHANGES
@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7
|
||||
|
||||
- Documentation fixes (STR #648, STR #692, STR #730, STR
|
||||
#744, STR #745)
|
||||
- Fixed bitmap scaling code
|
||||
- Fixed tiny memory leak (STR #878)
|
||||
- Fixed hang on corrupt jpeg (STR #915)
|
||||
- Fixed static allocation of font buffer in demo (STR #909)
|
||||
|
@ -1504,7 +1504,7 @@ void live_mode_cb(Fl_Button*o,void *v) {
|
||||
Fl_Group::current(0);
|
||||
int w = live_widget->w();
|
||||
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->color(FL_GREEN);
|
||||
Fl_Group *rsz = new Fl_Group(0, h+20, 130, 35);
|
||||
|
@ -51,12 +51,12 @@ Fl_Double_Window* make_widget_panel() {
|
||||
w = o;
|
||||
o->labelsize(11);
|
||||
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->labelsize(11);
|
||||
o->callback((Fl_Callback*)cb_);
|
||||
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->callback((Fl_Callback*)propagate_load);
|
||||
o->when(FL_WHEN_NEVER);
|
||||
@ -387,7 +387,7 @@ Fl_Double_Window* make_widget_panel() {
|
||||
o->end();
|
||||
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->callback((Fl_Callback*)propagate_load);
|
||||
o->when(FL_WHEN_NEVER);
|
||||
|
@ -39,12 +39,12 @@ Function {make_widget_panel()} {open
|
||||
} {
|
||||
Fl_Tabs {} {
|
||||
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 {} {
|
||||
label GUI
|
||||
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 {} {
|
||||
callback propagate_load
|
||||
@ -290,7 +290,7 @@ Function {make_widget_panel()} {open
|
||||
Fl_Group {} {
|
||||
label Style
|
||||
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 {} {
|
||||
callback propagate_load
|
||||
|
@ -476,15 +476,15 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) {
|
||||
|
||||
// Scale the image using a nearest-neighbor algorithm...
|
||||
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 --) {
|
||||
old_bit = (uchar)(128 >> (sx & 7));
|
||||
old_bit = (uchar)(1 << (sx & 7));
|
||||
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 {
|
||||
new_bit = 128;
|
||||
new_bit = 1;
|
||||
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;
|
||||
yerr -= ymod;
|
||||
|
Loading…
Reference in New Issue
Block a user