org.eclipse.swt.graphics.GC.drawTextInPixels()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(118)

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

GC.drawTextInPixels介绍

暂无

代码示例

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

void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
  int flags = SWT.DRAW_DELIMITER | SWT.DRAW_TAB;
  if (isTransparent) flags |= SWT.DRAW_TRANSPARENT;
  drawTextInPixels(string, x, y, flags);
}

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

void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
  int flags = SWT.DRAW_DELIMITER | SWT.DRAW_TAB;
  if (isTransparent) flags |= SWT.DRAW_TRANSPARENT;
  drawTextInPixels(string, x, y, flags);
}

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

void drawTextInPixels(String string, int x, int y, boolean isTransparent) {
  int flags = SWT.DRAW_DELIMITER | SWT.DRAW_TAB;
  if (isTransparent) flags |= SWT.DRAW_TRANSPARENT;
  drawTextInPixels(string, x, y, flags);
}

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

void drawTextInPixels (String string, int x, int y, boolean isTransparent) {
  int flags = SWT.DRAW_DELIMITER | SWT.DRAW_TAB;
  if (isTransparent) flags |= SWT.DRAW_TRANSPARENT;
  drawTextInPixels(string, x, y, flags);
}

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

void drawTextInPixels(String string, int x, int y) {
  drawTextInPixels(string, x, y, SWT.DRAW_DELIMITER | SWT.DRAW_TAB);
}

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

void drawStringInPixels(String string, int x, int y, boolean isTransparent) {
  drawTextInPixels(string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0);
}

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

void drawStringInPixels(String string, int x, int y, boolean isTransparent) {
  drawTextInPixels(string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0);
}

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

void drawStringInPixels(String string, int x, int y, boolean isTransparent) {
  drawTextInPixels(string, x, y, isTransparent ? SWT.DRAW_TRANSPARENT : 0);
}

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

void drawTextInPixels(String string, int x, int y) {
  drawTextInPixels(string, x, y, SWT.DRAW_DELIMITER | SWT.DRAW_TAB);
}

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

void drawTextInPixels (String string, int x, int y) {
  drawTextInPixels(string, x, y, SWT.DRAW_DELIMITER | SWT.DRAW_TAB);
}

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

void drawTextInPixels(String string, int x, int y) {
  drawTextInPixels(string, x, y, SWT.DRAW_DELIMITER | SWT.DRAW_TAB);
}

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

/**
 * Draws the given string, using the receiver's current font and
 * foreground color. Tab expansion and carriage return processing
 * are performed. If <code>isTransparent</code> is <code>true</code>,
 * then the background of the rectangular area where the text is being
 * drawn will not be modified, otherwise it will be filled with the
 * receiver's background color.
 *
 * @param string the string to be drawn
 * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the string is null</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
 * </ul>
 */
public void drawText(String string, int x, int y, boolean isTransparent) {
  Point loc = DPIUtil.autoScaleUp(drawable, new Point (x, y));
  drawTextInPixels(string, loc.x, loc.y, isTransparent);
}
void drawTextInPixels(String string, int x, int y, boolean isTransparent) {

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

/**
 * Draws the given string, using the receiver's current font and
 * foreground color. Tab expansion and carriage return processing
 * are performed. If <code>isTransparent</code> is <code>true</code>,
 * then the background of the rectangular area where the text is being
 * drawn will not be modified, otherwise it will be filled with the
 * receiver's background color.
 *
 * @param string the string to be drawn
 * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the string is null</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
 * </ul>
 */
public void drawText(String string, int x, int y, boolean isTransparent) {
  Point loc = DPIUtil.autoScaleUp(drawable, new Point (x, y));
  drawTextInPixels(string, loc.x, loc.y, isTransparent);
}
void drawTextInPixels(String string, int x, int y, boolean isTransparent) {

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

/**
 * Draws the given string, using the receiver's current font and
 * foreground color. Tab expansion and carriage return processing
 * are performed. If <code>isTransparent</code> is <code>true</code>,
 * then the background of the rectangular area where the text is being
 * drawn will not be modified, otherwise it will be filled with the
 * receiver's background color.
 *
 * @param string the string to be drawn
 * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the string is null</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
 * </ul>
 */
public void drawText(String string, int x, int y, boolean isTransparent) {
  Point loc = DPIUtil.autoScaleUp(drawable, new Point (x, y));
  drawTextInPixels(string, loc.x, loc.y, isTransparent);
}
void drawTextInPixels(String string, int x, int y, boolean isTransparent) {

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

drawTextInPixels(string, loc.x, loc.y, flags);

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

drawTextInPixels(string, loc.x, loc.y, flags);

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

drawTextInPixels(string, loc.x, loc.y, flags);

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

/**
 * Draws the given string, using the receiver's current font and
 * foreground color. Tab expansion and carriage return processing
 * are performed. The background of the rectangular area where
 * the text is being drawn will be filled with the receiver's
 * background color.
 *
 * @param string the string to be drawn
 * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the string is null</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
 * </ul>
 */
public void drawText (String string, int x, int y) {
  x = DPIUtil.autoScaleUp(x);
  y = DPIUtil.autoScaleUp(y);
  drawTextInPixels(string, x, y);
}

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

/**
 * Draws the given string, using the receiver's current font and
 * foreground color. Tab expansion and carriage return processing
 * are performed. If <code>isTransparent</code> is <code>true</code>,
 * then the background of the rectangular area where the text is being
 * drawn will not be modified, otherwise it will be filled with the
 * receiver's background color.
 *
 * @param string the string to be drawn
 * @param x the x coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param y the y coordinate of the top left corner of the rectangular area where the text is to be drawn
 * @param isTransparent if <code>true</code> the background will be transparent, otherwise it will be opaque
 *
 * @exception IllegalArgumentException <ul>
 *    <li>ERROR_NULL_ARGUMENT - if the string is null</li>
 * </ul>
 * @exception SWTException <ul>
 *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
 * </ul>
 */
public void drawText (String string, int x, int y, boolean isTransparent) {
  x = DPIUtil.autoScaleUp(x);
  y = DPIUtil.autoScaleUp(y);
  drawTextInPixels(string, x, y, isTransparent);
}

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

x = DPIUtil.autoScaleUp(x);
y = DPIUtil.autoScaleUp(y);
drawTextInPixels(string, x, y, flags);

相关文章

GC类方法