endAngle += startAngle;
arcAngle += startAngle;
public void drawArc (int x, int y, int width, int height, int startAngle, int endAngle) {	if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);	if (width < 0) {		x = x + width;		width = -width;	}	if (height < 0) {		y = y + height;		height = -height;	}	if (width == 0 || height == 0 || endAngle == 0) {		SWT.error(SWT.ERROR_INVALID_ARGUMENT);	}	if (startAngle > 0) {		if (endAngle > 0) {			//No need to modify start angle.			endAngle += startAngle;		} else {			int newStartAngle;			int newStopAngle = startAngle;			if (startAngle > Math.abs(endAngle)) {				newStartAngle = startAngle - Math.abs(endAngle);			} else {				newStartAngle = startAngle + 360 - Math.abs(endAngle);			}			startAngle = newStartAngle;			endAngle = newStopAngle;		}	} else {		if (endAngle > 0) {			endAngle = endAngle + startAngle;			startAngle = 360 - Math.abs(startAngle);		} else {			int newStopAngle = 360 + startAngle;			startAngle = newStopAngle - Math.abs(endAngle);			endAngle = newStopAngle;					}	}	startAngle = (int) (startAngle * 65536 / 360);	endAngle   = (int) (endAngle * 65536 / 360);	PhPoint_t center = new PhPoint_t();	center.x = (short)(x + (width / 2));	center.y = (short)(y + (height / 2));	PhPoint_t radii = new PhPoint_t();	radii.x = (short)(width / 2);	radii.y = (short)(height / 2);	int flags = OS.PtEnter(0);	try {		int prevContext = setGC();		setGCClipping();		OS.PgDrawArc(center, radii, startAngle, endAngle, OS.Pg_ARC | OS.Pg_DRAW_STROKE);		unsetGC(prevContext);	} finally {		if (flags >= 0) OS.PtLeave(flags);	}}