Class: xrx.viewbox.ViewboxRotate

xrx.viewbox. ViewboxRotate

(private) new xrx.viewbox.ViewboxRotate()

A class implementing the rotation model for a drawing view-box.
Source:

Extends

Members

(private, static) xrx.viewbox.ViewboxRotate.Direction_ :number

Utility enumeration for view-box orientations.
Type:
  • number
Properties:
Name Type Default Description
0 number 0
90 number 1
180 number 2
270 number 3
Source:

(private) xrx.viewbox.ViewboxRotate#FixPoints_

Inherited From:
Source:

Methods

(private) xrx.viewbox.ViewboxRotate#containsPoint(point)

Whether a point is contained in this view-box.
Parameters:
Name Type Description
point Array.<number> The native point, without translation.
Inherited From:
Source:

(private) xrx.viewbox.ViewboxRotate#direction_() → {number}

Returns a positional utility number representing the current orientation of the view-box.
Source:
Returns:
The orientation.
Type
number

xrx.viewbox.ViewboxRotate#disposeInternal()

Disposes this view-box.
Source:

(private) xrx.viewbox.ViewboxRotate#getBox() → {goog.math.Box}

Returns the bounding-box for this view-box, respecting transformation.
Inherited From:
Source:
Returns:
The bounding box, coordinates are the visibles and are transformed.
Type
goog.math.Box

(private) xrx.viewbox.ViewboxRotate#getCenterPoint_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxRotate#getFixPoint_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxRotate#getFixPoints_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxRotate#getHeight(opt_transformed, opt_visible) → {number}

Returns the height of this view-box, optionally the transformed height (respecting the current scale) and / or the visible height (respecting the current rotation).
Parameters:
Name Type Description
opt_transformed boolean Whether to return the transformed height respecting the current scale.
opt_visible boolean Whether to return the visible height respecting the current rotation.
Inherited From:
Source:
Returns:
The height.
Type
number

(private) xrx.viewbox.ViewboxRotate#getPivotPoint_()

Source:

(private) xrx.viewbox.ViewboxRotate#getPivotPoints_(reverse) → {Array.<number>}

Returns the four pivot points of this view-box.
Parameters:
Name Type Description
reverse boolean If we rotate in right or left direction. If reverse is true we assume left direction otherwise right direction.
Source:
Returns:
Type
Array.<number>

xrx.viewbox.ViewboxRotate#getRotation() → {number}

Returns the current rotation in degrees.
Source:
Returns:
The current rotation in degrees.
Type
number

(private) xrx.viewbox.ViewboxRotate#getVisibleOrientation_()

Inherited From:
Source:

(private) xrx.viewbox.ViewboxRotate#getWidth(opt_transformed, opt_visible) → {number}

Returns the width of this view-box, optionally the transformed width (respecting the current scale) and / or the visible width (respecting the current rotation).
Parameters:
Name Type Description
opt_transformed boolean Whether to return the transformed width respecting the current scale.
opt_visible boolean Whether to return the visible width respecting the current rotation.
Inherited From:
Source:
Returns:
The width.
Type
number

(private) xrx.viewbox.ViewboxRotate#isFixPoint_(fixPoint)

Whether the fix-point is a point, that is an Array of length 2.
Parameters:
Name Type Description
fixPoint ? The fix-point.
Source:

(private) xrx.viewbox.ViewboxRotate#isHorizontal() → {boolean}

Whether the view-box currently is in horizontal orientation.
Source:
Returns:
Whether the view-box is oriented horizontally.
Type
boolean

(private) xrx.viewbox.ViewboxRotate#isOrientation_(fixPoint)

Whether the fix-point is an orientation, that is one of xrx.drawing.Orientation.*.
Parameters:
Name Type Description
fixPoint ? The fix-point.
Source:

(private) xrx.viewbox.ViewboxRotate#isValidRotation(rotation) → {boolean}

Checks whether the rotation value is valid.
Parameters:
Name Type Description
rotation number The rotation in degrees.
Source:
Returns:
Whether the rotation is valid.
Type
boolean

(private) xrx.viewbox.ViewboxRotate#isVertical() → {boolean}

Whether the view-box currently is in vertical orientation.
Source:
Returns:
Whether the view-box is oriented vertically.
Type
boolean

(private) xrx.viewbox.ViewboxRotate#rotateBy(anglenullable, opt_fixPointnullable)

Rotates the view-box by an angle, respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
angle number <nullable>
The angle of rotation in degrees, e.g. 90 or 180.
opt_fixPoint Array.<number> | string <nullable>
A fix-point or an orientation. Defaults to the center of the view-box.
Source:

(private) xrx.viewbox.ViewboxRotate#rotateBy_(anglenullable, opt_orientationnullable, opt_fixPointnullable)

Rotates the view-box by an angle, respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
angle number <nullable>
The angle of rotation in degrees, e.g. 90 or 180.
opt_orientation string <nullable>
An orientation, defaults to xrx.drawing.Orientation.C.
opt_fixPoint Array.<number> <nullable>
A fix-point, defaults to the center of the view-box.
Source:

xrx.viewbox.ViewboxRotate#rotateLeft(opt_fixPointnullable)

Rotates the view-box by 90° in left direction, optionally respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
opt_fixPoint Array.<number> | string <nullable>
The fix-point.
Source:

xrx.viewbox.ViewboxRotate#rotateRight(opt_fixPointnullable)

Rotates the view-box by 90° in right direction, optionally respecting a fix-point or an orientation.
Parameters:
Name Type Attributes Description
opt_fixPoint Array.<number> | string <nullable>
The fix-point.
Source: