AppKit/CPGeometry.j File Reference

Go to the source code of this file.

Functions

function CPPointCreateCopy (aPoint)
function CPPointMake (x, y)
function CPRectInset (aRect, dX, dY)
function CPRectIntegral (aRect)
function CPRectIntersection (lhsRect, rhsRect)
function CPRectCreateCopy (aRect)
function CPRectMake (x, y, width, height)
function CPRectOffset (aRect, dX, dY)
function CPRectStandardize (aRect)
function CPRectUnion (lhsRect, rhsRect)
function CPSizeCreateCopy (aSize)
function CPSizeMake (width, height)
function CPRectContainsPoint (aRect, aPoint)
function CPRectContainsRect (lhsRect, rhsRect)
function CPPointEqualToPoint (lhsPoint, rhsPoint)
function CPRectEqualToRect (lhsRect, rhsRect)
function CPRectGetHeight (aRect)
function CPRectGetMaxX (aRect)
function CPRectGetMaxY (aRect)
function CPRectGetMidX (aRect)
function CPRectGetMidY (aRect)
function CPRectGetMinX (aRect)
function CPRectGetMinY (aRect)
function CPRectGetWidth (aRect)
function CPRectIntersectsRect (lhsRect, rhsRect)
function CPRectIsEmpty (aRect)
function CPRectIsNull (aRect)
function CPSizeEqualToSize (lhsSize, rhsSize)
function CPStringFromPoint (aPoint)
function CPStringFromSize (aSize)
function CPStringFromRect (aRect)
function CPPointFromString (aString)
function CPSizeFromString (aString)
function CPRectFromString (aString)
function CPPointFromEvent (anEvent)
function CPSizeMakeZero ()
function CPRectMakeZero ()
function CPPointMakeZero ()

Variables

import CGGeometry j CPMinXEdge = 0
 CPMinYEdge = 1
 CPMaxXEdge = 2
 CPMaxYEdge = 3
 CPMakePoint = CGPointMake
 CPMakeSize = CGSizeMake
 CPMakeRect = CGRectMake


Function Documentation

function CPPointCreateCopy ( aPoint   ) 

Creates a copy of a specified point and returns the copy CGPoint

Parameters:
the point to be copied
Returns:
CGPoint the copy of the provided CGPoint

Definition at line 42 of file CPGeometry.j.

function CPPointEqualToPoint ( lhsPoint  ,
rhsPoint   
)

Tests whether the two CGPoints are equal to each other by comparing their x and y members.

Parameters:
lhsPoint the first CGPoint to check
rhsPoint the second CGPoint to check
Returns:
BOOL YES if the two points have the same x's, and the same y's.

Definition at line 245 of file CPGeometry.j.

function CPPointFromEvent ( anEvent   ) 

CGPoint

Parameters:
anEvent 
Returns:
CGPoint

Definition at line 467 of file CPGeometry.j.

function CPPointFromString ( aString   ) 

Returns a CGPoint from a string with a comma separated pair of integers. CGPoint

Parameters:
aString a string containing two comma separated integers
Returns:
CGPoint the point object created from the string

Definition at line 429 of file CPGeometry.j.

function CPPointMake ( ,
y   
)

Makes a CGPoint object out of two numbers provided as arguments CGPoint

Parameters:
x the x-coordinate of the CGPoint
y the y-coordinate of the CGPoint
Returns:
CGPoint a CGPoint with an X and Y coordinate equal to the function arguments

Definition at line 54 of file CPGeometry.j.

function CPPointMakeZero (  ) 

Returns a point located at (0, 0). CGPoint

Returns:
CGPoint a point located at (0, 0)

Definition at line 497 of file CPGeometry.j.

function CPRectContainsPoint ( aRect  ,
aPoint   
)

Returns YES if the CGRect, aRect, contains the CGPoint, aPoint.

Parameters:
aRect the rectangle to test with
aPoint the point to test with CGRect
Returns:
BOOL YES if the rectangle contains the point, NO otherwise.

