comparison dwt/internal/cocoa/NSBitmapImageRep.d @ 129:ad4e1fe71a5a

Fixed runtime errors
author Jacob Carlborg <doob@me.com>
date Sun, 18 Jan 2009 18:39:46 +0100
parents 62202ce0039f
children
comparison
equal deleted inserted replaced
128:07399639c0c8 129:ad4e1fe71a5a
36 super(id); 36 super(id);
37 } 37 }
38 38
39 public this (cocoa.id id) { 39 public this (cocoa.id id) {
40 super(id); 40 super(id);
41
42 } 41 }
43 42
44 public objc.id bitmapData () { 43 public ubyte* bitmapData () {
45 return OS.objc_msgSend(this.id, OS.sel_bitmapData); 44 return cast(ubyte*) OS.objc_msgSend(this.id, OS.sel_bitmapData);
46 } 45 }
47 46
48 public NSInteger bitsPerPixel () { 47 public NSInteger bitsPerPixel () {
49 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bitsPerPixel); 48 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bitsPerPixel);
50 } 49 }
56 public NSInteger bytesPerRow () { 55 public NSInteger bytesPerRow () {
57 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bytesPerRow); 56 return cast(NSInteger) OS.objc_msgSend(this.id, OS.sel_bytesPerRow);
58 } 57 }
59 58
60 public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSBitmapFormat bitmapFormat, NSInteger rBytes, NSInteger pBits) { 59 public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSBitmapFormat bitmapFormat, NSInteger rBytes, NSInteger pBits) {
61 objc.id 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 !is null ? colorSpaceName.id : null, bitmapFormat, rBytes, pBits); 60 objc.id 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 !is null ? colorSpaceName.id : null, bitmapFormat, rBytes, pBits);
62 return result !is null ? this : null; 61 return result is this.id ? this : (result !is null ? new NSBitmapImageRep(result) : null);
63 } 62 }
64 63
65 public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSInteger rBytes, NSInteger pBits) { 64 public NSBitmapImageRep initWithBitmapDataPlanes (ubyte** planes, NSInteger width, NSInteger height, NSInteger bps, NSInteger spp, bool alpha, bool isPlanar, NSString colorSpaceName, NSInteger rBytes, NSInteger pBits) {
66 objc.id 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 !is null ? colorSpaceName.id : null, rBytes, pBits); 65 objc.id 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 !is null ? colorSpaceName.id : null, rBytes, pBits);
67 return result !is null ? this : null; 66 return result is this.id ? this : (result !is null ? new NSBitmapImageRep(result) : null);
68 } 67 }
69 68
70 public bool isPlanar () { 69 public bool isPlanar () {
71 return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar); 70 return OS.objc_msgSend_bool(this.id, OS.sel_isPlanar);
72 } 71 }