SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);
SWT.error(SWT.ERROR_INVALID_IMAGE);
public Rectangle getBounds() {	if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	if (width != -1 && height != -1) {		return new Rectangle(0, 0, width, height);	}	switch (type) {		case SWT.BITMAP:			BITMAP bm = new BITMAP();			OS.GetObject(handle, BITMAP.sizeof, bm);			return new Rectangle(0, 0, width = bm.bmWidth, height = bm.bmHeight);		case SWT.ICON:			if (OS.IsWinCE) {				return new Rectangle(0, 0, width = data.width, height = data.height);			} else {				ICONINFO info = new ICONINFO();				OS.GetIconInfo(handle, info);				int hBitmap = info.hbmColor;				if (hBitmap == 0) hBitmap = info.hbmMask;				bm = new BITMAP();				OS.GetObject(hBitmap, BITMAP.sizeof, bm);				if (hBitmap == info.hbmMask) bm.bmHeight /= 2;				if (info.hbmColor != 0) OS.DeleteObject(info.hbmColor);				if (info.hbmMask != 0) OS.DeleteObject(info.hbmMask);				return new Rectangle(0, 0, width = bm.bmWidth, height = bm.bmHeight);			}		default:			SWT.error(SWT.ERROR_UNSUPPORTED_FORMAT);			return null;	}}