MonobjcMonobjc Documented Class Library
InitWithColorsAtLocationsColorSpace Method (colorArray, locations, colorSpace)
NamespacesMonobjc.AppKitNSGradientInitWithColorsAtLocationsColorSpace(NSArray, IntPtr, NSColorSpace)

Initializes a newly allocated gradient object with the specified colors, color locations, and color space.

Original signature is '- (id)initWithColors:(NSArray *)colorArray atLocations:(const CGFloat *)locations colorSpace:(NSColorSpace *)colorSpace'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual Id InitWithColorsAtLocationsColorSpace(
	NSArray colorArray,
	IntPtr locations,
	NSColorSpace colorSpace
)
Public Overridable Function InitWithColorsAtLocationsColorSpace ( _
	colorArray As NSArray, _
	locations As IntPtr, _
	colorSpace As NSColorSpace _
) As Id
public:
virtual Id^ InitWithColorsAtLocationsColorSpace(
	NSArray^ colorArray, 
	IntPtr locations, 
	NSColorSpace^ colorSpace
)
Parameters
colorArray (NSArray)
An array of NSColor objects representing the colors in the gradient.
locations (IntPtr)
An array of CGFloat values containing the location for each color in the gradient. Each value must be in the range 0.0 to 1.0. There must be the same number of locations as are colors in the colorArray parameter.
colorSpace (NSColorSpace)
The color space to use for the gradient.
Return Value
The initialized NSGradient object.
Version Information
  • Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)

Assembly: Monobjc.AppKit (Module: Monobjc.AppKit)