本文整理了Java中org.eclipse.swt.widgets.Canvas.drawBackground()
方法的一些代码示例,展示了Canvas.drawBackground()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.drawBackground()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Canvas
类名称:Canvas
方法名:drawBackground
[英]Fills the interior of the rectangle specified by the arguments, with the receiver's background.
[中]用接收者的背景填充参数指定的矩形的内部。
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
/**
* Fills the interior of the rectangle specified by the arguments,
* with the receiver's background.
*
* @param gc the gc where the rectangle is to be filled
* @param x the x coordinate of the rectangle to be filled
* @param y the y coordinate of the rectangle to be filled
* @param width the width of the rectangle to be filled
* @param height the height of the rectangle to be filled
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.2
*/
public void drawBackground (GC gc, int x, int y, int width, int height) {
drawBackground (gc, x, y, width, height, 0, 0);
}
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
/**
* Fills the interior of the rectangle specified by the arguments,
* with the receiver's background.
*
* @param gc the gc where the rectangle is to be filled
* @param x the x coordinate of the rectangle to be filled
* @param y the y coordinate of the rectangle to be filled
* @param width the width of the rectangle to be filled
* @param height the height of the rectangle to be filled
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.2
*/
public void drawBackground (GC gc, int x, int y, int width, int height) {
drawBackground(gc, x, y, width, height, 0, 0);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
/**
* Fills the interior of the rectangle specified by the arguments,
* with the receiver's background.
*
* @param gc the gc where the rectangle is to be filled
* @param x the x coordinate of the rectangle to be filled
* @param y the y coordinate of the rectangle to be filled
* @param width the width of the rectangle to be filled
* @param height the height of the rectangle to be filled
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.2
*/
public void drawBackground (GC gc, int x, int y, int width, int height) {
drawBackground (gc, x, y, width, height, 0, 0);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
/**
* Fills the interior of the rectangle specified by the arguments,
* with the receiver's background.
*
* @param gc the gc where the rectangle is to be filled
* @param x the x coordinate of the rectangle to be filled
* @param y the y coordinate of the rectangle to be filled
* @param width the width of the rectangle to be filled
* @param height the height of the rectangle to be filled
*
* @exception IllegalArgumentException <ul>
* <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
* <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
* </ul>
* @exception SWTException <ul>
* <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
* <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
* </ul>
*
* @since 3.2
*/
public void drawBackground (GC gc, int x, int y, int width, int height) {
drawBackground (gc, x, y, width, height, 0, 0);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void clearArea (int x, int y, int width, int height) {
checkWidget ();
if (OS.IsWindowVisible (handle)) {
RECT rect = new RECT ();
OS.SetRect (rect, x, y, x + width, y + height);
int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
drawBackground (hDC, rect);
OS.ReleaseDC (handle, hDC);
}
}
内容来源于网络,如有侵权,请联系作者删除!