vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Class Methods
VVSizingTool Class Reference

Simplifies the act of generating transforms and other geometry-related data around the relatively common act of resizing one rect to fit inside another. More...

#import <VVSizingTool.h>

Inherits NSObject.

Class Methods

(NSAffineTransform *) + transformThatFitsRect:inRect:sizingMode:
 Uses +[VVSizingTool rectThatFitsRect:inRect:sizingMode:] to determine the new rect coordinates, then creates and returns an NSAffineTransform that can be used to transform arbitrary geometry in the same fashion. More...
 
(NSAffineTransform *) + inverseTransformThatFitsRect:inRect:sizingMode:
 Uses +[VVSizingTool rectThatFitsRect:inRect:sizingMode:] to determine the new rect coordinates, then creates and returns the inverse transform of +[VVSizingTool transformThatFitsRect:inRect:sizingMode:]. More...
 
(NSRect) + rectThatFitsRect:inRect:sizingMode:
 

Detailed Description

Simplifies the act of generating transforms and other geometry-related data around the relatively common act of resizing one rect to fit inside another.

Method Documentation

+ (NSAffineTransform *) inverseTransformThatFitsRect: (NSRect)  a
inRect: (NSRect)  b
sizingMode: (VVSizingMode m 

Uses +[VVSizingTool rectThatFitsRect:inRect:sizingMode:] to determine the new rect coordinates, then creates and returns the inverse transform of +[VVSizingTool transformThatFitsRect:inRect:sizingMode:].

Parameters
aThis is the rect that you want to resize
bThis is the area you want to resize the rect to fit inside
mthis is the sizing mode you want to use to resize rect "a" to be inside rect "b"
Returns
The returned value is what param/rect "a"'s coordinates would be given its dimensions and the supplied sizing mode.
+ (NSRect) rectThatFitsRect: (NSRect)  a
inRect: (NSRect)  b
sizingMode: (VVSizingMode m 
Parameters
aThis is the rect that you want to resize
bThis is the area you want to resize the rect to fit inside
mthis is the sizing mode you want to use to resize rect "a" to be inside rect "b"
Returns
The returned value is what param/rect "a"'s coordinates would be given its dimensions and the supplied sizing mode.
+ (NSAffineTransform *) transformThatFitsRect: (NSRect)  a
inRect: (NSRect)  b
sizingMode: (VVSizingMode m 

Uses +[VVSizingTool rectThatFitsRect:inRect:sizingMode:] to determine the new rect coordinates, then creates and returns an NSAffineTransform that can be used to transform arbitrary geometry in the same fashion.

Parameters
aThis is the rect that you want to resize
bThis is the area you want to resize the rect to fit inside
mthis is the sizing mode you want to use to resize rect "a" to be inside rect "b"
Returns
The returned value is what param/rect "a"'s coordinates would be given its dimensions and the supplied sizing mode.

The documentation for this class was generated from the following files: