getPanelPreview()

Creates a preview (image) of the available panel references for Drag & Drop of DPTs and DPs.

Synopsis

int getPanelPreview(anytype &image, string panelFileName, float scaleFactor[[, bool onlyShapeBounding = false], bool showInvisibleShapes = true]]);

Parameters

Parameter Meaning
image Preview (image) of the available panel references.
panelFileName Panel file name
scaleFactor Scaling factor for the image (1.0 = 100%).
onlyShapeBounding TRUE = only a part of the panel is converted to an image, where the shapes are contained (minimum bounding box around all shapes).
showInvisibleShapes FALSE = shapes that are set to invisible will not be displayed.

Return value

In case of an error -1, otherwise 0.

Description

Creates a preview (image) of the available panel references for Drag & Drop of DPTs and DPs.

Example

Creates a preview of the panel "foobar" inside a pictureflow widget.

main()
{
  this.slideSize = makeDynInt(200, 150);
  anytype image;
  getPanelPreview(image, "foobar.pnl", 0.5, true, true);
  this.addSlide(image);
}

Assignment

Data point functions

Availability

UI