Creating an image from a pre-defined bitmap 
Author Message
 Creating an image from a pre-defined bitmap
The subject says it all: is there any way to create an image from a
pre-defined bitmap (e.g. questhead) or one I define myself with
Tk_DefineBitmap?

The reason I wish to do this is because I have a bunch of X bitmap files
I am including in a C file that I wish to use as game files.  They need
to be images rather than just bitmaps so that they may have a foreground
color and a background color independant of the widget on which they are
placed.

Does anyone have any suggestions as to how to do this, or another
approach I could take to accomplish the same thing?  Thanks in advance
for any suggestions.

Thanks,

Karl

P.S. If anyone is interested in a Tcl/Tk strategy game I have already
written, I have it online at:

http://www.*-*-*.com/ ~karlgarrison/headache/

--
Karl Garrison




Sat, 02 Feb 2002 03:00:00 GMT  
 Creating an image from a pre-defined bitmap

Quote:

> The reason I wish to do this is because I have a bunch of X bitmap files
> I am including in a C file that I wish to use as game files.  They need
> to be images rather than just bitmaps so that they may have a foreground
> color and a background color independant of the widget on which they are
> placed.

If you can't get to the data somehow from within Tcl, you might at
worst try to parse the file and use
        image create bitmap <name> -data {parsed_data_here}

For that.  Then you use that in the -image option for a widget.

--
   Jeffrey Hobbs                          The Tcl Guy
   jeffrey.hobbs at scriptics.com         Scriptics Corp.



Mon, 04 Feb 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Converting a pre-defined bitmap to an image?

2. Creating External Bitmap from cached image in VW

3. Problems creating an image from a bitmap stored in a string

4. image create bitmap not using Tk_DefineBitmap

5. Image create bitmap question Tk4.0p1

6. Bug in image create bitmap

7. Pre-created Image View

8. How to create dynamic user-defined forms using images

9. defining application-created images?

10. Defining Bitmap in Tcl

11. How to define a bitmap within a script?

12. a small Tk extension -- adding a command to define bitmap

 

 
Powered by phpBB® Forum Software