• 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: Subviews becoming blurry or "chopped up"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subviews becoming blurry or "chopped up"


  • Subject: Re: Subviews becoming blurry or "chopped up"
  • From: Ricky Sharp <email@hidden>
  • Date: Thu, 11 May 2006 06:38:43 -0500

On Thursday, May 11, 2006, at 06:16AM, Rosyna <email@hidden> wrote:

>Ah, so then it is indeed a bug in AppKit wrt fractional parts. Of
>course, NSIntegralRect() cannot be used going into the future as it
>breaks when using a Resolution Independent UI.

I don't think that's the case.  When drawing the final content to the screen, you want things to always fall on pixel boundaries.  My app makes use of NSIntegralRect, floor, ceil, etc. when drawing images, bezier paths and text.  Content is scaled correctly, although at a few scaling factors, there can be artifacts around edges.  I have a bug filed on this.

>Although AppKit has
>these same drawing issues when setting a multiplier on the Resolution
>using Quartz Debug.

The issue here is that non-scalable content is being used to render some or all of the controls/views.  All graphical portions of a button, for example, appear to be bitmapped images.  The end-caps need to scale in both x and y directions and thus will mostly appear with jaggies.  The center only needs to scale in the y and the results of scaling is mostly good.  Of course the text is scaled beautifully.  Focus rings are another area of problems as they often leave drawing artifacts when scaled.  I have bugs filed about these too.

As mentioned in Apple's docs, one of two things needs to happen: either move to high (or perhaps better) multi-res bitmapped images; or scalable vector images.  Personally, I've found scalable PDF images to provide the best outcome.  For those images where making a vector-representation was near impossible, I stuck with high-DPI TIFFs.

>
>Ack, at 5/11/06, John C. Randolph said:
>
>>On May 11, 2006, at 1:59 AM, Rosyna wrote:
>>
>>>If I dynamically add a subview, sometimes the view will have the
>>>end caps of buttons "sliced".
>>>
>>>http://www.unsanity.org/rosyna/imgs/slicedup.png
>>>
>>>Notice how the endcaps of the buttons are blurry and offset from
>>>the main button content?
>>>
>>>Is there anyway around this? What causes it?
>>
>>This can happen if the size of the rect that you're passing in
>>-initWithFrame: doesn't match the standard size of the button style
>>in question.  Try using NSIntegralRect() on the frame before you
>>pass it to -initWithFrame:
>
>--
>
>
>Sincerely,
>Rosyna Keller
>Technical Support/Holy Knight/Always needs a hug
>
>Unsanity: Unsane Tools for Insanely Great People
>
>It's either this, or imagining Phil Schiller in a thong.
> _______________________________________________
>Do not post admin requests to the list. They will be ignored.
>Cocoa-dev mailing list      (email@hidden)
>Help/Unsubscribe/Update your Subscription:
>
>This email sent to email@hidden
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Subviews becoming blurry or "chopped up"
      • From: Rosyna <email@hidden>
    • Re: Subviews becoming blurry or "chopped up"
      • From: "John C. Randolph" <email@hidden>
References: 
 >Subviews becoming blurry or "chopped up" (From: Rosyna <email@hidden>)
 >Re: Subviews becoming blurry or "chopped up" (From: "John C. Randolph" <email@hidden>)
 >Re: Subviews becoming blurry or "chopped up" (From: Rosyna <email@hidden>)

  • Prev by Date: Re: Subviews becoming blurry or "chopped up"
  • Next by Date: NSSpellServer problem (``Couldn\'t contact Spell Server\'\')
  • Previous by thread: Re: Subviews becoming blurry or "chopped up"
  • Next by thread: Re: Subviews becoming blurry or "chopped up"
  • Index(es):
    • Date
    • Thread