CanvasDrawImage

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Release: 4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3

New to Analytica 5.0

CanvasDrawImage( canvas, image, x, y, width, height, swapXY )

Draws an image onto a canvas. The image may be optionally scaled.

• «canvas» is a canvas obtained from calling the Canvas() function, or a canvas context obtained by calling the CanvasContext() function.
• «image» is an image. An image can be obtained from the Pict attribute on an existing object (for an image that appears on a diagram), or as the result of calls to ReadImageFile, ReadFromURL or CanvasImage.
• «x», «y»: (optional) The position where the top-left corner of the image will be placed.
• «width», «height»: (optional) The final width of the pasted image (in the current context's coordinate system). When only one is specified, the aspect ratio of the image is preserved.
• «swapXY»: (optional) swaps the «x» and «y» parameters. Does not cause the image to rotate.