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

Re: CGShading


  • Subject: Re: CGShading
  • From: Alex Eddy <email@hidden>
  • Date: Tue, 12 Oct 2004 17:51:56 -0700

On Oct 12, 2004, at 5:31 PM, John C. Randolph wrote:
On Oct 12, 2004, at 2:31 PM, R. Scott Thompson wrote:
to reproduce the barycentric shading, you would want to
change the alpha of current color both in the direction of the
gradient, and along the line perpendicular to the angle of the
gradient. You can't do both at the same time with CGShading

I'm pretty sure I can reproduce the effect with three axial shadings,
since each RGB component's value in my original code is a simple linear
function of the pixel's distance from the origin.

I tried that, and was never able to reproduce the result that OpenGL gives; compositing multiple CGShadings produces something similar-but-not-quite the same. Additionally, the clip path in Quartz isn't antialiased, which pretty much ruins any sort of compositing tricks for me.

See old thread: http://www.cocoabuilder.com/archive/message/cocoa/2003/12/9/92421

Of course, if you can draw a quad (or just a triangle) via CGShading with different colors at each corner that interpolate like OpenGL, please post the code!

Bonus points if you can do it with antialiased edges.

Twilight Zone points if you can do it in one pass ;)

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: CGShading
      • From: "R. Scott Thompson" <email@hidden>
  • Prev by Date: Re: Changing App version number is a pain
  • Next by Date: Re: New Document Behavior
  • Previous by thread: Re: Fast direct pixel access
  • Next by thread: Re: CGShading
  • Index(es):
    • Date
    • Thread