ImgArea_SetSelection_JSN

Change the marquee selection rectangle.
ImgArea_SetSelection_JSN(areaRef;selectionJSON) ➔ success
areaRef Longint The plug-in area reference.
selectionJSON Text The selection in JSON format.
↩︎ success Longint Completion status: 1 on success, 0 otherwise.

Change the marquee selection rectangle of a plug-in area.

Parameter areaRef is the plug-in area reference.

The selection rectangle is specified in selectionJSON as a JSON-serialized 4D object containing any of the following properties:

Property name Type Description
PointSelection RectObj The marquee selection rectangle expressed in points.
PixelSelection RectObj

The marquee selection rectangle expressed in pixels.

Present only when the plug-in area displays a raster image.

If selectionJSON is an empty string the marquee selection is cleared.

Note

The ImgArea_SetSelection method in the Q2PixLib component is a convenience wrapper for this method that accepts the selection directly as a 4D object instead of a JSON serialization.