Definition at line 216 of file CPGeometry.j.

function CPRectContainsRect ( lhsRect  ,
rhsRect   
)

Returns a BOOL indicating whether CGRect possibleOuter contains CGRect possibleInner. CGRect

Parameters:
possibleOuter the CGRect to test if possibleInner is inside of
possibleInner the CGRect to test if it fits inside possibleOuter.
Returns:
BOOL YES if possibleInner fits inside possibleOuter.

Definition at line 232 of file CPGeometry.j.

function CPRectCreateCopy ( aRect   ) 

Creates a copy of the provided rectangle CGRect

Parameters:
aRect the CGRect that will be copied
Returns:
CGRect the rectangle copy

Definition at line 110 of file CPGeometry.j.

function CPRectEqualToRect ( lhsRect  ,
rhsRect   
)

Test whether the two CGRects have the same origin and size CGRect

Parameters:
lhsRect the first CGRect to compare
rhsRect the second CGRect to compare
Returns:
BOOL YES if the two rectangles have the same origin and size. NO, otherwise.

Definition at line 257 of file CPGeometry.j.

function CPRectFromString ( aString   ) 

Returns a CGRect created from a string. CGRect

Parameters:
aString a string in the form generated by CPStringFromRect
Returns:
CGRect the rectangle created from the string

Definition at line 455 of file CPGeometry.j.

function CPRectGetHeight ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 268 of file CPGeometry.j.

function CPRectGetMaxX ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 278 of file CPGeometry.j.

function CPRectGetMaxY ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 288 of file CPGeometry.j.

function CPRectGetMidX ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
float

Definition at line 298 of file CPGeometry.j.

function CPRectGetMidY ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
float

Definition at line 308 of file CPGeometry.j.

function CPRectGetMinX ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 318 of file CPGeometry.j.

function CPRectGetMinY ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 328 of file CPGeometry.j.

function CPRectGetWidth ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
int

Definition at line 338 of file CPGeometry.j.

function CPRectInset ( aRect  ,
dX  ,
dY   
)

Makes a CGRect with an origin and size equal to aRect less the dX/dY insets specified.

Parameters:
dX the size of the inset in the x-axis
dY the size of the inset in the y-axis CGRect
Returns:
CGRect a rectangle like aRect with an inset

Definition at line 66 of file CPGeometry.j.

function CPRectIntegral ( aRect   ) 

CGRect

Returns:
void
Deprecated:

Definition at line 78 of file CPGeometry.j.

function CPRectIntersection ( lhsRect  ,
rhsRect   
)

Returns the intersection of the two provided rectangles as a new rectangle CGRect

Parameters:
lhsRect the first rectangle used for calculation
rhsRect the second rectangle used for calculation
Returns:
CGRect the intersection of the two rectangles

Definition at line 91 of file CPGeometry.j.

function CPRectIntersectsRect ( lhsRect  ,
rhsRect   
)

Returns YES if the two rectangles intersect CGRect

Parameters:
lhsRect the first CGRect
rhsRect the second CGRect
Returns:
BOOL YES if the two rectangles have any common spaces, and NO, otherwise.

Definition at line 350 of file CPGeometry.j.

function CPRectIsEmpty ( aRect   ) 

Returns YES if the CGRect has no area. The test is performed by checking if the width and height are both zero. CGRect

Parameters:
aRect the CGRect to test
Returns:
BOOL YES if the CGRect has no area, and NO, otherwise.

Definition at line 362 of file CPGeometry.j.

function CPRectIsNull ( aRect   ) 

Returns YES if the CGRect has no area. The test is performed by checking if the width and height are both zero. CGRect

Returns:
BOOL YES if the CGRect has no area, and NO, otherwise.

Definition at line 373 of file CPGeometry.j.

function CPRectMake ( ,
y  ,
width  ,
height   
)

Returns a CGRect made of the specified arguments CGRect

Parameters:
x the x-coordinate of the rectangle's origin
y the y-coordinate of the rectangle's origin
width the width of the new rectangle
height the height of the new rectangle
Returns:
CGRect the new rectangle

