diff options
| -rw-r--r-- | CHANGES | 6 | ||||
| -rw-r--r-- | FL/filename.H | 5 | ||||
| -rw-r--r-- | documentation/drawing.html | 41 | ||||
| -rw-r--r-- | documentation/migration.html | 4 | ||||
| -rw-r--r-- | src/Fl_Bitmap.cxx | 8 | ||||
| -rw-r--r-- | src/Fl_Image.cxx | 8 | ||||
| -rw-r--r-- | src/Fl_Pixmap.cxx | 8 |
7 files changed, 66 insertions, 14 deletions
@@ -1,5 +1,11 @@ CHANGES IN FLTK 1.1.3 + - Documentation updates. + - Added backward-compatibility macro for + filename_setext(). + - Fl_Bitmap::copy(), Fl_Pixmap::copy(), and + Fl_RGB_Image::copy() all could overflow the source + image when scaling the image. - Double/triple clicks in Fl_Input fields didn't copy the expanded selection to the clipboard. - Fl_Glut_Window and Fl_Gl_Window didn't always initialize diff --git a/FL/filename.H b/FL/filename.H index 86e1910bb..b9edb9bdb 100644 --- a/FL/filename.H +++ b/FL/filename.H @@ -1,5 +1,5 @@ /* - * "$Id: filename.H,v 1.11.2.4.2.10 2002/07/08 15:20:57 easysw Exp $" + * "$Id: filename.H,v 1.11.2.4.2.11 2002/12/19 21:34:25 easysw Exp $" * * Filename header file for the Fast Light Tool Kit (FLTK). * @@ -109,6 +109,7 @@ FL_EXPORT int fl_filename_list(const char *d, struct dirent ***l, # define filename_match fl_filename_match # define filename_name fl_filename_name # define filename_relative fl_filename_relative +# define filename_setext fl_filename_setext # define numericsort fl_numericsort # endif /* FLTK_1_0_COMPAT */ @@ -116,5 +117,5 @@ FL_EXPORT int fl_filename_list(const char *d, struct dirent ***l, #endif /* FL_FILENAME_H */ /* - * End of "$Id: filename.H,v 1.11.2.4.2.10 2002/07/08 15:20:57 easysw Exp $". + * End of "$Id: filename.H,v 1.11.2.4.2.11 2002/12/19 21:34:25 easysw Exp $". */ diff --git a/documentation/drawing.html b/documentation/drawing.html index c3f8d7ca8..e88eed887 100644 --- a/documentation/drawing.html +++ b/documentation/drawing.html @@ -46,6 +46,8 @@ following types of drawing functions: <UL> + <LI><A href="#boxdraw">Boxes</A></LI> + <LI><A href="#clipping">Clipping</A></LI> <LI><A href="#colors">Colors</A></LI> @@ -64,6 +66,45 @@ following types of drawing functions: </UL> +<H3><A name="boxdraw">Boxes</A></H3> + +<P>FLTK provides three functions that can be used to draw boxes +for buttons and other UI controls. Each function uses the +supplied upper-lefthand corner and width and height to determine +where to draw the box. + +<H4><A NAME="fl_draw_box">void fl_draw_box(Fl_Boxtype b, int x, int y, int w, int h, Fl_Color c);</A></H4> + +<P>The first box drawing function is <CODE>fl_draw_box()</CODE> +which draws a standard boxtype <CODE>c</CODE> in the specified +color <CODE>c</CODE>. + +<H4><A NAME="fl_frame">void fl_frame(const char *s, int x, int y, int w, int h);</A></H4> + +<P>The <CODE>fl_frame()</CODE> function draws a series of line +segments around the given box. The string <CODE>s</CODE> must +contain groups of 4 letters which specify one of 24 standard +grayscale values, where 'A' is black and 'X' is white. The order +of each set of 4 characters is: top, left, bottom, right. The +results of calling <CODE>fl_frame()</CODE> with a string that is +not a multiple of 4 characters in length are undefined. + +<P>The only difference between this function and +<CODE>fl_frame2()</CODE> is the order of the line segments. + +<H4><A NAME="fl_frame2">void fl_frame2(const char *s, int x, int y, int w, int h);</A></H4> + +<P>The <CODE>fl_frame2()</CODE> function draws a series of line +segments around the given box. The string <CODE>s</CODE> must +contain groups of 4 letters which specify one of 24 standard +grayscale values, where 'A' is black and 'X' is white. The order +of each set of 4 characters is: bottom, right, top, left. The +results of calling <CODE>fl_frame2()</CODE> with a string that is +not a multiple of 4 characters in length are undefined. + +<P>The only difference between this function and +<CODE>fl_frame()</CODE> is the order of the line segments. + <H3><A name="clipping">Clipping</A></H3> <P>You can limit all your drawing to a rectangular region by calling diff --git a/documentation/migration.html b/documentation/migration.html index 9e50b0533..be0f283a1 100644 --- a/documentation/migration.html +++ b/documentation/migration.html @@ -92,6 +92,10 @@ symbol on the command-line when you compile <TD>fl_filename_relative()</TD> </TR> <TR> + <TD>filename_setext()</TD> + <TD>fl_filename_setext()</TD> +</TR> +<TR> <TD>frame()</TD> <TD>fl_frame()</TD> </TR> diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index c4d8a8f73..6989fb753 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.19 2002/11/19 16:37:34 easysw Exp $" +// "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.20 2002/12/19 21:34:25 easysw Exp $" // // Bitmap drawing routines for the Fast Light Tool Kit (FLTK). // @@ -437,8 +437,8 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) { memset(new_array, 0, H * (W + 7) / 8); // Scale the image using a nearest-neighbor algorithm... - for (dy = H, sy = 0, yerr = H / 2, new_ptr = new_array; dy > 0; dy --) { - for (dx = W, xerr = W / 2, old_ptr = array + sy * (w() + 7) / 8, sx = 0, new_bit = 128; + 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; dx > 0; dx --) { old_bit = (uchar)(128 >> (sx & 7)); @@ -474,5 +474,5 @@ Fl_Image *Fl_Bitmap::copy(int W, int H) { // -// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.19 2002/11/19 16:37:34 easysw Exp $". +// End of "$Id: Fl_Bitmap.cxx,v 1.5.2.4.2.20 2002/12/19 21:34:25 easysw Exp $". // diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx index 46b45d8d5..eb9135ecf 100644 --- a/src/Fl_Image.cxx +++ b/src/Fl_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Image.cxx,v 1.5.2.3.2.25 2002/11/19 16:37:35 easysw Exp $" +// "$Id: Fl_Image.cxx,v 1.5.2.3.2.26 2002/12/19 21:34:25 easysw Exp $" // // Image drawing code for the Fast Light Tool Kit (FLTK). // @@ -169,8 +169,8 @@ Fl_Image *Fl_RGB_Image::copy(int W, int H) { new_image->alloc_array = 1; // Scale the image using a nearest-neighbor algorithm... - for (dy = H, sy = 0, yerr = H / 2, new_ptr = new_array; dy > 0; dy --) { - for (dx = W, xerr = W / 2, old_ptr = array + sy * (w() * d() + ld()); + for (dy = H, sy = 0, yerr = H, new_ptr = new_array; dy > 0; dy --) { + for (dx = W, xerr = W, old_ptr = array + sy * (w() * d() + ld()); dx > 0; dx --) { for (c = 0; c < d(); c ++) *new_ptr++ = old_ptr[c]; @@ -392,5 +392,5 @@ void Fl_RGB_Image::label(Fl_Menu_Item* m) { // -// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.25 2002/11/19 16:37:35 easysw Exp $". +// End of "$Id: Fl_Image.cxx,v 1.5.2.3.2.26 2002/12/19 21:34:25 easysw Exp $". // diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 4b706579d..c1b038277 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $" +// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.24 2002/12/19 21:34:26 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -279,11 +279,11 @@ Fl_Image *Fl_Pixmap::copy(int W, int H) { } // Scale the image using a nearest-neighbor algorithm... - for (dy = H, sy = 0, yerr = H / 2; dy > 0; dy --, new_row ++) { + for (dy = H, sy = 0, yerr = H; dy > 0; dy --, new_row ++) { *new_row = new char[chars_per_line]; new_ptr = *new_row; - for (dx = W, xerr = W / 2, old_ptr = data()[sy + ncolors + 1]; + for (dx = W, xerr = W, old_ptr = data()[sy + ncolors + 1]; dx > 0; dx --) { for (c = 0; c < chars_per_pixel; c ++) *new_ptr++ = old_ptr[c]; @@ -461,5 +461,5 @@ void Fl_Pixmap::desaturate() { } // -// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.23 2002/11/19 16:37:35 easysw Exp $". +// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.24 2002/12/19 21:34:26 easysw Exp $". // |
