Hi Folks,

I have followed the suggestion in the documentation to use NSDrawThreePartImage to draw an extensible image.

The way that I am using it, the image is extensible in the horizontal dimension, and may be resized in the vertical dimension, so the individual component images are rescaled proportionally. That is as I expect and what I am looking for.

Unfortunately, when the vertical scale factor is not 1.0, there are (subtle) 1 pixel visual artifacts between the startCap and centerFill images or the centerFill and endCap images.

I was under the impression that this API was specifically designed to handle this properly.

Is there anything in specific I need to do, or is there a bug in the API's implementation.

The code that I am using in my view subclass is as follows:

- (void)drawRect:(NSRect)rect {
        NSRect bnds = [self bounds];
NSDrawThreePartImage(bnds, left, middle, right, NO, NSCompositeSourceOver, 1, NO);
}

TIA,

B.J. Buchalter
Metric Halo
http://www.mhlabs.com
        


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to