Definition at line 124 of file CPGeometry.j.

function CPRectMakeZero (  ) 

Returns a rectangle at origin (0,0) and size of (0,0). CGRect

Returns:
CGRect a zeroed out CGRect

Definition at line 487 of file CPGeometry.j.

function CPRectOffset ( aRect  ,
dX  ,
dY   
)

Creates a new rectangle with its origin offset by dX and dY. CGRect

Parameters:
aRect the rectangle to copy the origin and size from
dX the amount added to the x-size of the new rectangle
dY the amount added to the y-size of the new rectangle
Returns:
CGRect the new rectangle with modified size

Definition at line 137 of file CPGeometry.j.

function CPRectStandardize ( aRect   ) 

CGRect

Parameters:
aRect a CGRect
Returns:
CGRect

Definition at line 147 of file CPGeometry.j.

function CPRectUnion ( lhsRect  ,
rhsRect   
)

Returns the smallest rectangle that can contain the two argument CGRects. CGRect

Parameters:
lhsRect the first CGRect to use for the union calculation
rhsRect the second CGRect to use for the union calculation
Returns:
CGRect the union rectangle

Definition at line 175 of file CPGeometry.j.

function CPSizeCreateCopy ( aSize   ) 

Creates and returns a copy of the provided CGSize CGSize

Parameters:
aSize the CGSize to copy
Returns:
CGSize the copy of the CGSize

Definition at line 191 of file CPGeometry.j.

function CPSizeEqualToSize ( lhsSize  ,
rhsSize   
)

Returns YES if the two CGSizes are identical. CGSize

Parameters:
lhsSize the first CGSize to compare
rhsSize the second CGSize to compare
Returns:
BOOL YES if the two sizes are identical. NO, otherwise.

Definition at line 385 of file CPGeometry.j.

function CPSizeFromString ( aString   ) 

Returns a CGSize from a string containing a pair of comma separated integers. CGSize

Parameters:
aString a string containing two comma separated integers
Returns:
CGSize the size object created from the string

Definition at line 442 of file CPGeometry.j.

function CPSizeMake ( width  ,
height   
)

Creates and returns a new CGSize object from the provided dimensions. CGSize

Parameters:
width the width for the new CGSize
height the height for the new CGSize
Returns:
CGSize the new CGSize

Definition at line 203 of file CPGeometry.j.

function CPSizeMakeZero (  ) 

Returns a zero sized CGSize. CGSize

Returns:
CGSize a size object with zeros for width and height

Definition at line 477 of file CPGeometry.j.

function CPStringFromPoint ( aPoint   ) 

Returns a human readable string of the provided CGPoint. CGPoint

Parameters:
aPoint the point to represent
Returns:
CGPoint a string representation of the CGPoint

Definition at line 396 of file CPGeometry.j.

function CPStringFromRect ( aRect   ) 

Returns a human readable string of the provided CGRect. CGRect

Parameters:
aRect the rectangle to represent
Returns:
CGString the string representation of the rectangle

Definition at line 418 of file CPGeometry.j.

function CPStringFromSize ( aSize   ) 

Returns a human readable string of the provided CGSize. CGSize

Parameters:
aSize the size to represent
Returns:
CGSize a string representation of the CGSize

Definition at line 407 of file CPGeometry.j.


Variable Documentation

CPMakePoint = CGPointMake

Definition at line 32 of file CPGeometry.j.

CPMakeRect = CGRectMake

Definition at line 34 of file CPGeometry.j.

CPMakeSize = CGSizeMake

Definition at line 33 of file CPGeometry.j.

Definition at line 28 of file CPGeometry.j.

Definition at line 29 of file CPGeometry.j.

import CGGeometry j CPMinXEdge = 0

Definition at line 26 of file CPGeometry.j.

Definition at line 27 of file CPGeometry.j.


Generated on Thu Dec 11 01:55:48 2008 for Cappuccino by  doxygen 1.5.7.1