Resources
HOWTO include Bitmaps
<bitmap
name="..."
path="..."
mask="#color"
alpha="byte"
/>
Attributes:
name |
internal bitmap name (e.g. "PlayBtn")
Controls inside the XML description refere to this name, it has to be unique.
|
path |
relative path to the bitmap file (e.g. "bitmaps\playbtn.bmp")
|
mask |
transparency color
Howto describe colors
|
alpha |
alpha value between 0 (transparent) and 255 (opaque)
Can be written decimal or hexadecimal e.g. "#7F" equals "128".
|
Remarks:
- To enable per pixel alpha blending (e.g. when using PNG graphics), you have to set the alpha attribute to "#FF!"
- Transparency color will be ignored if an alpha value is specified.
- For better performance, you should try to use simple transparency instead of per pixel alpha wherever possible!
Supported Graphic file formats
<section name="..." path="..." rect="left,top,right,bottom"/>
A section describes a rectangular part inside a bitmap. The application "extracts" this part from the bitmap refered to by the path attribute.
When specifing a bitmap for a control there is no difference if it is a <bitmap> or <section>.
The section inherits the transparency settings from its source bitmap.
Attributes:
path |
Path can be the internal name of a <bitmap> described in the resources section
or a filename. If you need to describe more sections from the same source bitmap,
you should include it once as <bitmap> instead of always writing the external filename
(this avoids unneccessary load/free of the same bitmap).
|
rect |
Rectangle coordinates (e.g. "0,0,20,10")
|
Filmstrip
<filmstrip name="..." path="..."
framecount="int"
framealign="..."
interval="int"
defaultframe="int"
/>
A filmstrip is a bitmap, which contains several frames of e.g. an animation.
The frames can be aligned verticaly or horizontaly.
The <filmstrip> tag inherits attributes like mask or alpha
from the <bitmap> tag.
Attributes:
framecount |
number of frames in filmstrip
|
framealign |
frame alignment, can be "vertical"* or "horizontal"
|
interval |
time between frame updates (default is 100ms)
|
defaultframe |
index of the frame to display, if the filmstrip is used as single bitmap (default is zero)
|
Animations
Dynamic Bitmap
<dbitmap name="..." path="..."
center="left,top,width,height"
style="..."
/>
The center rectangle divides the bitmap into 9 parts.
The 4 corners are always drawn in original size,
while the other parts are either scaled or repeated to reach the requested size.
Attributes:
center |
the center rectangle, which defines the 9 parts of the bitmap
|
style |
can be a combination of "hrepeat", "vrepeat".
specifies if the dynamic parts should be scaled (default) or repeated, separately for both directions.
|
fix |
... |
fix |
. . . |
... ... center ... ... |
. . . |
fix |
... |
fix |
Bitmap Collections
<collection name="...">
<bitmap name="... />
...
</collection>
A collection describes a certain set of bitmaps. Some controls (e.g. scrollbars) require bitmap collections.
Which bitmaps have to be included in a collection, depends on the control.
HOWTO include Cursors
<cursor name="..." path="..."/>
Attributes:
name |
internal cursor name
|
path |
relative path to cursor file (e.g. "cursors\arrow.cur")
Windows specific: The cursor resource has to be a valid Windows Cursor File (.cur)
|
Last Modified: