• 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: Draw a non-antialiased image (NSImage)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draw a non-antialiased image (NSImage)


  • Subject: Re: Draw a non-antialiased image (NSImage)
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 28 Oct 2011 19:48:46 -0700

On Oct 26, 2011, at 1:17 AM, Nick wrote:

> The problem is,
> when I resize the window, I get this line's width "doubled" (probably,
> because of antialiasing) and the line appears blurred. Is there a way I
> could disable this "antialiasing" (or whatever it is?).

Blurred images are usually a result of drawing them at (or sizing them to) non-integral values. I don’t see any obvious way that the code you posted would lead to that, but take a look at what the coords are at runtime.

Although, as others have pointed out, repeatedly drawing a 2x2 image is horribly inefficient. Use a pattern and fill a rect with it.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

References: 
 >Draw a non-antialiased image (NSImage) (From: Nick <email@hidden>)

  • Prev by Date: Re: ikimageview delegate
  • Next by Date: Re: How to create NSCursor from CGBitmap?
  • Previous by thread: Re: Draw a non-antialiased image (NSImage)
  • Next by thread: ALAssetsLibrary and iOS5
  • Index(es):
    • Date
    • Thread