Functions
Functions
Default
- void ETAutoresize(CGFloat * position, CGFloat * size, BOOL minMarginFlexible, BOOL sizeFlexible, BOOL maxMarginFlexible, CGFloat newContainerSize, CGFloat oldContainerSize)
- Description forthcoming.
- NSRect ETCenteredRect(NSSize aSize, NSRect inRect)
Returns a rect that uses aSize as its size and centered inside the given rect.
The returned rect is expressed relative the given rect parent coordinate space.
To get a rect expressed relative the the given rect itself, pass a rect with a zero origin: NSRect inRect = NSMakeRect(40, 50, 100, 200); NSRect centeredRectSize = NSMakeSize(50, 100); NSRect rect = ETCenteredRect(centeredRectSize, ETMakeRect(NSZeroPoint, inRect.size)); The resulting rect is equal to {25, 50, 50, 100}.The returned rect origin is valid whether or not your coordinate space is flipped.
- BOOL ETIsNullPoint(NSPoint aPoint)
Returns whether the given point is equal to ETNullPoint.
- BOOL ETIsNullRect(NSRect rect)
Returns whether rect is equal to ETNullRect.
- NSRect ETMakeRect(NSPoint origin, NSSize size)
Returns a rect with the given origin and size.
- BOOL ETPointInsideRect(NSPoint aPoint, NSRect rect)
Returns whether rect contains a point expressed in coordinates relative to the rect origin.
- NSRect ETScaleRect(NSRect frame, CGFloat factor)
Returns a rect with a width and height multiplied by the given factor and by shifting the origin to retain the original rect center location.
- NSSize ETScaleSize(NSSize size, CGFloat factor)
Returns a size with a width and height multiplied by the given factor.
- NSRect ETScaledRect(NSSize aSize, NSRect inRect, ETContentAspect anAspect)
Returns a rect that uses aSize scaled based on the content aspect rule and then centered inside the given rect.
The returned rect is expressed relative the given rect parent coordinate space.
To get a rect expressed relative the the given rect itself, see ETCenteredRect() .The returned rect origin is valid whether or not your coordinate space is flipped.
- BOOL ETSizeEqualToSize(NSSize size1, NSSize size2)
Returns whether the sizes are equal or precisely almost equal. To be considered equal, the size variation must remain smaller than FLT_EPSILON. On Mac OS X, NSEqualsSize tests exact equality unlike GNUstep implementation.
- NSRect ETStandardizeRect(NSRect rect)
Returns a rect with a positive width and height by shifting the origin as needed.
- NSPoint ETSumPoint(NSPoint aPoint, NSPoint otherPoint)
Returns a new point by summing the x and y coordinates of two points.
- NSPoint ETSumPointAndSize(NSPoint aPoint, NSSize aSize)
Returns a new point by summing the point x and y coordinates with the size width and height.
- NSRect ETUnionRectWithObjectsAndSelector(NSArray * itemArray, SEL rectSelector)
Returns an union rect computed by iterating over itemArray and unionning the rects returned by the objects which must all respond to rectSelector.
itemArray must only contain objects of the same type.
A zero rect is returned when itemArray is empty.
