Articles and Tutorials

GSBounds

Represents a 2-dimensional bounding box. If a GSBounds instance is in the NZMG coordinate system the minimum coordinate represents the bottom left corner of the bounding box as the value of the y axis increases from bottom to top.
Field Summary
 float maxX
          The x coordinate of the top right corner of the bounding box
 float maxY
          The y coordinate of the top right corner of the bounding box
 float minX
          The x coordinate of the bottom left corner of the bounding box
 float minY
          The y coordinate of the bottom left corner of the bounding box
 
Constructor Summary
GSBounds (<float> minX, <float> minY, <float> maxX, <float> maxY)
            Creates a new GSBounds object.
 
Method Summary
 Object contains(<GSPoint> point)
           Returns true if the specified point is contained within this bounding box.
 String toString()
           Outputs this bounds properties as a String

Field Detail

maxX

float maxX
    The x coordinate of the top right corner of the bounding box

maxY

float maxY
    The y coordinate of the top right corner of the bounding box

minX

float minX
    The x coordinate of the bottom left corner of the bounding box

minY

float minY
    The y coordinate of the bottom left corner of the bounding box
Constructor Detail

GSBounds

GSBounds(<float> minX, <float> minY, <float> maxX, <float> maxY)
    Creates a new GSBounds object. The new instance may optionally be initialized with its bounds.
  •  
      minX - the x coordinate of the bottom left corner of the bounding box
      minY - the y coordinate of the bottom left corner of the bounding box
      maxX - the x coordinate of the top right corner of the bounding box
      maxY - the y coordinate of the top right corner of the bounding box
  • Parameters:
Method Detail

contains

Object contains(<GSPoint> point)
    Returns true if the specified point is contained within this bounding box.
  •  
      point - the point to test
  • Parameters:
  •  
      true if the point is within this bounding box
  • Returns:

toString

String toString()
    Outputs this bounds properties as a String
  •  
      this bounds properties as a String
  • Returns: