| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
OK, this seems like a really simple thing, but I'm not getting it. I have an NSImage that was created from some 1-bit bitmap data using that really long NSBitmapImageRep initWithBitmapDataPlanes... method. I need to pad the image with a couple of pixels worth of whitespace all the way around.
I tried:
1. create new NSImage that is 4 pixels larger in width and height;
2. lock focus on new image
3. tell original image to compositeToPoint 2,2 (also tried dissolveToPoint and drawAtPoint)
The problem with the above is that I end up with a fuzzy looking image, I guess due to anti-aliasing. I'm guessing (hoping?) there's a much better / cleaner way of doing this so that I end up with the same bitmap, just padded with some whitespace.
| References: | |
| >Increasing size of NSImage by adding padding (From: Glen Simmons <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.