org.eclipse.swt.widgets.Canvas.drawBackground()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(159)

本文整理了Java中org.eclipse.swt.widgets.Canvas.drawBackground()方法的一些代码示例,展示了Canvas.drawBackground()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Canvas.drawBackground()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Canvas
类名称:Canvas
方法名:drawBackground

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

  1. /**
  2. * Fills the interior of the rectangle specified by the arguments,
  3. * with the receiver's background.
  4. *
  5. * @param gc the gc where the rectangle is to be filled
  6. * @param x the x coordinate of the rectangle to be filled
  7. * @param y the y coordinate of the rectangle to be filled
  8. * @param width the width of the rectangle to be filled
  9. * @param height the height of the rectangle to be filled
  10. *
  11. * @exception IllegalArgumentException <ul>
  12. * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
  13. * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
  14. * </ul>
  15. * @exception SWTException <ul>
  16. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  17. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  18. * </ul>
  19. *
  20. * @since 3.2
  21. */
  22. public void drawBackground (GC gc, int x, int y, int width, int height) {
  23. drawBackground (gc, x, y, width, height, 0, 0);
  24. }

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

  1. /**
  2. * Fills the interior of the rectangle specified by the arguments,
  3. * with the receiver's background.
  4. *
  5. * @param gc the gc where the rectangle is to be filled
  6. * @param x the x coordinate of the rectangle to be filled
  7. * @param y the y coordinate of the rectangle to be filled
  8. * @param width the width of the rectangle to be filled
  9. * @param height the height of the rectangle to be filled
  10. *
  11. * @exception IllegalArgumentException <ul>
  12. * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
  13. * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
  14. * </ul>
  15. * @exception SWTException <ul>
  16. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  17. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  18. * </ul>
  19. *
  20. * @since 3.2
  21. */
  22. public void drawBackground (GC gc, int x, int y, int width, int height) {
  23. drawBackground(gc, x, y, width, height, 0, 0);
  24. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. /**
  2. * Fills the interior of the rectangle specified by the arguments,
  3. * with the receiver's background.
  4. *
  5. * @param gc the gc where the rectangle is to be filled
  6. * @param x the x coordinate of the rectangle to be filled
  7. * @param y the y coordinate of the rectangle to be filled
  8. * @param width the width of the rectangle to be filled
  9. * @param height the height of the rectangle to be filled
  10. *
  11. * @exception IllegalArgumentException <ul>
  12. * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
  13. * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
  14. * </ul>
  15. * @exception SWTException <ul>
  16. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  17. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  18. * </ul>
  19. *
  20. * @since 3.2
  21. */
  22. public void drawBackground (GC gc, int x, int y, int width, int height) {
  23. drawBackground (gc, x, y, width, height, 0, 0);
  24. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. /**
  2. * Fills the interior of the rectangle specified by the arguments,
  3. * with the receiver's background.
  4. *
  5. * @param gc the gc where the rectangle is to be filled
  6. * @param x the x coordinate of the rectangle to be filled
  7. * @param y the y coordinate of the rectangle to be filled
  8. * @param width the width of the rectangle to be filled
  9. * @param height the height of the rectangle to be filled
  10. *
  11. * @exception IllegalArgumentException <ul>
  12. * <li>ERROR_NULL_ARGUMENT - if the gc is null</li>
  13. * <li>ERROR_INVALID_ARGUMENT - if the gc has been disposed</li>
  14. * </ul>
  15. * @exception SWTException <ul>
  16. * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  17. * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  18. * </ul>
  19. *
  20. * @since 3.2
  21. */
  22. public void drawBackground (GC gc, int x, int y, int width, int height) {
  23. drawBackground (gc, x, y, width, height, 0, 0);
  24. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. void clearArea (int x, int y, int width, int height) {
  2. checkWidget ();
  3. if (OS.IsWindowVisible (handle)) {
  4. RECT rect = new RECT ();
  5. OS.SetRect (rect, x, y, x + width, y + height);
  6. int /*long*/ hDC = OS.GetDCEx (handle, 0, OS.DCX_CACHE | OS.DCX_CLIPCHILDREN | OS.DCX_CLIPSIBLINGS);
  7. drawBackground (hDC, rect);
  8. OS.ReleaseDC (handle, hDC);
  9. }
  10. }

相关文章

Canvas类方法