From b650366d80e58cf3154c5bdf8ceb6a242c1a0251 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 24 Nov 2001 18:07:58 +0000 Subject: Added XBM, XPM, and PNM image file classes. The pixmap_browser demo now supports all image formats via Fl_Shared_Image. Dropped image file stuff from image demo. Added Fl_Tiled_Image class, which tiles an Fl_Image, useful for tiling a background image in groups. Added tiled_image demo. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1725 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/image.cxx | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'test/image.cxx') diff --git a/test/image.cxx b/test/image.cxx index 31205eb00..3a7baebbe 100644 --- a/test/image.cxx +++ b/test/image.cxx @@ -1,5 +1,5 @@ // -// "$Id: image.cxx,v 1.6.2.3.2.4 2001/11/24 02:46:19 easysw Exp $" +// "$Id: image.cxx,v 1.6.2.3.2.5 2001/11/24 18:07:57 easysw Exp $" // // Fl_Image test program for the Fast Light Tool Kit (FLTK). // @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include #include @@ -96,9 +96,9 @@ int arg(int argc, char **argv, int &i) { } int main(int argc, char **argv) { +#ifndef WIN32 int i = 1; -#ifndef WIN32 Fl::args(argc,argv,i,arg); if (visid >= 0) { @@ -123,21 +123,11 @@ int main(int argc, char **argv) { window.color(FL_WHITE); Fl_Button b(140,160,120,120,"Image w/Alpha"); ::b = &b; - Fl_Image *rgb; + Fl_RGB_Image *rgb; Fl_Image *dergb; - if (argv[1]) { - rgb = Fl_Shared_Image::get(argv[1]); - if (rgb->w() > 100 || rgb->h() > 100) { - if (rgb->w() > rgb->h()) rgb = rgb->copy(100, 100 * rgb->h() / rgb->w()); - else rgb = rgb->copy(100 * rgb->w() / rgb->h(), 100); - } - b.label(argv[1]); - } else { - make_image(); - rgb = new Fl_RGB_Image(image, width, height,4); - } - + make_image(); + rgb = new Fl_RGB_Image(image, width, height,4); dergb = rgb->copy(); dergb->inactive(); @@ -165,5 +155,5 @@ int main(int argc, char **argv) { } // -// End of "$Id: image.cxx,v 1.6.2.3.2.4 2001/11/24 02:46:19 easysw Exp $". +// End of "$Id: image.cxx,v 1.6.2.3.2.5 2001/11/24 18:07:57 easysw Exp $". // -- cgit v1.2.3