Mercurial > projects > dwt-linux
comparison dwt/graphics/GC.d @ 263:b6e695a17969
allow null string
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 06 Jul 2008 15:33:42 +0200 |
parents | c0d810de7093 |
children |
comparison
equal
deleted
inserted
replaced
262:e10de397beb1 | 263:b6e695a17969 |
---|---|
1955 * the polygon. Lines are drawn between each consecutive pair, and | 1955 * the polygon. Lines are drawn between each consecutive pair, and |
1956 * between the first pair and last pair in the array. | 1956 * between the first pair and last pair in the array. |
1957 * | 1957 * |
1958 * @param pointArray an array of alternating x and y values which are the vertices of the polygon | 1958 * @param pointArray an array of alternating x and y values which are the vertices of the polygon |
1959 * | 1959 * |
1960 * @exception IllegalArgumentException <ul> | |
1961 * <li>ERROR_NULL_ARGUMENT if pointArray is null</li> | |
1962 * </ul> | |
1963 * @exception DWTException <ul> | 1960 * @exception DWTException <ul> |
1964 * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> | 1961 * <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li> |
1965 * </ul> | 1962 * </ul> |
1966 * | 1963 * |
1967 * @see #drawPolygon | 1964 * @see #drawPolygon |
1968 */ | 1965 */ |
1969 public void fillPolygon(int[] pointArray) { | 1966 public void fillPolygon(int[] pointArray) { |
1970 if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); | 1967 if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); |
1971 if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); | 1968 // DWT extension: allow null array |
1969 //if (pointArray is null) DWT.error(DWT.ERROR_NULL_ARGUMENT); | |
1972 checkGC(FILL); | 1970 checkGC(FILL); |
1973 auto cairo = data.cairo; | 1971 auto cairo = data.cairo; |
1974 if (cairo !is null) { | 1972 if (cairo !is null) { |
1975 drawPolyline(cairo, pointArray, true); | 1973 drawPolyline(cairo, pointArray, true); |
1976 Cairo.cairo_fill(cairo); | 1974 Cairo.cairo_fill(cairo); |