gc.setBackground(getBackground()); gc.fillRectangle(xClient - marginWidth, yClient - marginHeight, width, height);
if ((getStyle() & SWT.NO_BACKGROUND) != 0) { gc.setBackground(getBackground()); gc.fillRectangle(xClient - marginWidth, yClient - marginHeight, width, height); }
void drawBody(Event event) {	GC gc = event.gc;	Point size = getSize();		//draw 1 pixel border around outside	if (borderLeft > 0) {		gc.setForeground(borderColor);		int x1 = borderLeft - 1;		int x2 = size.x - borderRight;		int y1 = onBottom ? borderTop - 1 : borderTop + tabHeight;		int y2 = onBottom ? size.y - tabHeight - borderBottom - 1 : size.y - borderBottom;		gc.drawLine(x1, y1, x1, y2); // left		gc.drawLine(x2, y1, x2, y2); // right		if (onBottom) {			gc.drawLine(x1, y1, x2, y1); // top		} else {			gc.drawLine(x1, y2, x2, y2); // bottom		}	}		// fill in client area	if (!minimized){		int style = getStyle();		int width = size.x  - borderLeft - borderRight;		int height = size.y - borderTop - borderBottom - tabHeight - HIGHLIGHT_HEADER;		if (borderLeft > 0 && (style & SWT.FLAT) == 0) {			int[] shape = null;			width -= 2*HIGHLIGHT_MARGIN;			height -= HIGHLIGHT_MARGIN;			if (onBottom) {				int x1 = 1;				int y1 = 1;				int x2 = size.x - 1;				int y2 = size.y - borderBottom - tabHeight - HIGHLIGHT_HEADER;				shape = new int[] {x1,y1, x2,y1, x2,y2, x2-HIGHLIGHT_MARGIN,y2,						           x2-HIGHLIGHT_MARGIN, y1+HIGHLIGHT_MARGIN, x1+HIGHLIGHT_MARGIN,y1+HIGHLIGHT_MARGIN,								   x1+HIGHLIGHT_MARGIN,y2, x1,y2};			} else {					int x1 = 1;				int y1 = borderTop + tabHeight + HIGHLIGHT_HEADER;				int x2 = size.x - 1;				int y2 = size.y - 1;				shape = new int[] {x1,y1, x1+HIGHLIGHT_MARGIN,y1, x1+HIGHLIGHT_MARGIN,y2-HIGHLIGHT_MARGIN, 						           x2-HIGHLIGHT_MARGIN,y2-HIGHLIGHT_MARGIN, x2-HIGHLIGHT_MARGIN,y1,								   x2,y1, x2,y2, x1,y2};			}			// Draw highlight margin - if horizontal gradient, show gradient across the whole area			if (selectedIndex != -1 && selectionGradientColors != null && selectionGradientColors.length > 1 && !selectionGradientVertical) {				drawBackground(gc, shape, true);			} else if (selectedIndex == -1 && gradientColors != null && gradientColors.length > 1 && !gradientVertical) {				drawBackground(gc, shape, false);			} else {				gc.setBackground(selectedIndex == -1 ? getBackground() : selectionBackground);				gc.fillPolygon(shape);			}		}		//Draw client area		gc.setBackground(getBackground());		gc.fillRectangle(xClient - marginWidth, yClient - marginHeight, width, height);	}}