RectangleRubberband Class

This client-side class corresponds to the RectangleRubberband server-side control and gives an opportunity to obtain access to its primary members in JavaScript.

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

Syntax

Java Script
GraphicsMill.RectangleRubberband = function();

Type.createClass(
	'GraphicsMill.RectangleRubberband',
	GraphicsMill.RectangleController);

Remarks

This class represents the rectangular rubberband and can be used to draw a rectangle on the BaseViewer control surface. Depending on this control properties you can resize (see resizeMode property) or move (see movable property) this rectangle by the mouse. This way this rubberband is extremely useful to make a rectangular selection on the bitmap.

To get or set the rectangle (selection) programmatically, you can use property rectangle. It will return the rectangle displayed at the BaseViewer control in coordinates of the content associated with it.

The rectangle can be resized either arbitrary, or only increase or decrease the width and height equally (i.e. preserving the rectangle proportion). It is specified by the resizeMode property. The required aspect ratio is specified with the ratio property.

You can specify whether to display a mask which shadows the image out of the rectangle. It is convenient when you use this rubberband together with the Crop transform. Use maskVisible property for it.

You can attach this control to the BaseViewer using its property BaseViewer.rubberband form the client-side code.

Inheritance Hierarchy

Sys..Component
+ Sys.UI..Control

See Also

Reference