• 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
Drawing complex vector shapes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Drawing complex vector shapes


  • Subject: Drawing complex vector shapes
  • From: Matt Budd <email@hidden>
  • Date: Mon, 1 Dec 2003 13:05:51 -0700

Hi..

We're creating a vector drawing program, but we want to able to do some pretty cool stuff with the vector paths (like gradients, transparent fills, outlines, shadows). We got a prototype with the complex drawing of all these shapes (using NSBezierPaths), but I was wondering if anyone had information on the best way to do the specific effects we're confronting right now:

Gradients: Seems like CGShading has what I need, but can I use this to fill a NSBezierPath, or just a rect? The web doesn't have much in the way of sample code, so if anyone can point me in the right direction (or some sample code), that'd be great...

Shadowing: Seems like an iterative repeating of the outline with a shift of each iteration down and to the right and reduce it's opacity. However, this would mean that for each shape, I'd fill it once, but stroke it 6 times...inherent performance hit?



Also, we're looking at possibly using cross-platform Qt (http://www.trolltech.com) with OpenGL for the graphics (Qt's internal graphic stuff is quite lacking). I was wondering if anyone had gone down the route of using OpenGL for its 2D drawing effects, and if they thought that was comparable to Cocoa/Quartz graphics (which I think look amazing for the amount of code you have to write).


Thanks for any info...I really appreciate it.

- Matt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Drawing complex vector shapes
      • From: Public Look <email@hidden>
    • Re: Drawing complex vector shapes
      • From: Scott Anguish <email@hidden>
    • Re: Drawing complex vector shapes
      • From: Clark Cox <email@hidden>
    • Re: Drawing complex vector shapes
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Splitview; keeping one sub-view at constant width when window resizes
  • Next by Date: Source code documentation systems for Cocoa
  • Previous by thread: Re: Splitview; keeping one sub-view at constant width when window resizes
  • Next by thread: Re: Drawing complex vector shapes
  • Index(es):
    • Date
    • Thread