MonobjcMonobjc Documented Class Library
InitWithColors Method (colorArray)
NamespacesMonobjc.AppKitNSGradientInitWithColors(NSArray)

Initializes a newly allocated gradient object with an array of colors.

Original signature is '- (id)initWithColors:(NSArray *)colorArray'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public virtual Id InitWithColors(
	NSArray colorArray
)
Public Overridable Function InitWithColors ( _
	colorArray As NSArray _
) As Id
public:
virtual Id^ InitWithColors(
	NSArray^ colorArray
)
Parameters
colorArray (NSArray)
An array of NSColor objects representing the colors to use to initialize the gradient. There must be at least two colors in the array. The first color is placed at location 0.0 and the last at location 1.0. If there are more than two colors, the additional colors are placed at evenly spaced intervals between the first and last colors.
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)