Mercurial > projects > dwt-win
diff dwt/graphics/Image.d @ 197:184ab53b7785
Changes and fixes for jface
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Thu, 10 Apr 2008 11:19:49 +0200 |
parents | 25f88bf5a6df |
children | ab60f3309436 |
line wrap: on
line diff
--- a/dwt/graphics/Image.d Mon Apr 07 13:08:57 2008 +0200 +++ b/dwt/graphics/Image.d Thu Apr 10 11:19:49 2008 +0200 @@ -192,7 +192,7 @@ public this(Device device, int width, int height) { if (device is null) device = Device.getDevice(); if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - init(device, width, height); + init_(device, width, height); if (device.tracking) device.new_Object(this); } @@ -269,7 +269,7 @@ break; case DWT.ICON: static if (OS.IsWinCE) { - init(device, srcImage.data); + init_(device, srcImage.data); } else { handle = OS.CopyImage(srcImage.handle, OS.IMAGE_ICON, rect.width, rect.height, 0); if (handle is null) DWT.error(DWT.ERROR_NO_HANDLES); @@ -337,7 +337,7 @@ offset++; } } - init (device, newData); + init_ (device, newData); if (device.tracking) device.new_Object(this); return; } @@ -402,7 +402,7 @@ } } } - init (device, newData); + init_ (device, newData); if (device.tracking) device.new_Object(this); return; } @@ -445,7 +445,7 @@ if (device is null) device = Device.getDevice(); if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); if (bounds is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - init(device, bounds.width, bounds.height); + init_(device, bounds.width, bounds.height); if (device.tracking) device.new_Object(this); } @@ -470,7 +470,7 @@ public this(Device device, ImageData data) { if (device is null) device = Device.getDevice(); if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - init(device, data); + init_(device, data); if (device.tracking) device.new_Object(this); } @@ -508,7 +508,7 @@ DWT.error(DWT.ERROR_INVALID_ARGUMENT); } mask = ImageData.convertMask(mask); - init(device, this, source, mask); + init_(device, this, source, mask); if (device.tracking) device.new_Object(this); } @@ -563,7 +563,7 @@ public this (Device device, InputStream stream) { if (device is null) device = Device.getDevice(); if (device is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - init(device, new ImageData(stream)); + init_(device, new ImageData(stream)); if (device.tracking) device.new_Object(this); } @@ -741,7 +741,7 @@ ImageData img = new ImageData(width, height, depth, paletteData, scanlinePad, data); img.transparentPixel = transparentPixel; img.alphaData = alphaData; - init(device, img); + init_(device, img); } } } @@ -754,7 +754,7 @@ } } } catch (DWTException e) {} - init(device, new ImageData(filename)); + init_(device, new ImageData(filename)); if(device.tracking) device.new_Object(this); } @@ -1579,7 +1579,7 @@ return cast(hash_t)handle; } -void init(Device device, int width, int height) { +void init_(Device device, int width, int height) { if (width <= 0 || height <= 0) { DWT.error (DWT.ERROR_INVALID_ARGUMENT); } @@ -1660,12 +1660,12 @@ * if the regular GetIconInfo had been used. */ static void GetIconInfo(Image image, ICONINFO* info) { - int[] result = init(image.device, null, image.data); + int[] result = init_(image.device, null, image.data); info.hbmColor = cast(HBITMAP)result[0]; info.hbmMask = cast(HBITMAP)result[1]; } -static int[] init(Device device, Image image, ImageData i) { +static int[] init_(Device device, Image image, ImageData i) { if (image !is null) image.device = device; /* @@ -1896,7 +1896,7 @@ return result; } -static int[] init(Device device, Image image, ImageData source, ImageData mask) { +static int[] init_(Device device, Image image, ImageData source, ImageData mask) { /* Create a temporary image and locate the black pixel */ ImageData imageData; int blackIndex = 0; @@ -1967,11 +1967,11 @@ } imageData.maskPad = mask.scanlinePad; imageData.maskData = mask.data; - return init(device, image, imageData); + return init_(device, image, imageData); } -void init(Device device, ImageData i) { +void init_(Device device, ImageData i) { if (i is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); - init(device, this, i); + init_(device, this, i); } /**