This documentation is for the old version. Go to the latest Graphics Mill docs

Canvas Members

The Canvas type exposes the following members.

Methods

Name Description
Public method alignVObject

Aligns the specified v-object.

Public method controlToWorkspace

Translates coordinates from the control-related coordinate system to the workspace-related one.

Public method deleteCurrentVObject

Delete the currently selected v-object and shows a confirmation dialog if needed.

Public method dispose

Removes the current Canvas from the application.

Public method initialize

Initializes the current Canvas object.

Public method invokeRemoteMethod

Runs the specified remote method on the server.

Public method raiseKeyDown

Raises the key down event.

Public method raiseKeyUp

Raises the key up event.

Public method raiseMouseDown

Raises the mouse down event.

Public method raiseMouseMove

Raises the mouse move event.

Public method raiseMouseUp

Raises the mouse up event.

Public method redraw

Redraws the canvas.

Public method workspaceToControl

Translates coordinates from the workspace-related coordinate system to the control-related one.

Properties

Name Description
Public property canvasClientSideOptions

Gets values which configure automatic postback for individual events.

Public property constrainedMarginEnabled

Gets or sets the value indicating whether it is possible to move v-objects beyond the bounds of the canvas.

Public property currentLayer

Gets the currently selected layer.

Public property currentLayerIndex

Gets or sets an index of the currently selected layer.

Public property currentVObject

Gets the currently selected v-object.

Public property currentVObjectIndex

Gets or sets an index of the currently selected v-object.

Public property data

Gets or sets serialized data of this canvas.

Public property height

Gets the height of the canvas taking into account screen vertical resolution and zoom value.

Public property history

Gets a History object associated with this canvas.

Public property isSquaredBackground

Gets or sets the value indicating if the background of the canvas is squared.

Public property keyEventEnabled

Gets or sets the value indicating whether the both key-up and key-down events are enabled.

Public property layers

Gets a collection of layers associated with this canvas.

Public property margin

Gets or sets the outer margin of the canvas.

Public property marginColor

Gets or sets a color of the outer margin of the canvas.

Public property marginWidth

Gets or sets a width of the outer margin of the canvas.

Public property previewColorManagementEnabled

Gets or sets the value indicating whether to use color management when displaying images.

Public property printColorManagementEnabled

Gets or sets the value indicating whether to use color management when rendering the workspace.

Public property resizeGripColor

Gets or set the resize grip color.

Public property resizeGripSize

Gets or set the resize grip width.

Public property returnValue

Gets the value returned by a remote scripting method.

Public property rotationGripColor

Gets or set the rotation grip color.

Public property rotationGripSize

Gets or set the rotation grip width.

Public property screenXDpi

Gets a horizontal resolution in DPI used to show the canvas in a browser.

Public property screenYDpi

Gets a vertical resolution in DPI used to show the canvas in a browser.

Public property status

Gets a current bitmap status.

Public property tags

Gets or sets custom data.

Public property width

Gets the width of the canvas taking into account screen horizontal resolution and zoom value.

Public property workspaceHeight

Gets or sets the height of the canvas.

Public property workspaceWidth

Gets or sets the width of the canvas.

Public property zoom

Gets or sets the current zoom value.

Events

Name Description
Public event callbackException

Fires when the callback threw an exception.

Public event currentLayerChanged

Fires when the currently selected layer is changed.

Public event currentVObjectChanged

Fires when the currently selected v-object is changed.

Public event currentVObjectDeleting

Fires when the currently selected v-object is about to be deleted.

Public event initialized

Fires when the the canvas is initialized.

Public event invokingCallbackRequest

Fires before the callback is initiated by the canvas.

Public event requestComplete

Fires when the request is completed.

Public event sendingRequest

Fires when the request is about to be sent.

Public event statusChanged

Fires when the bitmap status is changed.

Public event vObjectCreated

Fires when a v-object is created.

Public event zoomChanged

Fires when zoom of the canvas is changed.

See Also

Reference