Go to the source code of this file.
CPDivideRect = CGRectDivide |
Creates two rectangles – slice and rem – from inRect, by dividing inRect with a line that's parallel to the side of inRect specified by edge. The size of slice is determined by amount, which specifies the distance from edge.
slice and rem must not be NULL.
CGRect
Definition at line 305 of file CPGeometry.j.
CPMakePoint = CGPointMake |
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 36 of file CPGeometry.j.
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 56 of file CPGeometry.j.
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 45 of file CPGeometry.j.
CPPointCreateCopy = CGPointMakeCopy |
Creates a copy of a specified point and returns the copy CGPoint
- Parameters
-
- Returns
- CGPoint the copy of the provided CGPoint
Definition at line 64 of file CPGeometry.j.
CPPointEqualToPoint = CGPointEqualToPoint |
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 74 of file CPGeometry.j.
CPPointFromEvent = CGPointFromEvent |
CGPoint
- Parameters
-
- Returns
- CGPoint
Definition at line 369 of file CPGeometry.j.
CPPointFromString = CGPointFromString |
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 346 of file CPGeometry.j.
Initial value:= function(aPoint, aRect)
{
return CGRectContainsPoint(aRect, aPoint)
}
Tests whether the CGPoint is contained by the CGRect. CGPoint
- Parameters
-
aPoint | the CGPoint to check |
aRect | the CGRect to check |
- Returns
- BOOL
YES
if the rect contains the point.
Definition at line 83 of file CPGeometry.j.
CPPointMake = CGPointMake |
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 132 of file CPGeometry.j.
CPPointMakeZero = CGPointMakeZero |
Returns a point located at
(0, 0). CGPoint
- Returns
- CGPoint a point located at
(0, 0)
Definition at line 390 of file CPGeometry.j.
CPRectContainsPoint = CGRectContainsPoint |
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 221 of file CPGeometry.j.
CPRectContainsRect = CGRectContainsRect |
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 114 of file CPGeometry.j.
CPRectCreateCopy = CGRectCreateCopy |
Creates a copy of the provided rectangle CGRect
- Parameters
-
aRect | the CGRect that will be copied |
- Returns
- CGRect the rectangle copy
Definition at line 157 of file CPGeometry.j.
CPRectEqualToRect = CGRectEqualToRect |
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 95 of file CPGeometry.j.
CPRectFromString = CGRectFromString |
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 362 of file CPGeometry.j.
CPRectGetHeight = CGRectGetHeight |
CPRectGetMaxX = CGRectGetMaxX |
CPRectGetMaxY = CGRectGetMaxY |
CPRectGetMidX = CGRectGetMidX |
CGRect
- Parameters
-
- Returns
- float
Definition at line 249 of file CPGeometry.j.
CPRectGetMidY = CGRectGetMidY |
CGRect
- Parameters
-
- Returns
- float
Definition at line 256 of file CPGeometry.j.
CPRectGetMinX = CGRectGetMinX |
CPRectGetMinY = CGRectGetMinY |
CPRectGetWidth = CGRectGetWidth |
CPRectInset = CGRectInset |
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 141 of file CPGeometry.j.
CPRectIntegral = CGRectIntegral |
CPRectIntersection = CGRectIntersection |
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 123 of file CPGeometry.j.
CPRectIntersectsRect = CGRectIntersectsRect |
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 286 of file CPGeometry.j.
CPRectIsEmpty = CGRectIsEmpty |
Returns YES
if the CGRect has no area. The test is performed by checking if the width and height are both zero. CGRect
- Parameters
-
- Returns
- BOOL
YES
if the CGRect has no area, and NO
, otherwise.
Definition at line 104 of file CPGeometry.j.
CPRectIsNull = CGRectIsNull |
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 294 of file CPGeometry.j.
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 168 of file CPGeometry.j.
CPRectMakeZero = CGRectMakeZero |
Returns a rectangle at origin
(0,0) and size of
(0,0). CGRect
- Returns
- CGRect a zeroed out CGRect
Definition at line 383 of file CPGeometry.j.
CPRectOffset = CGRectOffset |
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 178 of file CPGeometry.j.
CPRectStandardize = CGRectStandardize |
CGRect
- Parameters
-
- Returns
- CGRect
Definition at line 185 of file CPGeometry.j.
CPRectUnion = CGRectUnion |
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 194 of file CPGeometry.j.
CPSizeCreateCopy = CGSizeCreateCopy |
Creates and returns a copy of the provided CGSize CGSize
- Parameters
-
- Returns
- CGSize the copy of the CGSize
Definition at line 202 of file CPGeometry.j.
CPSizeEqualToSize = CGSizeEqualToSize |
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 314 of file CPGeometry.j.
CPSizeFromString = CGSizeFromString |
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 354 of file CPGeometry.j.
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 211 of file CPGeometry.j.
CPSizeMakeZero = CGSizeMakeZero |
Returns a zero sized CGSize. CGSize
- Returns
- CGSize a size object with zeros for
width
and height
Definition at line 376 of file CPGeometry.j.
CPStringFromPoint = CGStringFromPoint |
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 322 of file CPGeometry.j.
CPStringFromRect = CGStringFromRect |
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 338 of file CPGeometry.j.
CPStringFromSize = CGStringFromSize |
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 330 of file CPGeometry.j.