• 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: Some questions about cocoa graphics2D
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Some questions about cocoa graphics2D


  • Subject: Re: Some questions about cocoa graphics2D
  • From: "John C. Randolph" <email@hidden>
  • Date: Tue, 20 Nov 2001 04:00:39 -0800

On Monday, November 19, 2001, at 08:06 AM, Andrea Perego wrote:

> Hi!
>
> I'm doing preliminary experiments to port a "classic" application to
> Cocoa, and I could use some help & advice from more experienced
> developers.
>
> 1) The purpose of my app is manipulating spectra, that are drawn in
> form of histograms. My first idea was just to draw them as a single
> bezier path (up to 4k or 8k channels = 8k or 16k lines), letting the
> rendering engine take care of
> actual rasterization and display. What I found out is that
> [<myBezierPath> stroke] for such a path may be a very slow operation:
> it takes about 2 seconds to stroke 8k lines on my G4-733 at work, while
> the same operation on a 400Mhz iMac took about 15 seconds (does
> "stroke" exploit altivec on G4 ?!?).

NSBezierPath falls apart when you have a whole lot of segments,
particularly if they intersect each other. In fact, I'm rather
surprised that a path with 8K segments didn't lock up the app altogether.

I've been plotting image histograms myself lately, but with far fewer
columns than your spectrograms.

I'd suggest doing your own data reduction, and then drawing the
histogram with NSRectFillListWithColors(), or one of the other
NSRectFill... functions.

-jcr


"Computers in the future may weigh no more than 1.5 tons." - Popular
Mechanics, 1949


References: 
 >Some questions about cocoa graphics2D (From: Andrea Perego <email@hidden>)

  • Prev by Date: Re: Launching Application with arguments
  • Next by Date: Re: Standard OS X Compression format
  • Previous by thread: Some questions about cocoa graphics2D
  • Next by thread: Re: Some questions about cocoa graphics2D
  • Index(es):
    • Date
    • Thread