DesktopX 2.4 Developer’s Guide
_____________________________________________________________________________
_____________________________________________________________________________
Page 19
Image sizing and offsets
Once you have selected the image to use you can distort the image by entering a width and
height for the image in the appropriate boxes.
DesktopX is not content with sizing objects in such a brutal fashion, so provides an advanced tab
to allow you to resize the image more intelligently.
Clicking the 'Advanced' button brings up a new dialog. This allows you to specify different
scaling horizontally and vertically. At each edge you can specify a number of pixels that you do
not want to stretch and then you can choose to either Tile (repeat) or Stretch the area in between.
For example, if you have an image that is 40 pixels by 30 pixels and you want the outer 5 pixels
at each edge to remain unstretched, then the corresponding values A-D would be 5, 35, 5, 25.
You could then choose to either tile or stretch the area in the middle.
Also in this dialog, you can offset the image position. This is not useful in a single state object
because you could just position the object where you want, but in a multi-state object, you can
offset the image in different states to create useful effects. A particular example of this could be
offsetting on “Mouse down” to represent the click like a button being depressed.
Text Objects
If you choose a 'Text' object type then the configuration options change to a more simple set.
You can enter the text you want in the text area, and set it's alignment in the dropdown
'Alignment' list. To further customize your text, you can specify the font (including style and
size) and color in which the text will appear.
If you want, you can specify that the text has a border by clicking the box and selecting a border
color. By having a colored border and setting the text color to 'Magic pink' you can create text
which is purely an outline.
You can also make use of offsets here to create effects like you can for images. Click the
“Advanced” button to specify the offsets you want to use.
Object Transparency
We will come onto the ‘Animation’, and ‘Messages’ tabs later, but the remaining four allow
extra tweaking of your image.
The ‘Transparency’ tab allows you to make the whole object partially transparent (in addition to
any transparency specified in the image).
You have a ‘No transparency’ or you can specify a uniform level of opacity of the image. For
example an object with a uniform opacity of 40% will be 40% visible and 60% transparent.