Packages
Comm
DB
Debug
Input
Interface
Module
Token
User

Objects
bitmapwidget
databasenode
dragdata
textwidget
tokeninstance
widget
widgetcontainer

Elements
buttoncontrol
categoryselectioncontrol
chatentry
chatwindow
databasecontrol
diecontrol
diefield
formattedtextcontrol
formattedtextfield
genericcontrol
imagecontrol
numbercontrol
numberfield
portraitselectioncontrol
script
scrollbarcontrol
scrollercontrol
stringcontrol
stringfield
subwindow
textbasecontrol
tokenbag
tokencontrol
tokenfield
windowclass
windowcontrol
windowinstance
windowlist
windowreferencecontrol
windowreferencefield

Components
categoryselectionsettings
customdie
desktopframe
die
distance
font
framedef
hotkeybar
icon
imageupdatefolder
importinfo
includefile
panel
portraitset
properties
replaces
template
tokenroot
tooltip
getBitmapName
setBitmap
setColor
setSize



Inherits widget
Context widgetcontainer

A bitmap widget is a specialized version of widget.

Bitmap widgets contain a single bitmap. The bitmap can be modulated with a color value, affecting its hue and transparency.

By default, the bitmap specified will be scaled to fit the size of the control. If a clip region is specified via the setSize function, then the bitmap will be shown at original size and clipped.



Interface

getBitmapName

function getBitmapName( )

Retrieves the resource name of the bitmap contained in the widget.

Return values

(string)
The name of the bitmap

setBitmap

function setBitmap( name )

Sets the bitmap contained in the widget.

Parameters

name(string)
The name of the bitmap resource to be displayed in the widget

setColor

function setColor( color )

Set the color the image is modulated with. The modulation operation scales the color components of the pixels in the bitmap from zero to the value in the original bitmap, thus adjusting the hue of the image. The image color values can't be scaled up using this functionality.

Parameters

color(string)
The color specified as a HTML compatible string representing an RGB color with an alpha (transparency) value. The format of the string is 'aarrggbb', and each component is presented as a hexadecimal value from 00 to FF. If alpha is zero or not defined, FF is assumed.

setSize

function setSize( width, height, [clipanchor] )

Sets the size of this widget to a fixed value. Instead of sizing the entire widget to fit the contents, this will cause the icon to be fitted to the size.

Parameters

width(number)
The constrained width of the widget
height(number)
The constrained height of the widget
clipanchor(string)[optional]
Instead of scaling to fit control, bitmap will be anchored to the specified edge (top, bottom, left, right) and clipped.


'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy