MonobjcMonobjc Documented Class Library
NSGradient Constructor (startingColor, endingColor)
NamespacesMonobjc.AppKitNSGradientNSGradient(NSColor, NSColor)

Initializes a newly allocated gradient object with two colors.

Original signature is '- (id)initWithStartingColor:(NSColor *)startingColor endingColor:(NSColor *)endingColor'

Available in Mac OS X v10.5 and later.

Declaration Syntax
C#Visual BasicVisual C++
public NSGradient(
	NSColor startingColor,
	NSColor endingColor
)
Public Sub New ( _
	startingColor As NSColor, _
	endingColor As NSColor _
)
public:
NSGradient(
	NSColor^ startingColor, 
	NSColor^ endingColor
)
Parameters
startingColor (NSColor)
The starting color of the gradient. The location of this color is fixed at 0.0.
endingColor (NSColor)
The ending color of the gradient. The location of this color is fixed at 1.0.
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)