• 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: Core Graphics Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Graphics Question


  • Subject: Re: Core Graphics Question
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 15 Oct 2002 18:00:29 -0700

On Tuesday, October 15, 2002, at 05:35 PM, Greg Hulands wrote:

Hi,
I have never really done any direct core graphics calls before - always used cocoa's bezier path and affine transforms before. I ant to achieve the effect of a gradient from one color to the other in a rectangle. Is there a way to do this? I have done this before in Open GL - it is a piece of piss, but have been stumped on how to do it with core graphics.

Could some one point me in the right direction on the functions to use in Core Graphics to do this.

New feature in 10.2 (at least exposed in 10.2), see CGShading.h

http://developer.apple.com/techpubs/macosx/CoreTechnologies/graphics/ Quartz2D/WhatsNewQuartz2D/New/CGShading/index.html

To draw with it use CGContextDrawShading...

http://developer.apple.com/techpubs/macosx/CoreTechnologies/graphics/ Quartz2D/WhatsNewQuartz2D/Revised/CGContext/Functions/ Functions.html#CGContextDrawShading

They talked about it some at WWDC 2002 and most likely code examples exist online someplace.

-Shawn
_______________________________________________
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: 
 >Core Graphics Question (From: Greg Hulands <email@hidden>)

  • Prev by Date: Re: button text
  • Next by Date: Re: button text
  • Previous by thread: Core Graphics Question
  • Next by thread: Re : Application is crashing if it runs for long time (On NSTask)
  • Index(es):
    • Date
    • Thread