.section Widgets .topic widget.image .title Image .toc 0 Display Widgets .toc 0 Image .index Image .index wgtImage .index wgtImageFromFile .index wgtImageSetData .index wgtImageLoadFile .h2 Image Displays a bitmap image. Can be created from raw pixel data or loaded from a BMP file on disk. The image is rendered at its natural size within the widget bounds. Header: widgets/widgetImage.h .h3 Creation .table Macro Description ----- ----------- wgtImage(parent, data, w, h, pitch) Create an image widget from raw pixel data. data is a uint8_t * pixel buffer, w/h are dimensions, pitch is bytes per row. wgtImageFromFile(parent, path) Create an image widget by loading a BMP file from disk. .endtable .h3 Methods .table Macro Description ----- ----------- wgtImageSetData(w, data, imgW, imgH, pitch) Replace the displayed image with new raw pixel data. wgtImageLoadFile(w, path) Replace the displayed image by loading a new file. .endtable .h3 Events .table Callback Description -------- ----------- onClick Fires when the image is clicked. .endtable .h3 Properties (BASIC Interface) .table Property Type Access Description -------- ---- ------ ----------- Picture String Write-only Load an image from a file path. ImageWidth Integer Read-only Width of the currently loaded image in pixels. ImageHeight Integer Read-only Height of the currently loaded image in pixels. .endtable