GraphicsUtils.h
author Jens Alfke <jens@mooseyard.com>
Fri Apr 18 09:25:10 2008 -0700 (2008-04-18)
changeset 6 2d492d8c2053
parent 2 3d3dcc3116d5
permissions -rw-r--r--
Added -reopenWith:.
jens@0
     1
//
jens@0
     2
//  GraphicsUtils.h
jens@0
     3
//  MYUtilities
jens@0
     4
//
jens@0
     5
//  Copyright 2008 Jens Alfke. All rights reserved.
jens@0
     6
//
jens@0
     7
jens@0
     8
#import <Cocoa/Cocoa.h>
jens@0
     9
jens@0
    10
jens@0
    11
@interface NSImage (MYUtilities)
jens@0
    12
- (NSImage*) my_shrunkToFitIn: (NSSize) maxSize;
jens@0
    13
- (NSSize) my_sizeOfLargestRep;
jens@0
    14
- (NSData*) my_JPEGData;
jens@2
    15
- (NSData*) my_dataInFormat: (NSBitmapImageFileType)format quality: (float)quality;
jens@0
    16
@end
jens@0
    17
jens@0
    18
jens@0
    19
@interface NSBezierPath (MYUtilities)
jens@0
    20
+ (NSBezierPath*) my_bezierPathWithRoundRect: (NSRect)rect radius: (float)radius;
jens@0
    21
@end
jens@2
    22
jens@2
    23
jens@2
    24
NSArray* OpenWindowsWithDelegateClass( Class klass );
jens@2
    25
jens@2
    26
jens@2
    27
/** Moves/resizes r to fit inside container */
jens@2
    28
NSRect PinRect( NSRect r, NSRect container );
jens@3
    29
jens@3
    30
OSStatus LoadFontsFromBundle( NSBundle *bundle );
jens@3
    31
OSStatus LoadFontsFromPath( NSString* path );