Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
index 25ac9ae263..0cd55d9623 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSGradient.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,10 +28,19 @@ public void drawFromPoint(NSPoint startingPoint, NSPoint endingPoint, long /*int
OS.objc_msgSend(this.id, OS.sel_drawFromPoint_toPoint_options_, startingPoint, endingPoint, options);
}
+public void drawInBezierPath(NSBezierPath path, double /*float*/ angle) {
+ OS.objc_msgSend(this.id, OS.sel_drawInBezierPath_angle_, path != null ? path.id : 0, angle);
+}
+
public void drawInRect(NSRect rect, double /*float*/ angle) {
OS.objc_msgSend(this.id, OS.sel_drawInRect_angle_, rect, angle);
}
+public NSGradient initWithColors(NSArray colorArray) {
+ long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithColors_, colorArray != null ? colorArray.id : 0);
+ return result == this.id ? this : (result != 0 ? new NSGradient(result) : null);
+}
+
public NSGradient initWithStartingColor(NSColor startingColor, NSColor endingColor) {
long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithStartingColor_endingColor_, startingColor != null ? startingColor.id : 0, endingColor != null ? endingColor.id : 0);
return result == this.id ? this : (result != 0 ? new NSGradient(result) : null);

Back to the top