Clear Up
SharpKit Reference

Region Class

Namespace: Ext.util

Base Types

System.Object

Constructors

Name Description
Region()
Region(JsNumber, JsNumber, JsNumber, JsNumber) Creates new Region. @param {Number} top Top @param {Number} right Right @param {Number} bottom Bottom @param {Number} left Left

Methods

Name Description
adjust(JsNumber, JsNumber, JsNumber, JsNumber) Modifies the current region to be adjusted by offsets. @param {Number} top top offset @param {Number} right right offset @param {Number} bottom bottom offset @param {Number} left left offset
constrainTo(Region) Modifies the current region to be constrained to the targetRegion. @param {Ext.util.Region} targetRegion
contains(Region) Checks if this region completely contains the region that is passed in. @param {Ext.util.Region} region
copy() Copy a new instance @return {Ext.util.Region}
equals(Region) Check whether this region is equivalent to the given region @param {Ext.util.Region} region The region to compare with @return {Boolean}
getOutOfBoundOffset(JsString, Point) Get the offset amount of a point outside the region @param {String} axis optional @param {Ext.util.Point} p the point @return {Ext.util.Offset}
getOutOfBoundOffsetX(JsNumber) Get the offset amount on the x-axis @param {Number} p the offset @return {Number}
getOutOfBoundOffsetY(JsNumber) Get the offset amount on the y-axis @param {Number} p the offset @return {Number}
getSize() Get the width / height of this region @return {Object} an object with width and height properties
intersect(Region) Checks if this region intersects the region passed in. @param {Ext.util.Region} region @return {Ext.util.Region/Boolean} Returns the intersected region or false if there is no intersection.
isOutOfBound(JsString, object) Check whether the point / offset is out of bound @param {String} axis optional @param {Ext.util.Point/Number} p the point / offset @return {Boolean}
isOutOfBoundX(JsNumber) Check whether the offset is out of bound in the x-axis @param {Number} p the offset @return {Boolean}
isOutOfBoundY(JsNumber) Check whether the offset is out of bound in the y-axis @param {Number} p the offset @return {Boolean}
restrict(JsString, object, JsNumber) Restrict a point within the region by a certain factor. @param {String} axis Optional @param {Ext.util.Point/Ext.util.Offset/Object} p @param {Number} factor @return {Ext.util.Point/Ext.util.Offset/Object/Number}
restrictX(JsNumber, JsNumber) Restrict an offset within the region by a certain factor, on the x-axis @param {Number} p @param {Number} factor The factor, optional, defaults to 1 @return
restrictY(JsNumber, JsNumber) Restrict an offset within the region by a certain factor, on the y-axis @param {Number} p @param {Number} factor The factor, optional, defaults to 1
round() Round all the properties of this region @return {Ext.util.Region} this This Region
toString() Dump this to an eye-friendly string, great for debugging @return {String}
translateBy(object) Translate this region by the given offset amount @param {Ext.util.Offset/Object} offset @return {Ext.util.Region} this This Region
union(Region) Returns the smallest region that contains the current AND targetRegion. @param {Ext.util.Region} region

Properties

Name Description
Size Get the width / height of this region @return {Object} an object with width and height properties
© Copyright 2005-2011 SharpKit. All rights reserved.