Changeset 256:8d1948844918

Show
Ignore:
Timestamp:
06/20/08 09:03:54 (3 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Allow null strings and arrays

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/GC.d

    r255 r256  
    13081308 * @param pointArray an array of alternating x and y values which are the vertices of the polygon 
    13091309 * 
    1310  * @exception IllegalArgumentException <ul> 
    1311  *    <li>ERROR_NULL_ARGUMENT if pointArray is null</li> 
    1312  * </ul> 
    13131310 * @exception DWTException <ul> 
    13141311 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    13171314public void drawPolygon(int[] pointArray) { 
    13181315    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    1319     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     1316    // DWT externsion: allow null array 
     1317    //if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    13201318    checkGC(DRAW); 
    13211319    auto cairo = data.cairo; 
     
    13381336 * @param pointArray an array of alternating x and y values which are the corners of the polyline 
    13391337 * 
    1340  * @exception IllegalArgumentException <ul> 
    1341  *    <li>ERROR_NULL_ARGUMENT - if the point array is null</li> 
    1342  * </ul> 
    13431338 * @exception DWTException <ul> 
    13441339 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    13471342public void drawPolyline(int[] pointArray) { 
    13481343    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    1349     if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     1344    // DWT externsion: allow null array 
     1345    //if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    13501346    checkGC(DRAW); 
    13511347    auto cairo = data.cairo; 
     
    15311527 * @param y the y coordinate of the top left corner of the rectangular area where the str is to be drawn 
    15321528 * 
    1533  * @exception IllegalArgumentException <ul> 
    1534  *    <li>ERROR_NULL_ARGUMENT - if the str is null</li> 
    1535  * </ul> 
    15361529 * @exception DWTException <ul> 
    15371530 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    15541547 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque 
    15551548 * 
    1556  * @exception IllegalArgumentException <ul> 
    1557  *    <li>ERROR_NULL_ARGUMENT - if the str is null</li> 
    1558  * </ul> 
    15591549 * @exception DWTException <ul> 
    15601550 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    15761566 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn 
    15771567 * 
    1578  * @exception IllegalArgumentException <ul> 
    1579  *    <li>ERROR_NULL_ARGUMENT - if the str is null</li> 
    1580  * </ul> 
    15811568 * @exception DWTException <ul> 
    15821569 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    16001587 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque 
    16011588 * 
    1602  * @exception IllegalArgumentException <ul> 
    1603  *    <li>ERROR_NULL_ARGUMENT - if the str is null</li> 
    1604  * </ul> 
    16051589 * @exception DWTException <ul> 
    16061590 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    16401624 * @param flags the flags specifying how to process the text 
    16411625 * 
    1642  * @exception IllegalArgumentException <ul> 
    1643  *    <li>ERROR_NULL_ARGUMENT - if the str is null</li> 
    1644  * </ul> 
    16451626 * @exception DWTException <ul> 
    16461627 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> 
     
    16491630public void drawText (String str, int x, int y, int flags) { 
    16501631    if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); 
    1651     if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
     1632    // DWT extension: allow null string 
     1633    //if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); 
    16521634    if (str.length is 0) return; 
    16531635    auto cairo = data.cairo;