Window Shapes


Shape resource

<shape name="...">
    <area bitmap="..." attach="..." offset="..."/>
</shape>



Defines a complex window shape for resizable windows.
A shape consists of multiple areas that can be attached to the window edges.

Attributes: (for <area> tag)

bitmap referes to a bitmap in resources section
the bitmap must have a transpareny color (mask="#color" in <bitmap>). Pixels of that color are "outside" the window.
attach Autosizing flags like in <view>, can be a combination of "left", "top", "right", "bottom" separated with pipes
e.g. "left|top", "right|bottom",...
Currently stretching of areas is not supported, e.g. "left|right" is not possible.
offset distance between the area and the window edges where it's attached.
If an offset coordinate is 0, the area touches the corresponding window edge, so in most cases you don't need the offset (default is "0,0"). If an area is attached right, the offset is negative. The same holds for bottom.
    6        
5 <area ...
offset="5,6"/>
     
         
      <area ...
offset="-4,-5"
attach="right|bottom"/>
 4
       5  



Example:

the most typical case: four shapes for the corners of a window.
No offset is given, so all areas touch the window edges. Note that the "top" and "left" attachments could be ommited. Also note that the "noframe" style is not mandatory, but window shapes make most sense without an OS window frame.

<resources>
    <bitmap name="shapeTL" path="tl.bmp" mask="green"/>
    <bitmap name="shapeTR" path="tr.bmp" mask="green"/>
    <bitmap name="shapeBL" path="bl.bmp" mask="green"/>
    <bitmap name="shapeBR" path="br.bmp" mask="green"/>

    <shape name="myshape">
        <area bitmap="shapeTL" attach="top|left"/>
        <area bitmap="shapeTR" attach="top|right"/>
        <area bitmap="shapeBL" attach="bottom|left"/>
        <area bitmap="shapeBR" attach="bottom|right"/>
    </shape<
</resources>

<template ... style="noframe" shape="myshape">
   ...
</template>



Bitmaps
Templates




Copyright ©2004 Steinberg Media Technologies GmbH. All Rights Reserved.
Last Modified: