Skip navigation.
 
mlRe: CGShading
FROM : John C. Randolph
DATE : Tue Oct 12 20:48:39 2004

On Oct 12, 2004, at 11:38 AM, John C. Randolph wrote:



>
> On Aug 1, 2004, at 9:27 AM, Ricky Sharp wrote:
>
>
>
>

>> On Aug 1, 2004, at 9:13 AM, Ricky Sharp wrote:
>>
>>
>>

>>>  Here's some sample code that creates a pretty cool gradient by 
>>> using a Category for NSImage:
>>>
>>> <http://developer.apple.com/samplecode/Transformed_Image/

>>> Transformed_Image.html>
>>>

>
> When I wrote that code, CGShading wasn't available.  If I were 
> writing that sample today, I'd use GCShading.  I should also point out 
> that the code assumes that bytesPerRow == pixelsWide, which isn't 
> necessarily the case.


Correction:  I meant to say it assumes that bytesPerRow  == (pixelsWide 
*  4), which isn't necessarily true.  In future versions of AppKit and 
CoreImage, bitmaps may get padded to allow for word or long word 
alignment for optimization.

-jcr




John C. Randolph <<email_removed>> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html

Related mailsAuthorDate
mlCGShading Peter Laurens Aug 1, 00:40
mlRe: CGShading Shawn Erickson Aug 1, 00:53
mlRe: CGShading Shawn Erickson Aug 1, 00:59
mlRe: CGShading Shawn Erickson Aug 1, 01:09
mlRe: CGShading Scott Thompson Aug 1, 03:35
mlRe: CGShading Perry Clarke Aug 1, 05:16
mlRe: CGShading Ricky Sharp Aug 1, 16:13
mlRe: CGShading Ricky Sharp Aug 1, 18:27
mlRe: CGShading John C. Randolph Oct 12, 20:38
mlRe: CGShading John C. Randolph Oct 12, 20:48
mlRe: CGShading R. Scott Thompson Oct 12, 21:30
mlRe: CGShading John C. Randolph Oct 12, 22:29
mlRe: CGShading R. Scott Thompson Oct 12, 22:41
mlRe: CGShading John C. Randolph Oct 12, 23:07
mlRe: CGShading R. Scott Thompson Oct 12, 23:31
mlRe: CGShading John C. Randolph Oct 13, 01:38
mlRe: CGShading R. Scott Thompson Oct 13, 03:41
mlRe: CGShading John C. Randolph Oct 14, 00:26