stopDrawingCapture

stopDrawingCapture(): Binary;

The stopDrawingCapture method of the Picture class turns off a special drawing mode that was entered using the startDrawingCapture and returns a binary image of the client area of the control.

A 1-bit monochrome png image is returned if the Picture control has no defined picture property, the effective value of the backColor property is white, and the value of the foreColor property is black. If any of these conditions is false, a 24‑bit PNG image (.png) is returned.

The stopDrawingCapture method sets the value of the autoRedraw property to false and deletes the saved drawing history. When the control is repainted after calling the stopDrawingCapture method, the drawn image is not displayed.

If you want a different image style, use the following actions instead of calling the stopDrawingCapture method.

bin := picture1.createPictureAsType(....);
picture1.autoRedraw := false; // also turns off the special drawing mode

After the special drawing mode is turned off, any defined mouseDown, mouseUp, click, and dblClick event methods for the picture are called if they occur. If the stopDrawingCapture method is called and the control is not in the special drawing mode, an exception is not raised and the result is equivalent to calling the createPictureAsType method.