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.
Simplifies the act of generating transforms and other geometry-related data around the relatively common act of resizing one rect to fit inside another.
+ (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
-
a | This is the rect that you want to resize |
b | This is the area you want to resize the rect to fit inside |
m | this 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
-
a | This is the rect that you want to resize |
b | This is the area you want to resize the rect to fit inside |
m | this 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
-
a | This is the rect that you want to resize |
b | This is the area you want to resize the rect to fit inside |
m | this 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: