The following Tcl code is generated to implement a package for these 3 bitmaps:

Autogenerated package code:
package provide myBitmap 1.0
namespace eval ::myBitmap {
namespace ensemble create
namespace export _newfile
namespace export newfile
namespace export _open
namespace export open
namespace export _save
namespace export save
}
proc ::myBitmap::_newfile {} {
return {
#define newfile_width 16
#define newfile_height 16
static unsigned char newfile_bits[] = {
0x00, 0x00, 0x00, 0x00, 0xfc, 0x03, 0x04, 0x06, 0x04, 0x0a, 0x04, 0x1e,
0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10, 0x04, 0x10,
0x04, 0x10, 0x04, 0x10, 0xfc, 0x1f, 0x00, 0x00};
}
} ; # End of proc ::myBitmap::_newfile
proc ::myBitmap::newfile { {foreground "black"} {background ""} } {
return [image create bitmap -data [::myBitmap::_newfile] -background $background -foreground $foreground]
}
proc ::myBitmap::_open {} {
return {
#define open_width 16
#define open_height 16
static unsigned char open_bits[] = {
0x00, 0x00, 0x00, 0x0e, 0x00, 0x51, 0x00, 0x60, 0x0e, 0x70, 0xf1, 0x07,
0x01, 0x04, 0x01, 0x04, 0xe1, 0xff, 0x11, 0x40, 0x09, 0x20, 0x05, 0x10,
0x03, 0x08, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00};
}
} ; # End of proc ::myBitmap::_open
proc ::myBitmap::open { {foreground "black"} {background ""} } {
return [image create bitmap -data [::myBitmap::_open] -background $background -foreground $foreground]
}
proc ::myBitmap::_save {} {
return {
#define save_width 16
#define save_height 16
static unsigned char save_bits[] = {
0x00, 0x00, 0xfe, 0x7f, 0x0a, 0x50, 0x0a, 0x70, 0x0e, 0x50, 0x0e, 0x50,
0x0e, 0x50, 0x0a, 0x50, 0xf2, 0x4f, 0x02, 0x40, 0xf2, 0x5f, 0xf2, 0x53,
0xf2, 0x53, 0xf2, 0x53, 0xfc, 0x7f, 0x00, 0x00};
}
} ; # End of proc ::myBitmap::_save
proc ::myBitmap::save { {foreground "black"} {background ""} } {
return [image create bitmap -data [::myBitmap::_save] -background $background -foreground $foreground]
}
You need to put the following line into a pkgIndex.tcl file:
package ifneeded myBitmap 1.0 "source [file join $dir myBitmap.tcl]"
|