• 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
Faster way to draw strings?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Faster way to draw strings?


  • Subject: Faster way to draw strings?
  • From: "Stephan R. Cleaves" <email@hidden>
  • Date: Wed, 23 Jan 2002 08:03:35 -0500

Hi,

I've been having difficulties with redraw speed in my application and have narrowed the problem down to NSGraphics drawAttributedString method. The problem is most noticeable during resizing of the window which contains my custom view. What I have done is turn off the drawing of the strings during resize and i can achieve acceptable redraw speeds, then when the live resize ends I turn back on the strings. This looks a bit odd, but currently its the only solution I have. I have over 100 unique strings being drawn in the view, and I do make sure only to draw the requested region, but often that is the entire view area during live resize. Is there a faster way to draw strings? Other than using the font attribute, the over head off the NSAttributedStrings is completely unnecessary for my application. I Actually use NSMutableAttributedStrings and pre-cache these, though doing so is not noticeably faster than just using a single NSMutableAttributedString in drawRect and changing its string reference string value.

Thanks in advance,
stephan


  • Follow-Ups:
    • Re: Faster way to draw strings?
      • From: Douglas Davidson <email@hidden>
    • Re: Faster way to draw strings?
      • From: Lance Bland <email@hidden>
  • Prev by Date: Re: app preferences top view
  • Next by Date: Re: Touch conditionally
  • Previous by thread: Re: Nib owner's outlets
  • Next by thread: Re: Faster way to draw strings?
  • Index(es):
    • Date
    • Thread