AddPicture

Modified in version 4.0

AddPicture ( left ;​ top ;​ width ;​ height ;​ sourceType ;​ sourceData )

Argument Type Range Default Note
left num -inf..+inf (required)
top num -inf..+inf (required)
width num 0..10000 (image width) Dimension:[pt]
height num 0..10000 (image height) Dimension:[pt]
sourceType int 1..4 clipboard
sourceData str ""
Examples

AddPicture(100;​100;​;​;​file;​"images/gradient_01.png")

AddPicture(100;​100;​;​;​file;​"~/fills/gradient_02.png")

AddPicture(100;​100;​;​;​file;​"C:/Programs/Fills/Gradient003.png")

AddPicture(100;​100;​;​;​stream;​"iVBORw0KGgoAAAANSUhEUgAA​AEAAAABABAMA...")

Description

By using the AddPicture() function, it is possible to add a picture, e.g. a company logo, to a drawing. Two different picture sources are supported for this: a file (sourceType = file) or a Base64 encoded PNG image stream (sourceType = stream). The arguments sourceType and sourceData are explained in detail in Import Images, together with various examples showing how they are applied.
The upper left-hand corner of the picture is positioned by using the arguments left and top. The coordinate origin is located in the upper left-hand corner of the drawing or the view. The arguments width and height serve to scale the picture. If the width and height are not defined, the actual width and height of the picture are used.

Scroll to Top
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×