File: programming/cocoa/UKDistributedView.zip/UliKit/NSImage NiceScaling.m


/* =============================================================================
    PROJECT:    Filie
    FILE:       NSImage+NiceScaling.h
    
    COPYRIGHT:  (c) 2003 by M. Uli Kusterer, all rights reserved.
    
    AUTHORS:    M. Uli Kusterer - UK
    
    LICENSES:   GNU GPL, Modified BSD
    
    REVISIONS:
        2003-12-19  UK  Created.
   ========================================================================== */
 
// -----------------------------------------------------------------------------
//  Headers:
// -----------------------------------------------------------------------------
 
#import "NSImage+NiceScaling.h"
"Couldn't scale image %@"// Center it:
// Center h and v.
// Center h, v at top.
// h at left, v at top.
// h at left, center v.
// h at left, v at bottom
// center h, v at bottom.
// h at right, v at bottom.
// h at right, center v.
// h at right, v at top.
"Couldn't scale image %@"//if( imgSize.width > size.width || imgSize.height > size.height )
/*if( imgSize.width == size.width
		&& imgSize.height == size.height )
		return imgSize;*/

This code uses the PclZip Zip File reading code, which is subject to the GNU LGPL. It also uses the GeSHi syntax highlighter, subject to the GPL. Ask if you want this for your own web site, it's free.