Changeset 170 for trunk/docs/api
- Timestamp:
- Apr 19, 2011, 9:31:01 PM (14 years ago)
- Location:
- trunk/docs/api
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/api/zoo-bounds.txt
r161 r170 87 87 Construct a new bounds object. 88 88 89 *Parameters* 90 91 | ``left {Number}`` The left bounds of the box. Note that for width calculations, this is assumed to be less than the right value. 92 | ``bottom {Number}`` The bottom bounds of the box. Note that for height calculations, this is assumed to be more than the top value. 93 | ``right {Number}`` The right bounds. 94 | ``top {Number}`` The top bounds. 95 89 96 .. _clone: 90 97 91 98 clone 99 :: 100 101 clone:function() 102 92 103 Create a cloned instance of this bounds. 93 104 105 *Returns* 106 107 :ref:`{ZOO.Bounds} <api-zoo-bounds>` A fresh copy of the bounds 108 94 109 .. _equals: 95 110 96 111 equals 112 :: 113 114 equals:function(bounds) 115 97 116 Test a two bounds for equivalence. 98 117 118 *Parameters* 119 120 | ``bounds {ZOO.Bounds}`` 121 122 *Returns* 123 124 ``{Boolean}`` The passed-in bounds object has the same left, right, top, bottom components as this. Note 125 that if bounds passed in is null, returns false. 126 99 127 .. _toString: 100 128 101 129 toString 102 {String} String representation of bounds object. 130 :: 131 132 toString:function() 133 134 *Returns* 135 136 ``{String}`` String representation of bounds object. (ex. *<i>"left-bottom=(5,42) right-top=(10,45)"</i>*) 103 137 104 138 .. _toBBOX: 105 139 106 140 toBBOX 141 :: 142 143 toBBOX:function(decimal) 144 145 *Parameters* 146 147 ``decimal {Integer}`` How many significant digits in the bbox coords? Default is 6 148 149 *Returns* 150 151 ``{String}`` Simple String representation of bounds object. (ex. *<i>"5,42,10,45"</i>*) 107 152 108 153 .. _toGeometry: 109 154 110 155 toGeometry 156 :: 157 158 toGeometry: function() 159 111 160 Create a new polygon geometry based on this bounds. 161 162 *Returns* 163 164 :ref:`{ZOO.Geometry.Polygon} <api-zoo-geometry-polygon>` A new polygon with the coordinates of this bounds. 112 165 113 166 .. _getWidth: 114 167 115 168 getWidth 116 {Float} The width of the bounds 169 :: 170 171 getWidth:function() 172 173 *Returns* 174 175 ``{Float}`` The width of the bounds 117 176 118 177 .. _getHeight: 119 178 120 179 getHeight 121 {Float} The height of the bounds (top minus bottom) 180 :: 181 182 getHeight:function() 183 184 *Returns* 185 186 ``{Float}`` The height of the bounds (top minus bottom). 122 187 123 188 .. _add: 124 189 125 190 add 191 :: 192 193 add:function(x,y) 194 195 *Parameters* 196 197 | ``x {Float}`` 198 | ``y {Float}`` 199 200 *Returns* 201 202 :ref:`{ZOO.Bounds} <api-zoo-bounds>` A new bounds whose coordinates are the same as this, but shifted by the passed-in x and y values. 126 203 127 204 .. _extend: 128 205 129 206 extend 130 Extend the bounds to include the point, lonlat, or bounds specified. 207 :: 208 209 extend:function(object) 210 211 Extend the bounds to include the point, lonlat, or bounds specified. Note, this function assumes that left 212 < right and bottom < top. 213 214 *Parameters* 215 216 ``object {Object}`` Can be Point, or Bounds. 131 217 132 218 .. _intersectsBounds: 133 219 134 220 intersectsBounds 135 Determine whether the target bounds intersects this bounds. 221 :: 222 223 intersectsBounds:function(bounds,inclusive) 224 225 Determine whether the target bounds intersects this bounds. Bounds are considered intersecting if any 226 of their edges intersect or if one bounds contains the other. 227 228 *Parameters* 229 230 | ``bounds`` :ref:`{ZOO.Bounds} <api-zoo-bounds>` The target bounds. 231 | ``inclusive {Boolean}`` Treat coincident borders as intersecting. Default is true. If false, bounds that do not overlap but only touch at the border will not be considered as intersecting. 232 233 *Returns* 234 235 ``{Boolean}`` The passed-in bounds object intersects this bounds. 136 236 137 237 .. _containsBounds: 138 238 139 239 containsBounds 240 :: 241 242 containsBounds:function(bounds,partial,inclusive) 243 140 244 Determine whether the target bounds is contained within this bounds. 245 246 *Parameters* 247 248 | ``bounds`` :ref:`{ZOO.Bounds} <api-zoo-bounds>` The target bounds. 249 | ``partial {Boolean}`` If any of the target corners is within this bounds consider the bounds contained. Default is false. If true, the entire target bounds must be contained within this bounds. 250 | ``inclusive {Boolean}`` Treat shared edges as contained. Default is true. 251 252 *Returns* 253 254 ``{Boolean}`` The passed-in bounds object is contained within this bounds. -
trunk/docs/api/zoo.txt
r169 r170 161 161 *Parameters:* 162 162 163 | ``p1`` :ref:`{ZOO.Geometry.Point} < zoo-geometry-point>` (or any object with both .x, .y properties)164 | ``p2`` :ref:`{ZOO.Geometry.Point} < zoo-geometry-point>` (or any object with both .x, .y properties)163 | ``p1`` :ref:`{ZOO.Geometry.Point} <api-zoo-geometry-point>` (or any object with both .x, .y properties) 164 | ``p2`` :ref:`{ZOO.Geometry.Point} <api-zoo-geometry-point>` (or any object with both .x, .y properties) 165 165 166 166 .. _Class:
Note: See TracChangeset
for help on using the changeset viewer.