Image - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


DocumentTools[Canvas]

  

Image

  

create an image on a canvas

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Image(imageref,options)

Parameters

imageref

-

string

tooltip

-

(optional) string

width

-

(optional) posint

height

-

(optional) posint

Description

• 

The Image command creates an image data structure to be used in conjunction with the Text command.

• 

The imageref specifies either a filename or a canvas, or mglyph.  

  

If imageref is a filename, the image is uploaded to the Maple Learn content server before constructing the canvas element.  In order for this to succeed, the user must be logged in. See worksheet,cloud,login for more information about logging in.

  

imageref can also be a canvas or mglyph element from a shared canvas that used the Maple Learn interface to upload the image. The first image reference found in the canvas will be used as the image reference.

• 

The option tooltip=string stores alt-text as an image attribute that will be displayed on hover inside Maple Learn.

• 

The options width=X, and height=Y scale the image to a specified size.

Examples

withDocumentTools:-Canvas:

This URL points to a shared document that contains an image

urlhttps://learn.maplesoft.com/index.html#/?d=DIJJHRHROSGUEJISGFJIENCMPKIFGJMTPSBJMPLTCQEKNOMTCSDSFMGGIFIUKLCONGFLHQESNOPIMLPTKIAGHQGOLIARLSBJMNOG:

imgcanvasGetCanvasurl:

Use the shared canvas as the image reference

cvNewCanvasImage Example,TextSample %1 image,Imageimgcanvas:

ShowCanvascv

Same as above, but adding in sizing options

cvNewCanvasImage Example,TextSmall sample %1 image,Imageimgcanvas,tooltip=The Maple Learn logo,width=50,height=50:

ShowCanvascv

ShareCanvascv

Compatibility

• 

The DocumentTools[Canvas][Image] command was introduced in Maple 2022.

• 

For more information on Maple 2022 changes, see Updates in Maple 2022.

See Also

Annotate

GetCanvas

GetMath

Math

NewCanvas

Script

ScriptButton

ShareCanvas

ShareCanvas

Text