API  1.0.0
CGColor.j File Reference

Go to the source code of this file.

Functions

function CFHashCode (aCFObject)
 
function CGColorCreate (aColorSpace, components)
 
function CGColorCreateCopy (aColor)
 
function CGColorCreateCopyWithAlpha (aColor, anAlpha)
 
function CGColorCreateGenericCMYK (cyan, magenta, yellow, black, alpha)
 
function CGColorCreateGenericGray (gray, alpha)
 
function CGColorCreateGenericRGB (red, green, blue, alpha)
 
function CGColorCreateWithPattern (aColorSpace, aPattern, components)
 
function CGColorEqualToColor (lhs, rhs)
 
function CGColorGetAlpha (aColor)
 
function CGColorGetColorSpace (aColor)
 
function CGColorGetComponents (aColor)
 
function CGColorGetConstantColor (aColorName)
 
function CGColorGetNumberOfComponents (aColor)
 
function CGColorGetPattern (aColor)
 
function CGColorRelease ()
 
function CGColorRetain (aColor)
 

Variables

var CFTypeGlobalCount = 0
 
 kCGColorBlack = "kCGColorBlack"
 
 kCGColorClear = "kCGColorClear"
 
 kCGColorWhite = "kCGColorWhite"
 

Function Documentation

◆ CFHashCode()

function CFHashCode ( aCFObject  )

Definition at line 28 of file CGColor.j.

◆ CGColorCreate()

function CGColorCreate ( aColorSpace  ,
components   
)

Creates a new CGColor.

Parameters
aColorSpacethe CGColorSpace of the color
componentsthe color's intensity values plus alpha
Returns
CGColor the new color object CGColor

Definition at line 69 of file CGColor.j.

◆ CGColorCreateCopy()

function CGColorCreateCopy ( aColor  )

Creates a copy of a color... but not really. CGColors are immutable, so to be efficient, this function will just return the same object that was passed in.

Parameters
aColorthe CGColor to 'copy'
Returns
CGColor the color copy CGColor

Definition at line 94 of file CGColor.j.

◆ CGColorCreateCopyWithAlpha()

function CGColorCreateCopyWithAlpha ( aColor  ,
anAlpha   
)

Creates a copy of the color with a specified alpha.

Parameters
aColorthe color object to copy
anAlphathe new alpha component for the copy (0.0-1.0).
Returns
CGColor the new copy CGColor

Definition at line 149 of file CGColor.j.

◆ CGColorCreateGenericCMYK()

function CGColorCreateGenericCMYK ( cyan  ,
magenta  ,
yellow  ,
black  ,
alpha   
)

Creates a CMYK color.

Parameters
cyanthe cyan component (0.0-1.0).
magentathe magenta component (0.0-1.0).
yellowthe yellow component (0.0-1.0).
blackthe black component (0.0-1.0).
alphathe alpha component (0.0-1.0).
Returns
CGColor the CMYK based color CGColor

Definition at line 136 of file CGColor.j.

◆ CGColorCreateGenericGray()

function CGColorCreateGenericGray ( gray  ,
alpha   
)

Creates a gray color object.

Parameters
graythe value to use for the color intensities (0.0-1.0).
alphathe gray's alpha value (0.0-1.0).
Returns
CGColor the new gray color object CGColor

Definition at line 107 of file CGColor.j.

◆ CGColorCreateGenericRGB()

function CGColorCreateGenericRGB ( red  ,
green  ,
blue  ,
alpha   
)

Creates an RGB color.

Parameters
redthe red component (0.0-1.0)..
greenthe green component (0.0-1.0).
bluethe blue component (0.0-1.0).
alphathe alpha component (0.0-1.0).
Returns
CGColor the RGB based color CGColor

Definition at line 121 of file CGColor.j.

◆ CGColorCreateWithPattern()

function CGColorCreateWithPattern ( aColorSpace  ,
aPattern  ,
components   
)

Creates a color using the specified pattern.

Parameters
aColorSpacethe CGColorSpace
aPatternthe pattern image
componentsthe color components plus the alpha component
Returns
CGColor the patterned color CGColor

Definition at line 177 of file CGColor.j.

◆ CGColorEqualToColor()

function CGColorEqualToColor ( lhs  ,
rhs   
)

Determines if two colors are the same.

Parameters
lhsthe first CGColor
rhsthe second CGColor
Returns
YES if the two colors are equal. NO otherwise.

Definition at line 192 of file CGColor.j.

◆ CGColorGetAlpha()

function CGColorGetAlpha ( aColor  )

Returns the color's alpha component.

Parameters
aColorthe color
Returns
float the alpha component (0.0-1.0). CGColor

Definition at line 226 of file CGColor.j.

◆ CGColorGetColorSpace()

function CGColorGetColorSpace ( aColor  )

Returns the CGColor's color space.

Returns
CGColorSpace CGColor

Definition at line 238 of file CGColor.j.

◆ CGColorGetComponents()

function CGColorGetComponents ( aColor  )

Returns the CGColor's components including the alpha in an array.

Parameters
aColorthe color
Returns
CPArray the color's components

Definition at line 249 of file CGColor.j.

◆ CGColorGetConstantColor()

function CGColorGetConstantColor ( aColorName  )

Definition at line 42 of file CGColor.j.

◆ CGColorGetNumberOfComponents()

function CGColorGetNumberOfComponents ( aColor  )

Returns the number of color components (including alpha) in the specified color.

Parameters
aColorthe CGColor
Returns
CPNumber the number of components CGColor

Definition at line 261 of file CGColor.j.

◆ CGColorGetPattern()

function CGColorGetPattern ( aColor  )

Gets the CGColor's pattern.

Parameters
aCGColor
Returns
CGPatternFIXME the pattern image CGColor

Definition at line 272 of file CGColor.j.

◆ CGColorRelease()

function CGColorRelease ( )

This function is for source compatibility.

Definition at line 58 of file CGColor.j.

◆ CGColorRetain()

function CGColorRetain ( aColor  )

This function is for source compatibility.

Definition at line 50 of file CGColor.j.

Variable Documentation

◆ CFTypeGlobalCount

var CFTypeGlobalCount = 0

Definition at line 26 of file CGColor.j.

◆ kCGColorBlack

kCGColorBlack = "kCGColorBlack"

Definition at line 37 of file CGColor.j.

◆ kCGColorClear

kCGColorClear = "kCGColorClear"

Definition at line 38 of file CGColor.j.

◆ kCGColorWhite

kCGColorWhite = "kCGColorWhite"

Definition at line 36 of file CGColor.j.