Changeset 170


Ignore:
Timestamp:
Apr 19, 2011, 9:31:01 PM (9 years ago)
Author:
jmckenna
Message:

add missing function details

Location:
trunk/docs/api
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/api/zoo-bounds.txt

    r161 r170  
    8787  Construct a new bounds object.
    8888 
     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 
    8996.. _clone:       
    9097
    9198clone   
     99  ::
     100 
     101    clone:function()
     102
    92103  Create a cloned instance of this bounds.
    93104
     105  *Returns*
     106
     107  :ref:`{ZOO.Bounds} <api-zoo-bounds>` A fresh copy of the bounds
     108
    94109.. _equals:       
    95110
    96111equals 
     112  ::
     113 
     114    equals:function(bounds)
     115
    97116  Test a two bounds for equivalence.
    98117
     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
    99127.. _toString:
    100128
    101129toString       
    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>*)
    103137 
    104138.. _toBBOX:   
    105139 
    106140toBBOX 
     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>*) 
    107152
    108153.. _toGeometry:   
    109154
    110155toGeometry     
     156  ::
     157 
     158    toGeometry: function()
     159
    111160  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.
    112165 
    113166.. _getWidth:     
    114167
    115168getWidth       
    116   {Float} The width of the bounds
     169  ::   
     170 
     171    getWidth:function()
     172
     173  *Returns*
     174
     175  ``{Float}`` The width of the bounds
    117176 
    118177.. _getHeight:       
    119178 
    120179getHeight       
    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).
    122187
    123188.. _add:       
    124189
    125190add
     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.
    126203
    127204.. _extend:       
    128205
    129206extend 
    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.
    131217 
    132218.. _intersectsBounds:         
    133219 
    134220intersectsBounds       
    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.
    136236 
    137237.. _containsBounds:         
    138238 
    139239containsBounds 
     240  ::
     241 
     242    containsBounds:function(bounds,partial,inclusive)
     243
    140244  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  
    161161  *Parameters:*
    162162
    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)
    165165
    166166.. _Class:
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png