# HG changeset patch # User Frank Benoit # Date 1213967034 -7200 # Node ID 8d1948844918d03e76771b30f953f59643051368 # Parent 5a30aa9820f3a17d029b1c70bef455358c87c288 Allow null strings and arrays diff -r 5a30aa9820f3 -r 8d1948844918 dwt/graphics/GC.d --- a/dwt/graphics/GC.d Sun Jun 15 22:32:20 2008 +0200 +++ b/dwt/graphics/GC.d Fri Jun 20 15:03:54 2008 +0200 @@ -1307,16 +1307,14 @@ * * @param pointArray an array of alternating x and y values which are the vertices of the polygon * - * @exception IllegalArgumentException * @exception DWTException */ public void drawPolygon(int[] pointArray) { if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); - if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + // DWT externsion: allow null array + //if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); checkGC(DRAW); auto cairo = data.cairo; if (cairo !is null) { @@ -1337,16 +1335,14 @@ * * @param pointArray an array of alternating x and y values which are the corners of the polyline * - * @exception IllegalArgumentException * @exception DWTException */ public void drawPolyline(int[] pointArray) { if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); - if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + // DWT externsion: allow null array + //if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); checkGC(DRAW); auto cairo = data.cairo; if (cairo !is null) { @@ -1530,9 +1526,6 @@ * @param x the x coordinate of the top left corner of the rectangular area where the str is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the str is to be drawn * - * @exception IllegalArgumentException * @exception DWTException @@ -1553,9 +1546,6 @@ * @param y the y coordinate of the top left corner of the rectangular area where the str is to be drawn * @param isTransparent if true the background will be transparent, otherwise it will be opaque * - * @exception IllegalArgumentException * @exception DWTException @@ -1575,9 +1565,6 @@ * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn * - * @exception IllegalArgumentException * @exception DWTException @@ -1599,9 +1586,6 @@ * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn * @param isTransparent if true the background will be transparent, otherwise it will be opaque * - * @exception IllegalArgumentException * @exception DWTException @@ -1639,16 +1623,14 @@ * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn * @param flags the flags specifying how to process the text * - * @exception IllegalArgumentException * @exception DWTException */ public void drawText (String str, int x, int y, int flags) { if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); - if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); + // DWT extension: allow null string + //if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); if (str.length is 0) return; auto cairo = data.cairo; if (cairo !is null) {