int gcStyle = getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);
int gcStyle = isMirrored() ? SWT.RIGHT_TO_LEFT : SWT.LEFT_TO_RIGHT;
void performPaint(GC gc,int startLine,int startY, int renderHeight)	{	Rectangle clientArea = getClientArea();	Color background = getBackground();		// Check if there is work to do. We never want to try and create 	// an Image with 0 width or 0 height.	if (clientArea.width == 0) {		return;	}	if (renderHeight > 0) {		// renderHeight will be negative when only top margin needs redrawing		Color foreground = getForeground();		int lineCount = content.getLineCount();		int paintY = 0;		int gcStyle = getStyle() & (SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT);				if (isSingleLine()) {			lineCount = 1;			if (startLine > 1) {				startLine = 1;			}		}		Image lineBuffer = new Image(getDisplay(), clientArea.width, renderHeight);		GC lineGC = new GC(lineBuffer, gcStyle);				lineGC.setFont(getFont());		renderer.setCurrentFontStyle(SWT.NORMAL);		lineGC.setForeground(foreground);		lineGC.setBackground(background);				for (int i = startLine; paintY < renderHeight && i < lineCount; i++, paintY += lineHeight) {			String line = content.getLine(i);			renderer.drawLine(line, i, paintY, lineGC, background, foreground, true);		}		if (paintY < renderHeight) {			lineGC.setBackground(background);			lineGC.setForeground(background);			lineGC.fillRectangle(0, paintY, clientArea.width, renderHeight - paintY);		}		gc.drawImage(lineBuffer, 0, startY);		lineGC.dispose();		lineBuffer.dispose();	}	clearMargin(gc, background, clientArea, renderHeight);}