javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/internal/qt/graphics/GraphicsContext.java
changeset 35 85266cc22c7f
parent 21 2a9601315dfc
child 47 f40128debb5d
child 78 71ad690e91f5
--- a/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/internal/qt/graphics/GraphicsContext.java	Thu May 27 12:49:31 2010 +0300
+++ b/javauis/eswt_qt/org.eclipse.swt/Eclipse_SWT_PI/qt/org/eclipse/swt/internal/qt/graphics/GraphicsContext.java	Fri Jun 11 13:33:44 2010 +0300
@@ -1136,6 +1136,28 @@
     }
 
     /**
+     * Draws given WindowSurface. Supported only when WindowSurface
+     * uses local off-screen image as draw surface.
+     * The defined rectangular area is drawn to the same x and y position in the 
+     * target as the given arguments x and y specify.
+     * 
+     * @param surface The WindowSurface to draw
+     * @param x The x-coordinate of the source area to draw
+     * @param y The y-coordinate of the source area to draw
+     * @param width The width of the source area to draw
+     * @param height The height of the source area to draw
+     * @throws NullPointerException if surface is null
+     */
+    public void drawWindowSurface(WindowSurface surface, int x, int y, int width, int height) {
+    	if(surface == null) 
+    	{
+    	    throw new NullPointerException("surface is null");
+    	}
+    	OS.graphicsContext_drawWindowSurface(handle, surface.handle, x, y, width, height);
+    }
+    
+    
+    /**
      * Fill interior of circular or elliptical arc within specified rectangular area, using background color.
      *
      * @param x The x coordinate of top left corner of arc rectangle