• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Cracks in image using NSDrawThreePartImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cracks in image using NSDrawThreePartImage


  • Subject: Cracks in image using NSDrawThreePartImage
  • From: "B.J. Buchalter" <email@hidden>
  • Date: Wed, 19 May 2010 16:41:09 -0400

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Cracks in image using NSDrawThreePartImage
      • From: Ken Ferry <email@hidden>
  • Prev by Date: Re: Why I can't see my localized nib?
  • Next by Date: Re: Specify "Sent Action on" Behavior of NSTextField
  • Previous by thread: Scripting Bridge to Mail using predicates question
  • Next by thread: Re: Cracks in image using NSDrawThreePartImage
  • Index(es):
    • Date
    • Thread