img(id, url, r, c, t)
id
(optional): element ID
url
(required): the image URL, enclosed in double quotes
r
(required): the rectangle where the image will be displayed, type is Rect
.
c
(optional, default is “white”
): the color to overlay on the image. If the color is translucent, the image will be translucent as well.
t
(optional, defaults to cropCenter
): how the image will be cropped. Possible values are:
cropCenter
: keep the image proportions, crop from the center of the image, and ensure that r
is completely filled
inside
: keep the image proportions so that the image is completely displayed inside of r
fit
: stretch to the size of r