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/NSBitmapImageRep.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java58
1 files changed, 13 insertions, 45 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
index 34e5f40d53..5c70791664 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -19,7 +19,7 @@ public NSBitmapImageRep() {
super();
}
-public NSBitmapImageRep(long /*int*/ id) {
+public NSBitmapImageRep(long id) {
super(id);
}
@@ -27,62 +27,34 @@ public NSBitmapImageRep(id id) {
super(id);
}
-public NSData TIFFRepresentation() {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_TIFFRepresentation);
- return result != 0 ? new NSData(result) : null;
-}
-
-public long /*int*/ bitmapData() {
+public long bitmapData() {
return OS.objc_msgSend(this.id, OS.sel_bitmapData);
}
-public long /*int*/ bitmapFormat() {
+public long bitmapFormat() {
return OS.objc_msgSend(this.id, OS.sel_bitmapFormat);
}
-public long /*int*/ bitsPerPixel() {
+public long bitsPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_bitsPerPixel);
}
-public long /*int*/ bytesPerPlane() {
- return OS.objc_msgSend(this.id, OS.sel_bytesPerPlane);
-}
-
-public long /*int*/ bytesPerRow() {
+public long bytesPerRow() {
return OS.objc_msgSend(this.id, OS.sel_bytesPerRow);
}
-public NSColor colorAtX(long /*int*/ x, long /*int*/ y) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_colorAtX_y_, x, y);
+public NSColor colorAtX(long x, long y) {
+ long result = OS.objc_msgSend(this.id, OS.sel_colorAtX_y_, x, y);
return result != 0 ? new NSColor(result) : null;
}
-public void getBitmapDataPlanes(long[] /*int[]*/ data) {
- OS.objc_msgSend(this.id, OS.sel_getBitmapDataPlanes_, data);
-}
-
-public static NSBitmapImageRep imageRepWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithData_, data != null ? data.id : 0);
- return result != 0 ? new NSBitmapImageRep(result) : null;
-}
-
-public NSBitmapImageRep initWithBitmapDataPlanes(long /*int*/ planes, long /*int*/ width, long /*int*/ height, long /*int*/ bps, long /*int*/ spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long /*int*/ bitmapFormat, long /*int*/ rBytes, long /*int*/ pBits) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, bitmapFormat, rBytes, pBits);
- return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
-}
-
-public NSBitmapImageRep initWithBitmapDataPlanes(long /*int*/ planes, long /*int*/ width, long /*int*/ height, long /*int*/ bps, long /*int*/ spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long /*int*/ rBytes, long /*int*/ pBits) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, rBytes, pBits);
+public NSBitmapImageRep initWithBitmapDataPlanes(long planes, long width, long height, long bps, long spp, boolean alpha, boolean isPlanar, NSString colorSpaceName, long bitmapFormat, long rBytes, long pBits) {
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithBitmapDataPlanes_pixelsWide_pixelsHigh_bitsPerSample_samplesPerPixel_hasAlpha_isPlanar_colorSpaceName_bitmapFormat_bytesPerRow_bitsPerPixel_, planes, width, height, bps, spp, alpha, isPlanar, colorSpaceName != null ? colorSpaceName.id : 0, bitmapFormat, rBytes, pBits);
return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
}
public NSBitmapImageRep initWithData(NSData data) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
- return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
-}
-
-public NSBitmapImageRep initWithFocusedViewRect(NSRect rect) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithFocusedViewRect_, rect);
+ long result = OS.objc_msgSend(this.id, OS.sel_initWithData_, data != null ? data.id : 0);
return result == this.id ? this : (result != 0 ? new NSBitmapImageRep(result) : null);
}
@@ -90,16 +62,12 @@ public boolean isPlanar() {
return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar);
}
-public long /*int*/ numberOfPlanes() {
- return OS.objc_msgSend(this.id, OS.sel_numberOfPlanes);
-}
-
-public long /*int*/ samplesPerPixel() {
+public long samplesPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_samplesPerPixel);
}
public static NSImageRep imageRepWithContentsOfFile(NSString filename) {
- long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
+ long result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
return result != 0 ? new NSImageRep(result) : null;
}

Back to the top