Ignore:
Timestamp:
10/20/02 04:41:17 (22 years ago)
Author:
Nicholas Riley
Message:

F-Script Anywhere 1.1.2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/NJRLabeledImageCell.m

    r7 r14  
    9696- (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
    9797    if (image != nil) {
    98         NSSize  imageSize, repSize;
     98        NSSize  imageSize;
    9999        NSRect  imageFrame;
    100         NSArray *imageReps;
    101         int i, repCount;
    102100        NSImageRep *preferredRep, *rep;
    103101
     
    107105        if (preferredRep != nil && abs([preferredRep size].width - imageSize.width) < 1 && abs([preferredRep size].height != imageSize.height) < 1) {
    108106            [self setImage: [imageCacheSource cachedImage]];
    109             // NSLog(@"%@ accepting cached image: %@", [self stringValue], preferredRep);
     107            FSALog(@"%@ accepting cached image: %@", [self stringValue], preferredRep);
    110108        } else {
    111             // NSLog(@"%@ rejecting cached image: %@", [self stringValue], preferredRep);
    112             imageReps = [image representations];
    113             repCount = [imageReps count];
     109            NSArray     *imageReps = [image representations];
     110            int         i, repCount = [imageReps count];
     111            NSSize      repSize;
     112           
    114113            preferredRep = [imageReps objectAtIndex: 0];
     114            FSALog(@"%@ rejecting cached image: %@", [self stringValue], preferredRep);
    115115            for (i = 1 ; i < repCount ; i++) {
    116116                rep = [imageReps objectAtIndex: i];
     
    140140            */
    141141            // Begin workaround code for bug in OS X 10.1 (removeRepresentation: has no effect)
    142             // This uses a lot more memory because the icons aren't shared - punting.
    143142            if ([preferredRep size].width > imageSize.width || [preferredRep size].height > imageSize.height) {
    144143                NSImage *scaledImage = [[NSImage alloc] initWithSize: imageSize];
    145144                NSRect rect = { NSZeroPoint, imageSize };
    146                 // NSLog(@"rescaling %@", [self stringValue]);
     145                FSALog(@"rescaling %@", [self stringValue]);
     146                [scaledImage setFlipped: [controlView isFlipped]]; // XXX this works, but is correct?
    147147                [scaledImage lockFocus];
    148148                [preferredRep drawInRect: rect];
Note: See TracChangeset for help on using the changeset viewer.