void drawBackgroundInPixels(GC gc, int x, int y, int width, int height, int offsetX, int offsetY) { if (gc == null) error (SWT.ERROR_NULL_ARGUMENT); if (gc.isDisposed ()) error (SWT.ERROR_INVALID_ARGUMENT); RECT rect = new RECT (); OS.SetRect (rect, x, y, x + width, y + height); int /*long*/ hDC = gc.handle; int pixel = background == -1 ? gc.getBackground ().handle : -1; drawBackground (hDC, rect, pixel, offsetX, offsetY); }
Rectangle mappedBounds = display .map(parent, parent.getParent(), bounds); parent.getParent().drawBackground(gc, bounds.x, bounds.y, bounds.width, bounds.height, mappedBounds.x, mappedBounds.y);
void drawBackground (long /*int*/ id, NSGraphicsContext context, NSRect rect) { super.drawBackground(id, context, rect); if (glcontext != null) { if (isObscured()) { glcontext.setValues(new int[]{-1}, OS.NSOpenGLCPSurfaceOrder); context.saveGraphicsState(); context.setCompositingOperation(OS.NSCompositeClear); if (visiblePath == null) { long /*int*/ visibleRegion = getVisibleRegion(); visiblePath = getPath(visibleRegion); OS.DisposeRgn(visibleRegion); } visiblePath.addClip(); NSBezierPath.fillRect(rect); context.restoreGraphicsState(); } else { glcontext.setValues(new int[]{1}, OS.NSOpenGLCPSurfaceOrder); } } }
OS.GetClientRect (handle, rect); if ((style & (SWT.NO_BACKGROUND | SWT.TRANSPARENT)) == 0) { drawBackground (wParam, rect);
backgroundImage = new Image(comp.getDisplay(), size.x, size.y); GC gc = new GC(backgroundImage); comp.getParent().drawBackground(gc, 0, 0, size.x, size.y, 0, 0); Color background = comp.getBackground(); Color border = comp.getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW);
RECT rect = new RECT (); OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom); drawBackground (phdc [0], rect); RECT rect = new RECT (); OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom); drawBackground (gc.handle, rect); OS.SetRect (rect, lpRgnData [offset], lpRgnData [offset + 1], lpRgnData [offset + 2], lpRgnData [offset + 3]); if ((style & (SWT.DOUBLE_BUFFERED | SWT.NO_BACKGROUND | SWT.TRANSPARENT)) == 0) { drawBackground (gc.handle, rect); if (rect == null) rect = new RECT (); OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom); drawBackground (gc.handle, rect); RECT rect = new RECT (); OS.SetRect (rect, ps.left, ps.top, ps.right, ps.bottom); drawBackground (hDC, rect);