Algosim documentation: EmbedPixmap

EmbedPixmap

Embeds a pixmap in a diagram or 3D scene.

Syntax

Description

In a diagram

EmbedPixmap(pm, a, w, h) embeds pm in the current diagram with its top-left corner at a, width w, and height h. If omitted, w defaults to 10. If omitted or zero, h is chosen so that the pixmap’s aspect ratio is preserved. A reference to the visual object is returned.

The AdjustVisual function can be used to adjust the appearance of the object. See Visual settings for a list of applicable settings.

In a 3D scene

EmbedPixmap(pm, a, w, h, d, α) embeds pm in the current 3D scene with its bottom-left corner at a, left side parallel to d, width w, and height h. If omitted, w defaults to 10, h is chosen so that the pixmap’s aspect ratio is preserved, and d defaults to ❨0, 0, 1❩. h = 0 also invokes preservation of aspect ratio given w.

If specified, the object is rotated α degrees about its left edge in the direction of d.

A reference to the visual object is returned.

The AdjustVisual function can be used to adjust the appearance of the object. See Visual settings for a list of applicable settings.

Examples

S ≔ ExampleData("Sally");
EmbedPixmap(S, ❨8, 2, 0❩, 10, 0, ❨−.1, −.1, 1❩, 45);
solid("teapot", ❨6, 9, 0❩)

Image 1