- (void)drawSign:(NSString*)s centeredIn:(NSRect)r { NSPoint stringOrigin; NSSize stringSize; NSMutableDictionary *attributes = [NSMutableDictionary new]; [attributes setObject:[NSFont fontWithName:@"Helvetica" size:r.size.height] forKey:NSFontAttributeName]; [attributes setObject:[NSColor darkGrayColor] forKey:NSForegroundColorAttributeName]; stringSize = [s sizeWithAttributes:attributes]; stringOrigin.x = r.origin.x + (r.size.width - stringSize.width)/2; stringOrigin.y = r.origin.y + (r.size.height - stringSize.height)/2; [s drawAtPoint:stringOrigin withAttributes:attributes]; [attributes release]; [s release]; }