home *** CD-ROM | disk | FTP | other *** search
- TRANS - Sample app showing multiple transparent drawing methods
-
- ToddLa - 6/93
-
-
-
- Abstract:
- Demonstrates multiple methods for drawing transparent objects with Windows
- GDI calls. and allows each method to be compared.
-
- the sample app can load a image to by used as a sprite, it treats the
- first pixel as the transparent color.
-
- Drawing methods:
-
- Mono Mask - uses two bitmaps one mono and one color, draws
- by making two calls to GDI BitBlt.
-
- Color Mask - uses two bitmaps both color, draws
- by making two calls to GDI BitBlt.
- this takes more memory than using mono masks, but
- may go faster on some display drivers.
-
- True Mask - uses two bitmaps one mono and one color, draws
- by making three calls to GDI BitBlt. Does not
- assume the source (ie color bitmaps) has black "0"
- in the transparent areas.
-
- RLE - converts the source image to a RLE DIB, draws with
- one call to StretchDIBits(). This method has higher
- startup time, takes less memory to store (for most images)
- and *should* draw the fastest.
-
- Files:
- bigbalon.dib Sample images
- earth.dib
- herman.dib
-
- dib.c DIB routines (Load, Save, Draw, deal with palettes)
- dib.h
-
- makefile makefile for Win16
- makefile.32 makefile for Win32
-
- qa.c Main app source file.
- qa.def Main app def file (Win16)
- qa32.def Main app def file (Win32)
- qa.h Main app header file
- qa.ico Main app icon
- qa.rc Main app resource file
-
- tblt.c routines for drawing transparent images (building masks)
- tblt.h
-
- trle.c routines for building a RLE sprite from a DIB
- trle.h
-
- trans.exe Win16 app
- trans32.exe Win32 (i386) app
-