Mercurial > projects > dwt-mac
diff dwt/graphics/Device.d @ 7:e831403a80a9
Add 'cast' to casts
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:30:35 +0200 |
parents | 1a8b3cb347e0 |
children | 5b53d338c709 |
line wrap: on
line diff
--- a/dwt/graphics/Device.d Wed Aug 27 14:10:03 2008 +0200 +++ b/dwt/graphics/Device.d Wed Aug 27 14:30:35 2008 +0200 @@ -30,7 +30,7 @@ /** * This class is the abstract superclass of all device objects, * such as the Display device and the Printer device. Devices - * can have a graphics context (GC) created for them, and they + * can have a graphics context cast(GC) created for them, and they * can be drawn on by sending messages to the associated GC. */ public abstract class Device : Drawable { @@ -236,7 +236,7 @@ checkDevice (); NSScreen screen = NSScreen.mainScreen(); NSRect rect = screen.frame(); - return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height); + return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height); } /** @@ -297,7 +297,7 @@ checkDevice (); NSScreen screen = NSScreen.mainScreen(); NSRect rect = screen.visibleFrame(); - return new Rectangle((int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height); + return new Rectangle(cast(int)rect.x, cast(int)rect.y, cast(int)rect.width, cast(int)rect.height); } /** @@ -333,7 +333,7 @@ NSDictionary dictionary = NSScreen.mainScreen().deviceDescription(); NSValue value = new NSValue(dictionary.objectForKey(new id(OS.NSDeviceResolution())).id); NSSize size = value.sizeValue(); - return new Point((int)size.width, (int)size.height); + return new Point(cast(int)size.width, cast(int)size.height); } /**