/** * Constructs a new empty Path. * * <p>This operation requires the operating system's advanced graphics subsystem which may not be * available on some platforms. * * @param device the device on which to allocate the path * @exception IllegalArgumentException * <ul> * <li>ERROR_NULL_ARGUMENT - if the device is null and there is no current device * </ul> * * @exception SWTException * <ul> * <li>ERROR_NO_GRAPHICS_LIBRARY - if advanced graphics are not available * </ul> * * @exception SWTError * <ul> * <li>ERROR_NO_HANDLES if a handle for the path could not be obtained * </ul> * * @see #dispose() */ public Path(Device device) { super(device); handle = NSBezierPath.bezierPath(); if (handle == null) SWT.error(SWT.ERROR_NO_HANDLES); handle.retain(); handle.moveToPoint(new NSPoint()); init(); }