/ HALion Developer Resource / HALion Macro Page / Resources /

Bitmap

Description

The Bitmap resource requires either a 24-bit png file with alpha channel or a bmp file without alpha channel. Many elements refer to bitmap resources, which can be assigned once a resource has been created. Keep in mind that each individual image is managed by the OS and costs performance. Therefore, it is recommended to work with a lower number of images, create sections within these images and use the sections wherever an image resource is required. In this case, HALion's GUI framework handles the section resources and the OS only has to deal with a few images.

Properties

PopertyDescription
NameThe name of the Bitmap resource.
PathSpecifies the path and file name of the used bitmap.
AlphaDefines the opacity of the bitmap from 0 (transparent) to 255 (opaque).
FramesDefines the number of subframes in a bitmap. Bitmaps with frames can be used as animations in controls like knobs, sliders, and animations.
Scale ModeThis mode defines how a bitmap is adapted in size when the control that is using it is set to Scalable and sized smaller or larger than the original bitmap.
  • Stretch: By default, scale mode is set to stretch, which means that the bitmap is drawn smaller or larger.
  • Tile: This means that the original bitmap will be drawn repeatedly as soon as the size of the control exceeds the size of the original bitmap.
  • Tile Border: This mode only draws the area defined by the margin settings repeatedly and leaves the inner area empty.
MarginLeft, Top, Right, Bottom: As soon as a margin is set, the margin area is not stretched or tiled, but only the area outside. This can be used to define frames, for example, where the four corners of the bitmap are preserved in size and only the rest of the bitmap is stretched.