Changeset 256:8d1948844918
- 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
| r255 |
r256 |
|
| 1308 | 1308 | * @param pointArray an array of alternating x and y values which are the vertices of the polygon |
|---|
| 1309 | 1309 | * |
|---|
| 1310 | | * @exception IllegalArgumentException <ul> |
|---|
| 1311 | | * <li>ERROR_NULL_ARGUMENT if pointArray is null</li> |
|---|
| 1312 | | * </ul> |
|---|
| 1313 | 1310 | * @exception DWTException <ul> |
|---|
| 1314 | 1311 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1317 | 1314 | public void drawPolygon(int[] pointArray) { |
|---|
| 1318 | 1315 | 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); |
|---|
| 1320 | 1318 | checkGC(DRAW); |
|---|
| 1321 | 1319 | auto cairo = data.cairo; |
|---|
| … | … | |
| 1338 | 1336 | * @param pointArray an array of alternating x and y values which are the corners of the polyline |
|---|
| 1339 | 1337 | * |
|---|
| 1340 | | * @exception IllegalArgumentException <ul> |
|---|
| 1341 | | * <li>ERROR_NULL_ARGUMENT - if the point array is null</li> |
|---|
| 1342 | | * </ul> |
|---|
| 1343 | 1338 | * @exception DWTException <ul> |
|---|
| 1344 | 1339 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1347 | 1342 | public void drawPolyline(int[] pointArray) { |
|---|
| 1348 | 1343 | 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); |
|---|
| 1350 | 1346 | checkGC(DRAW); |
|---|
| 1351 | 1347 | auto cairo = data.cairo; |
|---|
| … | … | |
| 1531 | 1527 | * @param y the y coordinate of the top left corner of the rectangular area where the str is to be drawn |
|---|
| 1532 | 1528 | * |
|---|
| 1533 | | * @exception IllegalArgumentException <ul> |
|---|
| 1534 | | * <li>ERROR_NULL_ARGUMENT - if the str is null</li> |
|---|
| 1535 | | * </ul> |
|---|
| 1536 | 1529 | * @exception DWTException <ul> |
|---|
| 1537 | 1530 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1554 | 1547 | * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque |
|---|
| 1555 | 1548 | * |
|---|
| 1556 | | * @exception IllegalArgumentException <ul> |
|---|
| 1557 | | * <li>ERROR_NULL_ARGUMENT - if the str is null</li> |
|---|
| 1558 | | * </ul> |
|---|
| 1559 | 1549 | * @exception DWTException <ul> |
|---|
| 1560 | 1550 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1576 | 1566 | * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn |
|---|
| 1577 | 1567 | * |
|---|
| 1578 | | * @exception IllegalArgumentException <ul> |
|---|
| 1579 | | * <li>ERROR_NULL_ARGUMENT - if the str is null</li> |
|---|
| 1580 | | * </ul> |
|---|
| 1581 | 1568 | * @exception DWTException <ul> |
|---|
| 1582 | 1569 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1600 | 1587 | * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque |
|---|
| 1601 | 1588 | * |
|---|
| 1602 | | * @exception IllegalArgumentException <ul> |
|---|
| 1603 | | * <li>ERROR_NULL_ARGUMENT - if the str is null</li> |
|---|
| 1604 | | * </ul> |
|---|
| 1605 | 1589 | * @exception DWTException <ul> |
|---|
| 1606 | 1590 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1640 | 1624 | * @param flags the flags specifying how to process the text |
|---|
| 1641 | 1625 | * |
|---|
| 1642 | | * @exception IllegalArgumentException <ul> |
|---|
| 1643 | | * <li>ERROR_NULL_ARGUMENT - if the str is null</li> |
|---|
| 1644 | | * </ul> |
|---|
| 1645 | 1626 | * @exception DWTException <ul> |
|---|
| 1646 | 1627 | * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
|---|
| … | … | |
| 1649 | 1630 | public void drawText (String str, int x, int y, int flags) { |
|---|
| 1650 | 1631 | 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); |
|---|
| 1652 | 1634 | if (str.length is 0) return; |
|---|
| 1653 | 1635 | auto cairo = data.cairo; |
|---|