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

Re: Drawing complex vector shapes


  • Subject: Re: Drawing complex vector shapes
  • From: Clark Cox <email@hidden>
  • Date: Mon, 1 Dec 2003 16:24:57 -0500

On Dec 01, 2003, at 15:05, Matt Budd wrote:

> 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?


If you can have a minimum OS version of 10.3, you might want to look
at the NSShadow class:

http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSShadow.html#//apple_ref/occ/cl/
NSShadow
>


--
Clark S. Cox III
email@hidden
http://homepage.mac.com/clarkcox3/blog/B1196589870/index.html

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.

References: 
 >Drawing complex vector shapes (From: Matt Budd <email@hidden>)

  • Prev by Date: Re: Splitview; keeping one sub-view at constant width when window resizes
  • Next by Date: Re: Splitview; keeping one sub-view at constant width when window resizes
  • Previous by thread: Re: Drawing complex vector shapes
  • Next by thread: Re: Drawing complex vector shapes
  • Index(es):
    • Date
    • Thread