summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-11-24 18:07:58 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-11-24 18:07:58 +0000
commitb650366d80e58cf3154c5bdf8ceb6a242c1a0251 (patch)
treec71ef9770b24f56c44495006426739adfa89c99e /test
parente016a249b25c77b38d77d3a26d563cdec7a2592b (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/Makefile82
-rw-r--r--test/image.cxx24
-rw-r--r--test/pixmap_browser.cxx120
-rw-r--r--test/tile.xpm120
-rw-r--r--test/tiled_image.cxx103
5 files changed, 317 insertions, 132 deletions
diff --git a/test/Makefile b/test/Makefile
index 9e6dc2256..84b4b554f 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,5 +1,5 @@
#
-# "$Id: Makefile,v 1.19.2.7.2.11 2001/11/24 02:46:19 easysw Exp $"
+# "$Id: Makefile,v 1.19.2.7.2.12 2001/11/24 18:07:57 easysw Exp $"
#
# Test/example program makefile for the Fast Light Tool Kit (FLTK).
#
@@ -26,20 +26,66 @@
include ../makeinclude
CPPFILES =\
- CubeMain.cxx CubeView.cxx adjuster.cxx arc.cxx ask.cxx \
- bitmap.cxx boxtype.cxx browser.cxx button.cxx \
- buttons.cxx checkers.cxx clock.cxx colbrowser.cxx \
- color_chooser.cxx cube.cxx cursor.cxx curve.cxx demo.cxx \
- doublebuffer.cxx editor.cxx file_chooser.cxx fonts.cxx \
- forms.cxx fractals.cxx fullscreen.cxx gl_overlay.cxx \
- glpuzzle.cxx hello.cxx help.cxx iconize.cxx image.cxx input.cxx \
- keyboard.cxx label.cxx list_visuals.cxx mandelbrot.cxx \
- menubar.cxx message.cxx minimum.cxx navigation.cxx \
- output.cxx overlay.cxx pixmap.cxx pixmap_browser.cxx \
- radio.cxx resizebox.cxx scroll.cxx shape.cxx shiny.cxx \
- subwindow.cxx symbols.cxx tabs.cxx tile.cxx \
- valuators.cxx fast_slow.cxx resize.cxx pack.cxx \
- inactive.cxx line_style.cxx
+ adjuster.cxx \
+ arc.cxx \
+ ask.cxx \
+ bitmap.cxx \
+ boxtype.cxx \
+ browser.cxx \
+ button.cxx \
+ buttons.cxx \
+ checkers.cxx \
+ clock.cxx \
+ colbrowser.cxx \
+ color_chooser.cxx \
+ cube.cxx \
+ CubeMain.cxx \
+ CubeView.cxx \
+ cursor.cxx \
+ curve.cxx \
+ demo.cxx \
+ doublebuffer.cxx \
+ editor.cxx \
+ fast_slow.cxx \
+ file_chooser.cxx \
+ fonts.cxx \
+ forms.cxx \
+ fractals.cxx \
+ fullscreen.cxx \
+ gl_overlay.cxx \
+ glpuzzle.cxx \
+ hello.cxx \
+ help.cxx \
+ iconize.cxx \
+ image.cxx \
+ inactive.cxx \
+ input.cxx \
+ keyboard.cxx \
+ label.cxx \
+ line_style.cxx \
+ list_visuals.cxx \
+ mandelbrot.cxx \
+ menubar.cxx \
+ message.cxx \
+ minimum.cxx \
+ navigation.cxx \
+ output.cxx \
+ overlay.cxx \
+ pack.cxx \
+ pixmap_browser.cxx \
+ pixmap.cxx \
+ radio.cxx \
+ resizebox.cxx \
+ resize.cxx \
+ scroll.cxx \
+ shape.cxx \
+ shiny.cxx \
+ subwindow.cxx \
+ symbols.cxx \
+ tabs.cxx \
+ tile.cxx \
+ tiled_image.cxx \
+ valuators.cxx
ALL = \
adjuster$(EXEEXT) \
@@ -90,6 +136,7 @@ ALL = \
symbols$(EXEEXT) \
tabs$(EXEEXT) \
tile$(EXEEXT) \
+ tiled_image$(EXEEXT) \
valuators$(EXEEXT)
GLALL = \
@@ -129,9 +176,6 @@ file_chooser$(EXEEXT): file_chooser.cxx
help$(EXEEXT): help.cxx
echo Compiling and linking $@...
$(CXX) -I.. $(CXXFLAGS) help.cxx -o $@ $(LINKFLTK) $(LDLIBS) $(IMAGELIBS)
-image$(EXEEXT): image.cxx
- echo Compiling and linking $@...
- $(CXX) -I.. $(CXXFLAGS) image.cxx -o $@ $(LINKFLTK) $(LDLIBS) $(IMAGELIBS)
keyboard$(EXEEXT): keyboard.cxx keyboard_ui.cxx
echo Compiling and linking $@...
$(CXX) -I.. $(CXXFLAGS) keyboard.cxx $(LINKFLTK) $(LDLIBS) -o $@
@@ -192,5 +236,5 @@ uninstall:
@echo Nothing to uninstall in test directory.
#
-# End of "$Id: Makefile,v 1.19.2.7.2.11 2001/11/24 02:46:19 easysw Exp $".
+# End of "$Id: Makefile,v 1.19.2.7.2.12 2001/11/24 18:07:57 easysw Exp $".
#
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 <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
-#include <FL/Fl_Shared_Image.H>
+#include <FL/Fl_Image.H>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -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 $".
//
diff --git a/test/pixmap_browser.cxx b/test/pixmap_browser.cxx
index 3e02e9f0a..3a9a53002 100644
--- a/test/pixmap_browser.cxx
+++ b/test/pixmap_browser.cxx
@@ -1,10 +1,7 @@
//
-// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.2 2001/09/30 17:37:06 easysw Exp $"
+// "$Id: pixmap_browser.cxx,v 1.5.2.4.2.3 2001/11/24 18:07:57 easysw Exp $"
//
-// Another pixmap test program for the Fast Light Tool Kit (FLTK).
-//
-// On purpose, I do NOT provide a fltk method to turn a file
-// into a pixmap. This program uses a rather simplistic one.
+// A shared image test program for the Fast Light Tool Kit (FLTK).
//
// Copyright 1998-2001 by Bill Spitzak and others.
//
@@ -30,9 +27,7 @@
#include <FL/Fl_Box.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Button.H>
-#include <FL/Fl_Pixmap.H>
-#include <ctype.h>
-#include <stdio.h>
+#include <FL/Fl_Shared_Image.H>
#include <string.h>
#include <errno.h>
#include <FL/Fl_File_Chooser.H>
@@ -40,107 +35,39 @@
Fl_Box *b;
Fl_Window *w;
+Fl_Shared_Image *img;
-char **data;
-int sizeofdata;
-int numlines;
-static int hexdigit(int x) {
- if (isdigit(x)) return x-'0';
- if (isupper(x)) return x-'A'+10;
- if (islower(x)) return x-'a'+10;
- return 20;
-}
+static char name[1024];
-int load_file(const char *name) {
- FILE *f = fopen(name,"r");
- if (!f) {
- fl_message("Can't open %s, %s",name,strerror(errno));
- return 0;
- }
- if (data) {
- for (int i=numlines; i--;) delete[] data[i];
- }
-#define BUFSIZE 2048
- char buffer[BUFSIZE];
- int i = 0;
- while (fgets(buffer, BUFSIZE, f)) {
- if (buffer[0] != '\"') continue;
- char *p = buffer;
- char *q = buffer+1;
- while (*q != '\"') {
- if (*q == '\\') switch (*++q) {
- case '\n':
- fgets(q,(buffer+BUFSIZE)-q,f); break;
- case 0:
- break;
- case 'x': {
- q++;
- int n = 0;
- for (int x = 0; x < 3; x++) {
- int d = hexdigit(*q);
- if (d > 15) break;
- n = (n<<4)+d;
- q++;
- }
- *p++ = n;
- } break;
- default: {
- int c = *q++;
- if (c>='0' && c<='7') {
- c -= '0';
- for (int x=0; x<2; x++) {
- int d = hexdigit(*q);
- if (d>7) break;
- c = (c<<3)+d;
- q++;
- }
- }
- *p++ = c;
- } break;
- } else {
- *p++ = *q++;
- }
- }
- *p++ = 0;
- if (i >= sizeofdata) {
- sizeofdata = 2*sizeofdata+100;
- char **newdata = new char *[sizeofdata];
- for (int j=0; j<i; j++) newdata[j] = data[j];
- delete[] data;
- data = newdata;
- }
- data[i] = new char[p-buffer];
- memcpy(data[i],buffer,p-buffer);
- i++;
+void load_file(const char *n) {
+ if (img) img->release();
+
+ img = Fl_Shared_Image::get(n);
+ if (img->w() > b->w() || img->h() > b->h()) {
+ Fl_Image *temp;
+ if (img->w() > img->h()) temp = img->copy(b->w(), b->h() * img->h() / img->w());
+ else temp = img->copy(b->w() * img->w() / img->h(), b->h());
+
+ img->release();
+ img = (Fl_Shared_Image *)temp;
}
- numlines = i;
- fclose(f);
- return i;
-}
-Fl_Pixmap *pixmap;
-void newpixmap() {
- delete pixmap;
- pixmap = new Fl_Pixmap(data);
- b->image(pixmap);
+ b->label(name);
+ b->image(img);
b->redraw();
- w->redraw();
}
-static char name[1024];
-
void file_cb(const char *n) {
if (!strcmp(name,n)) return;
- if (!load_file(n)) return;
+ load_file(n);
strcpy(name,n);
w->label(name);
- newpixmap();
}
void button_cb(Fl_Widget *,void *) {
fl_file_chooser_callback(file_cb);
- fl_file_chooser("XPM file","*.xpm",name);
+ fl_file_chooser("Image file?","*.{gif,jpg,pbm,pgm,png,ppm,xbm,xpm}", name);
fl_file_chooser_callback(0);
}
@@ -152,19 +79,20 @@ int arg(int, char **argv, int &i) {
int main(int argc, char **argv) {
int i = 1;
- if (Fl::args(argc,argv,i,arg) < argc)
- Fl::fatal(" -8 # : use default visual\n%s\n",Fl::help);
+ Fl::args(argc,argv,i,arg);
Fl_Window window(400,400); ::w = &window;
Fl_Box b(0,0,window.w(),window.h()); ::b = &b;
+ b.box(FL_FLAT_BOX);
Fl_Button button(5,5,100,35,"load");
button.callback(button_cb);
if (!dvisual) Fl::visual(FL_RGB);
+ if (argv[1]) load_file(argv[1]);
window.resizable(window);
window.show(argc,argv);
return Fl::run();
}
//
-// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.2 2001/09/30 17:37:06 easysw Exp $".
+// End of "$Id: pixmap_browser.cxx,v 1.5.2.4.2.3 2001/11/24 18:07:57 easysw Exp $".
//
diff --git a/test/tile.xpm b/test/tile.xpm
new file mode 100644
index 000000000..49f17fd02
--- /dev/null
+++ b/test/tile.xpm
@@ -0,0 +1,120 @@
+/* XPM */
+static char * tile_xpm[] = {
+"100 100 17 1",
+" c None",
+". c #565656",
+"+ c #888888",
+"@ c #A8A8A8",
+"# c #8E8E8E",
+"$ c #A0A0A0",
+"% c #6E6E6E",
+"& c #727272",
+"* c #BFBFBF",
+"= c #989898",
+"- c #767676",
+"; c #7A7A7A",
+"> c #B4B4B4",
+", c #808080",
+"' c #AEAEAE",
+") c #656565",
+"! c #929292",
+"$=>$@@,++,,,-;%$$+,;+)#;*!+,+@*!,!++;+;$@;+==,#=!!$--%)++=$,!@!%#+@!>$=!+*!=%)==>>@+,$==@!))#$%;=!!*",
+"++$-,>$@!;+;-&++-,#!;++!-+#+!@$$#,,+&#=$=!==$+$#=>>>,&$#&$$#>$=,+.-''!$'*=+>+);+>*@$=--=$=,+!==,,@==",
+"!$,-,=@=$+==,+!%,#,-&=$++-)===#+##,+=+=#$@$=>''$$*@=,+#!,$=>!=$+)++)+*@=$@=,+$$$+!'**#,,,$+,=@=;==-;",
+"!,###$$);'#;$=+%;+#;++%-,=,==!)+#===========@>>>*>@!==#,+#==@$===+-;%@$=#+*>=!$$$==,*>@-+;+#$,%,@@%#",
+"+@,!=,,+!$==$++!&;+#!,%),=>!+;,=+$@=+!$==+#$!@>>>*@=;!,+#!==$$>@$!=>=$@$=+@='$!+@*+!!=*@$+,'@+%+,,@=",
+"=;&+,.-!=!=!=;+!!,!=!;)-==,++;+@>@+,#=$+!'$=#='>=*$$!+,!,#$$@!>$,#+$@@$@'@##==@$=+'$!+!$>@@*+!*+,!=!",
+"!!,,,+++&#=,+!,'!,!##!$$!-.++=@'=$$!==++==@=@>=!@@!#!+$+$===$@#+=$!=@$!@=#@+$>!=@$=!@'!=$*@$$!!====$",
+"#%)#@@+%,+!$,++=#+++,=$+-+++!$!+==$$===#+##$=@$=+$$+#=!@=,+$#!$$$$=$==$=!,,$@*$,=>-=@#$>>$+'>$@=>'!+",
+"),,-=+$!@##-,,!;,=++$@;%&,!!=$#!=!@@$$$,+==+$!==+!$$=#+!+!!+=!$!@@$=++=>!&+@$==!!!+==$*==$*@=@**$+!+",
+"!'$#,,,@$#+&)&-;===$,%;+#!==###$=#==!===>>+====$$,$$=+=-,$=;#!==$=#=;+=@===$$$=#$+=@@>$+>*@$'*@-+=%,",
+"$$$@++!!#%)+,%++>=$#%%#%=@=+=;,@$+=+=>$=='!+!##+$$!!;!=&=!##@$,+@+=+!$+-=@$,=>'+#!=@@==@>''@>>-+>$$=",
+"=,%++,@!,)),%,+=@!%++!+#,#+$=$!!='==@$$==+#$++,$$!@#$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+$+),##'>,++$$=$@@'=!,$,",
+"$$>*@>==#=#++==$$+#='=+,#$#=&)+,=+!!%+$,='=@>=+,*;)!+=$$,%++@$)%;+==,#+-++-,$#+&++$=+#$-!=@''@=;#,;-",
+"*>+=$#++@=,=;,==,#;$=+++=!=+;-,-!=#&!>%+=,@$+;$$-&&-$=@$#,-,#+--$,%-,!,+%;=$--!$=$=#!$##+$@$==!=&&-$",
+"'=$$,-=+,#$!==+!+++!@!=$+=+,-!,;$=-$=,=+,$>--=@+)%!!@#++$@$,-+-=$+%&!&;,==$+++$=$=+#==+!!@=!;$#+$$>>",
+",#=+!$-%)#==>$$,,!+=''++$+,#,##%%+@$,,,,@@#==@=,%,$$$#+;=+=$!++,-,;+,%%!@,-,,=!==!+#+==#+=+),==$='>+",
+"$+#==$);,++#=$=,=#$$==$$$!#;=+#++$',#=!==+=$=+#$#!!$#=+,!--$@+-&)-+!%)!=+--!=@=##=!$=@===!&+$#$@@=,@",
+"$$$@+++;%+=,=!=$$$$=!=$#'==#,,+!$=!=,!==@=@*=$,==$,@==,++,+=;-=!+%+%%=+&%++=$!$-++=+@$++!+++$#==++#-",
+"+=$=+=;=-#,+,,$=$'@#@=+%-@>!#,$$+@#==%,!$@'@=$$=@!!+,--=##!!,)=@#=)%,,-,+==!!,,++=+$+,!;,++=,+#%,!;+",
+"$+#'$,,+@!=%,,+!'@>@##=$+;%=@$!!$=+=$,===++!+$@*$#=,#,-==+&,!==$=+=!!%,&===!;+!#=;#!+,!+=-;+==-)#+,,",
+"+==#=$+=,,++,,+!=@$+$>$+#,==;*@=!#$-,>$'@%&->=>>$$;,!++=+,+,+@#=!#@++,#=!=+,+,+==-+-##+#,-,;-##+#!,+",
+"+=%,@=!+-&&==!$=,@$'=++=#;+$'==;+=$&!$+#'#$@$#@>=++,#$$+)++;!#=!!+,,,$'=&,+++,#=++=$===;=#,+#+!+#!#,",
+";,,!!##,,,,==@$,=+$>+#$$+=$#@=-!$=;$#$$,-!'$#=#$$;+#!++=+;&;-+'$&;,+,,&$$==+!#,++==#-=!+++,+!!$$==--",
+"&-,!!=;+=++$$=#@$=@,+=$=$!=#+,$+=;,==!$+==@>@,&,$'++#,)++=,,)+=,!$=#-.&+#$'@!+++==!+,+&#!,++$=+!@=-=",
+"&+!+;,+++!!$$##$$!=$=!+=!=!!;!@=-++@$@$'$#>'++$$$+$-%,=--+!+@+;!#;#;%-&,#=$@@!!=$,=!;)&++=!#$#,&++!!",
+"$=!,))-,!=,-$$@=+!+!,'=+==!=$+=++,=+'@'@@===;,!>'@+),=&+$,)=+++-+,);;%-,++$#+=@$#,+$,#=+!+!##+#;,+#%",
+"!#-%%%;#+;!%!@=@@+.$;+*@+=,@!;%$=+,=$,@$,=>+#;+=@$$@=%=>@-,);!$$&);#),,#,%&#!==@>++,=>=+++,,!=--=#,@",
+"#&%,=,##.+%!+=$$+=@!!+-,=@!$#,,$!=@#@=!,+@@###+-=#@,-=$,#++)-#$#-#)#,,%,;),!$!##$@'$!$!,+!!!+-;#+#$$",
+";.%.-+$@&)-!=++@##=*$,!=$;+@='!!-!>#!!!$>%+-&#!=$!#=$*$#-+%=;!=-!+#;#++&),==+$+!$++=-,#++!+$+%$%;++;",
+"$--%)++=$,!@!%#+@!>$=!+*!=%)==>>@+,$==@!))#$%;=!!*$=>$@@,++,,,-;%$$+,;+)#;*!+,+@*!,!++;+;$@;+==,#=!!",
+">>,&$#&$$#>$=,+.-''!$'*=+>+);+>*@$=--=$=,+!==,,@==++$-,>$@!;+;-&++-,#!;++!-+#+!@$$#,,+&#=$=!==$+$#=>",
+"@=,+#!,$=>!=$+)++)+*@=$@=,+$$$+!'**#,,,$+,=@=;==-;!$,-,=@=$+==,+!%,#,-&=$++-)===#+##,+=+=#$@$=>''$$*",
+"@!==#,+#==@$===+-;%@$=#+*>=!$$$==,*>@-+;+#$,%,@@%#!,###$$);'#;$=+%;+#;++%-,=,==!)+#===========@>>>*>",
+"@=;!,+#!==$$>@$!=>=$@$=+@='$!+@*+!!=*@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+=+),==$='>+,#=+!$-%)#==>$$,,!+=''++$+,#,##%%+@$,,,,@@#==@=,%,",
+"!$#=+,!--$@+-&)-+!%)!=+--!=@=##=!$=@===!&+$#$@@=,@$+#==$);,++#=$=,=#$$==$$$!#;=+#++$',#=!==+=$=+#$#!",
+",@==,++,+=;-=!+%+%%=+&%++=$!$-++=+@$++!+++$#==++#-$$$@+++;%+=,=!=$$$$=!=$#'==#,,+!$=!=,!==@=@*=$,==$",
+"!+,--=##!!,)=@#=)%,,-,+==!!,,++=+$+,!;,++=,+#%,!;++=$=+=;=-#,+,,$=$'@#@=+%-@>!#,$$+@#==%,!$@'@=$$=@!",
+"=,#,-==+&,!==$=+=!!%,&===!;+!#=;#!+,!+=-;+==-)#+,,$+#'$,,+@!=%,,+!'@>@##=$+;%=@$!!$=+=$,===++!+$@*$#",
+";,!++=+,+,+@#=!#@++,#=!=+,+,+==-+-##+#,-,;-##+#!,++==#=$+=,,++,,+!=@$+$>$+#,==;*@=!#$-,>$'@%&->=>>$$",
+"+,#$$+)++;!#=!!+,,,$'=&,+++,#=++=$===;=#,+#+!+#!#,+=%,@=!+-&&==!$=,@$'=++=#;+$'==;+=$&!$+#'#$@$#@>=+",
+"+#!++=+;&;-+'$&;,+,,&$$==+!#,++==#-=!+++,+!!$$==--;,,!!##,,,,==@$,=+$>+#$$+=$#@=-!$=;$#$$,-!'$#=#$$;",
+"++#,)++=,,)+=,!$=#-.&+#$'@!+++==!+,+&#!,++$=+!@=-=&-,!!=;+=++$$=#@$=@,+=$=$!=#+,$+=;,==!$+==@>@,&,$'",
+"$-%,=--+!+@+;!#;#;%-&,#=$@@!!=$,=!;)&++=!#$#,&++!!&+!+;,+++!!$$##$$!=$=!+=!=!!;!@=-++@$@$'$#>'++$$$+",
+"+),=&+$,)=+++-+,);;%-,++$#+=@$#,+$,#=+!+!##+#;,+#%$=!,))-,!=,-$$@=+!+!,'=+==!=$+=++,=+'@'@@===;,!>'@",
+"$@=%=>@-,);!$$&);#),,#,%&#!==@>++,=>=+++,,!=--=#,@!#-%%%;#+;!%!@=@@+.$;+*@+=,@!;%$=+,=$,@$,=>+#;+=@$",
+"@,-=$,#++)-#$#-#)#,,%,;),!$!##$@'$!$!,+!!!+-;#+#$$#&%,=,##.+%!+=$$+=@!!+-,=@!$#,,$!=@#@=!,+@@###+-=#",
+"#=$*$#-+%=;!=-!+#;#++&),==+$+!$++=-,#++!+$+%$%;++;;.%.-+$@&)-!=++@##=*$,!=$;+@='!!-!>#!!!$>%+-&#!=$!"};
diff --git a/test/tiled_image.cxx b/test/tiled_image.cxx
new file mode 100644
index 000000000..cb132edef
--- /dev/null
+++ b/test/tiled_image.cxx
@@ -0,0 +1,103 @@
+//
+// "$Id: tiled_image.cxx,v 1.1.2.1 2001/11/24 18:07:58 easysw Exp $"
+//
+// Fl_Tiled_Image test program for the Fast Light Tool Kit (FLTK).
+//
+// Copyright 1998-2001 by Bill Spitzak and others.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Library General Public
+// License as published by the Free Software Foundation; either
+// version 2 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Library General Public License for more details.
+//
+// You should have received a copy of the GNU Library General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+// USA.
+//
+// Please report all bugs and problems to "fltk-bugs@fltk.org".
+//
+
+#include <FL/Fl.H>
+#include <FL/Fl_Window.H>
+#include <FL/Fl_Button.H>
+#include <FL/Fl_Pixmap.H>
+#include <FL/Fl_Tiled_Image.H>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+
+#include "tile.xpm"
+
+Fl_Button *b;
+Fl_Window *w;
+
+void button_cb(Fl_Widget *,void *) {
+ w->hide();
+}
+
+#include <FL/x.H>
+#ifndef WIN32
+#include "list_visuals.cxx"
+#endif
+
+int visid = -1;
+int arg(int argc, char **argv, int &i) {
+ if (argv[i][1] == 'v') {
+ if (i+1 >= argc) return 0;
+ visid = atoi(argv[i+1]);
+ i += 2;
+ return 2;
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+#ifndef WIN32
+ int i = 1;
+
+ Fl::args(argc,argv,i,arg);
+
+ if (visid >= 0) {
+ fl_open_display();
+ XVisualInfo templt; int num;
+ templt.visualid = visid;
+ fl_visual = XGetVisualInfo(fl_display, VisualIDMask, &templt, &num);
+ if (!fl_visual) {
+ fprintf(stderr, "No visual with id %d, use one of:\n",visid);
+ list_visuals();
+ exit(1);
+ }
+ fl_colormap = XCreateColormap(fl_display, RootWindow(fl_display,fl_screen),
+ fl_visual->visual, AllocNone);
+ fl_xpixel(FL_BLACK); // make sure black is allocated in overlay visuals
+ } else {
+ Fl::visual(FL_RGB);
+ }
+#endif
+
+ Fl_Window window(400,400); ::w = &window;
+ Fl_Group group(0,0,400,400);
+ group.image(new Fl_Tiled_Image(new Fl_Pixmap(tile_xpm)));
+ group.align(FL_ALIGN_INSIDE);
+
+ Fl_Button b(340,365,50,25,"Close"); ::b = &b;
+ b.callback(button_cb);
+
+ group.end();
+
+ window.resizable(group);
+ window.end();
+ window.show(argc, argv);
+
+ return Fl::run();
+}
+
+//
+// End of "$Id: tiled_image.cxx,v 1.1.2.1 2001/11/24 18:07:58 easysw Exp $".
+//