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

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

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

GC.drawPoint介绍

[英]Draws a pixel, using the foreground color, at the specified point (x, y).

Note that the receiver's line attributes do not affect this operation.
[中]使用前景色在指定点(xy处绘制像素。
请注意,接收器的线路属性不会影响此操作。

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

public void drawPoint( int x, int y ) {
 gc.drawPoint( x, y );
}

代码示例来源:origin: pentaho/pentaho-kettle

public void drawPoint( int x, int y ) {
 gc.drawPoint( x, y );
}

代码示例来源:origin: com.eclipsesource.tabris/tabris

@Override
 public void paintControl( PaintEvent event ) {
  GC gc = event.gc;
  processClientDrawings( gc );
  gc.drawPoint( -1, -1 ); //TODO: This is a workaround to force updates, see RAP bug 377070
 }
};

代码示例来源:origin: BiglySoftware/BiglyBT

/**
 * Draws diagonal stripes onto the specified area of a GC
 * @param lineDist spacing between the individual lines
 * @param leftshift moves the stripes to the left, useful to shift with the background
 * @param fallingLines true for top left to bottom-right lines, false otherwise
 */
public static void drawStriped(GC gcImg, int x, int y, int width, int height,
    int lineDist, int leftshift, boolean fallingLines) {
  lineDist += 2;
  final int xm = x + width;
  final int ym = y + height;
  for (int i = x; i < xm; i++) {
    for (int j = y; j < ym; j++) {
      if ((i + leftshift + (fallingLines ? -j : j)) % lineDist == 0)
        gcImg.drawPoint(i, j);
    }
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

GC context = new GC(handleImage);
context.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
context.drawPoint(0,0);
context.drawPoint(2,0);
context.drawPoint(3,0);
context.drawPoint(3,1);
context.drawPoint(0,2);
context.drawPoint(3,2);
context.drawPoint(0,3);
context.drawPoint(1,3);
context.drawPoint(2,3);
context.drawPoint(3,3);
context.drawPoint(1,0);
context.drawPoint(0,1);
context.drawPoint(1,1);
context.drawPoint(1,2);
context.drawPoint(2,1);
context.drawPoint(2,2);

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

lastColorIndex = rawY - 1;
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
gc.drawPoint(lastX, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[i]);
gc.drawPoint(1 + lastX++, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);

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

lastColorIndex = rawY - 1;
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
gc.drawPoint(lastX, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[i]);
gc.drawPoint(1 + lastX++, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);

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

lastColorIndex = rawY - 1;
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
gc.drawPoint(lastX, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[i]);
gc.drawPoint(1 + lastX++, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);

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

lastColorIndex = rawY - 1;
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
gc.drawPoint(lastX, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[i]);
gc.drawPoint(1 + lastX++, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);

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

lastColorIndex = rawY - 1;
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
gc.drawPoint(lastX, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[i]);
gc.drawPoint(1 + lastX++, 1 + lastY++);
  break;	//can happen if tabs are unusually short and cut off the curve
gc.setForeground(gradients[lastColorIndex]);
gc.drawPoint(lastX, lastY);

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text

int third= (int) (width / 3);
int dotsVertical= p.y + baseline - 1;
gc.drawPoint(p.x + third, dotsVertical);
gc.drawPoint((int) (p.x + width - third), dotsVertical);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text

int third= width/3;
int dotsVertical= p.y + baseline - 1;
gc.drawPoint(p.x + third, dotsVertical);
gc.drawPoint(p.x + width - third, dotsVertical);

代码示例来源:origin: diffplug/gradle-and-eclipse-rcp

private Image getMapFor(Display display) {
  if (luminance == lastLuminance) {
    return lastImage;
  }
  if (lastImage != null) {
    lastImage.dispose();
  }
  lastLuminance = luminance;
  lastImage = new Image(display, _256, _256);
  GC gc = new GC(lastImage);
  for (int x = 0; x < _256; ++x) {
    for (int y = 0; y < _256; ++y) {
      RGB rgb = fromYCbCr(new RGB(luminance, x, y));
      gc.setForeground(new Color(display, rgb));
      gc.drawPoint(x, y);
    }
  }
  gc.dispose();
  return lastImage;
}

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

if (handle == null) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (x1 == x2 && y1 == y2 && data.lineWidth <= 1) {
  drawPoint(x1, y1);
  return;

代码示例来源:origin: BiglySoftware/BiglyBT

e.gc.drawPoint(PX_2, (int) (y + ovalPadding));
e.gc.setForeground(saveColor);

代码示例来源:origin: org.eclipse/org.eclipse.wst.common.ui.properties

e.gc.setForeground(border);
  e.gc.drawLine(4, 0, bounds.width - 1, 0);
  e.gc.drawPoint(3, 1);
  e.gc.drawPoint(3, bounds.height - 1);
  e.gc.drawLine(2, 2, 2, bounds.height - 2);
} else {

相关文章

GC类方法