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

BaseViewer.workspaceToControlRectangle Method

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

Namespace: GraphicsMill
Assembly: Aurigma.GraphicsMill.AjaxControls (in Aurigma.GraphicsMill.AjaxControls.dll)

Syntax

Java Script
function workspaceToControlRectangle(rect);

Parameters

rect

Type: GraphicsMill.Rectangle

Rectangle coordinates in the workspace coordinate system.

Return Value

Rectangle coordinates in the control coordinate system.

Remarks

The BitmapViewer allows to handle two coordinate systems: workspace-related and control-related and provides the workspaceToControlRectangle(Rectangle) method to translate the rectangle from the workspace-related coordinate system to the control-related one.

The workspace-related coordinate system represents logical coordinates of the image loaded in the control and allows to work with it regardless of zoom, scroll or alignment. The control-related one is used to measure parameters of standard control events (e.g. position of the mouse pointer).

This method corresponds to BaseViewer.WorkspaceToControl(System.Drawing.RectangleF) server-side member.

See Also

Reference