mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 13:55:38 +08:00
Fix indenting, add comments for clarity
no operative code changes in this commit
This commit is contained in:
@@ -172,7 +172,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
|
|||||||
static U32* buffer;
|
static U32* buffer;
|
||||||
static long buffer_size;
|
static long buffer_size;
|
||||||
int blocking = h;
|
int blocking = h;
|
||||||
{int size = linesize*h;
|
{
|
||||||
|
int size = linesize * h;
|
||||||
// when printing, don't limit buffer size not to get a crash in StretchDIBits
|
// when printing, don't limit buffer size not to get a crash in StretchDIBits
|
||||||
if (size > MAXBUFFER && !fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) {
|
if (size > MAXBUFFER && !fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) {
|
||||||
size = MAXBUFFER;
|
size = MAXBUFFER;
|
||||||
@@ -182,7 +183,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
|
|||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
buffer_size = size;
|
buffer_size = size;
|
||||||
buffer = new U32[(size + 3) / 4];
|
buffer = new U32[(size + 3) / 4];
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
bmi.bmiHeader.biHeight = blocking;
|
bmi.bmiHeader.biHeight = blocking;
|
||||||
static U32* line_buffer;
|
static U32* line_buffer;
|
||||||
if (!buf) {
|
if (!buf) {
|
||||||
@@ -250,7 +252,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // for (k = 0; j<h && k<blocking ...)
|
||||||
|
|
||||||
if (fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) {
|
if (fl_graphics_driver->has_feature(Fl_Graphics_Driver::PRINTER)) {
|
||||||
// if print context, device and logical units are not equal, so SetDIBitsToDevice
|
// if print context, device and logical units are not equal, so SetDIBitsToDevice
|
||||||
// does not do the expected job, whereas StretchDIBits does it.
|
// does not do the expected job, whereas StretchDIBits does it.
|
||||||
@@ -278,7 +281,7 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
|
|||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
} // for (int j=0; j<h; )
|
||||||
}
|
}
|
||||||
|
|
||||||
void Fl_GDI_Graphics_Driver::draw_image_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l){
|
void Fl_GDI_Graphics_Driver::draw_image_unscaled(const uchar* buf, int x, int y, int w, int h, int d, int l){
|
||||||
|
|||||||
Reference in New Issue
Block a user