luigi.themes.bitmaps
$(DDOC_SECTIONS
$(DDOC_SUMMARY GLUI User Interface Toolkit
glui_bitmaps.cpp
Draws the hardcoded images listed in glui_bitmap_img_data with OpenGL.
FIXME:
upload the images to a texture. This will allow them to be:
- Drawn with alpha blending
- Drawn at random sizes and angles onscreen
- Drawn much faster than with glDrawPixels
Copyright (c) 1998 Paul Rademacher
WWW:
http:
//sourceforge.net/projects/glui/
Forums:
http:
//sourceforge.net/forum/?group_id=92496
Converted to ZLIB license with Paul's permission.
- struct
Bitmap
;
- GLUI Bitmap:
:load_from_array()
GLUI_Bitmap is a simple 2D texture map. It's used
to represent small textures like checkboxes, arrows, etc.
via the GLUI_StdBitmaps class.
- void
init_grayscale
(ubyte* array);
- Create bitmap from grayscale byte image
- class
StdBitmapSet
;
- Keeps an array of Bitmap objects to represent all the
images used in the UI: checkboxes, arrows, etc.
- int
width
(int i);
- Return the
width
(in pixels) of the n'th standard bitmap.
- int
height
(int i);
- Return the
height
(in pixels) of the n'th standard bitmap.
- void
draw
(int i, Size p);
- Draw the n'th standard bitmap (one of the enums
listed in GLUI_StdBitmaps_Codes) at pixel corner (x,y).
- ubyte[171]
img_checkbox_off
;
- Bitmaps for all GLUI images.
These were converted from original PPM images
(mostly lost) with the tools/ppm2array program.
The images here are extracted in typical OpenGL
bottom-to-top fashion.
FIXME:
don't use grayscale brightness here--this prevents
people changing the background color. Instead, use a code
indicating the underlying purpose of the pixel:
0 = shadows; outlines; UI elements (check boxes, arrows)
64 = disabled shadows and UI elements
128 = shadowing, disabled
192 = disabled white; background
255 = highlights; checkbox/radio background
I'm thinking the way to do this would be to have an
enum {
BG = 0, // Background shines through-- totally alpha transparent
BS, // Background of scrollbar/spin box-- opaque gray
SB, // Shadowed-black element-- strong alpha blend to black
SD, // Shadowed-dark element-- weak alpha blend to black
HL, // Highlight-light-- weak alpha blend to white
HW, // Highlight-white-- strong alpha blend to white
UB, // User-interface black-- arrows, checkboxes, radio buttons
UW, // User-interface white-- backgrounds of checkboxes and radio buttons
};
Orion Sky Lawlor, olawlor@acm.org
@ This stuff was orignally in C++ and labelled LGPL, but Bill Baxter
@ got Lawlor's permission to make it ZLIB via email on Aug 13, 2006
|