• 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
Re: Cracks in image using NSDrawThreePartImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cracks in image using NSDrawThreePartImage


  • Subject: Re: Cracks in image using NSDrawThreePartImage
  • From: Ken Ferry <email@hidden>
  • Date: Wed, 19 May 2010 14:30:43 -0700

Hi BJ,

File a bug with a test case that shows the problem.

I would expect there to be seams due to rounding error if you look in pixie,
but I have never seen a case where it was visible to the eye at actual
scale.

-Ken

On Wed, May 19, 2010 at 1:41 PM, B.J. Buchalter <email@hidden> wrote:

> 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
>
_______________________________________________

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: "B.J. Buchalter" <email@hidden>
    • Re: Cracks in image using NSDrawThreePartImage
      • From: Ricky Sharp <email@hidden>
References: 
 >Cracks in image using NSDrawThreePartImage (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: Re: Get controller from nib
  • Next by Date: Re: singleton design pattern
  • Previous by thread: Cracks in image using NSDrawThreePartImage
  • Next by thread: Re: Cracks in image using NSDrawThreePartImage
  • Index(es):
    • Date
    • Thread