GraphicsUtils.h
author Jens Alfke <jens@mooseyard.com>
Sun May 03 10:13:31 2009 -0700 (2009-05-03)
changeset 27 256370e8935a
parent 2 3d3dcc3116d5
permissions -rw-r--r--
* MYTask: Added -commandLine, overhauled logging.
* MYDirectoryWatcher: Overhauled logging.
* MYErrorUtils: Disabled use of Security API (so it'll build without linking against Security.framework.)
     1 //
     2 //  GraphicsUtils.h
     3 //  MYUtilities
     4 //
     5 //  Copyright 2008 Jens Alfke. All rights reserved.
     6 //
     7 
     8 #import <Cocoa/Cocoa.h>
     9 
    10 
    11 @interface NSImage (MYUtilities)
    12 - (NSImage*) my_shrunkToFitIn: (NSSize) maxSize;
    13 - (NSSize) my_sizeOfLargestRep;
    14 - (NSData*) my_JPEGData;
    15 - (NSData*) my_dataInFormat: (NSBitmapImageFileType)format quality: (float)quality;
    16 @end
    17 
    18 
    19 @interface NSBezierPath (MYUtilities)
    20 + (NSBezierPath*) my_bezierPathWithRoundRect: (NSRect)rect radius: (float)radius;
    21 @end
    22 
    23 
    24 NSArray* OpenWindowsWithDelegateClass( Class klass );
    25 
    26 
    27 /** Moves/resizes r to fit inside container */
    28 NSRect PinRect( NSRect r, NSRect container );
    29 
    30 OSStatus LoadFontsFromBundle( NSBundle *bundle );
    31 OSStatus LoadFontsFromPath( NSString* path );