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

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

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

GC.getLineWidth介绍

[英]Returns the width that will be used when drawing lines for all of the figure drawing operations (that is, drawLine, drawRectangle, drawPolyline, and so forth.
[中]返回为所有地物绘制操作(即,drawLinedrawRectangledrawPolyline等)绘制线时将使用的宽度。

代码示例

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

public void setLineStyle( ELineStyle lineStyle ) {
 switch ( lineStyle ) {
  case DASHDOT:
   gc.setLineStyle( SWT.LINE_DASHDOT );
   break;
  case SOLID:
   gc.setLineStyle( SWT.LINE_SOLID );
   break;
  case DOT:
   gc.setLineStyle( SWT.LINE_DOT );
   break;
  case DASH:
   gc.setLineStyle( SWT.LINE_DASH );
   break;
  case PARALLEL:
   gc.setLineAttributes( new LineAttributes(
    gc.getLineWidth(), SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_CUSTOM, new float[] { 5, 3, }, 0, 10 ) );
   break;
  default:
   break;
 }
}

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

public void setLineStyle( ELineStyle lineStyle ) {
 switch ( lineStyle ) {
  case DASHDOT:
   gc.setLineStyle( SWT.LINE_DASHDOT );
   break;
  case SOLID:
   gc.setLineStyle( SWT.LINE_SOLID );
   break;
  case DOT:
   gc.setLineStyle( SWT.LINE_DOT );
   break;
  case DASH:
   gc.setLineStyle( SWT.LINE_DASH );
   break;
  case PARALLEL:
   gc.setLineAttributes( new LineAttributes(
    gc.getLineWidth(), SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_CUSTOM, new float[] { 5, 3, }, 0, 10 ) );
   break;
  default:
   break;
 }
}

代码示例来源:origin: org.eclipse.mylyn.commons/screenshots

private void drawArrowLine(int xs, int ys, int xe, int ye, boolean bothsides) {
  int width = xe - xs, height = ye - ys;
  int bold = workImageGC.getLineWidth();
  int leng = (bold == 8) ? bold * 4 : (bold == 4) ? bold * 6 : (bold == 2) ? bold * 8 : bold * 10;
  double delta = Math.PI / 6.0;

代码示例来源:origin: org.jfree/swtgraphics2d

/**
 * Returns the current stroke for this graphics context.
 *
 * @return The current stroke.
 *
 * @see #setStroke(Stroke)
 */
@Override
public Stroke getStroke() {
  return new BasicStroke(this.gc.getLineWidth(),
      toAwtLineCap(this.gc.getLineCap()),
      toAwtLineJoin(this.gc.getLineJoin()));
}

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

private void doDispatch() {
 int lineWidth = gc.getLineWidth();
 Color foreground = gc.getForeground();
 int alpha = gc.getAlpha();
 dispatchOperations();
 restoreLastSettings( lineWidth, foreground, alpha );
}

代码示例来源:origin: org.eclipse.mylyn.commons/screenshots

Color backForeground = workImageGC.getForeground();
int backLineStyle = workImageGC.getLineStyle();
int backLineWidth = workImageGC.getLineWidth();
int[] history;
for (int c = 0; c < historyCheckpoint; c++) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

int lineWidth = gc.getLineWidth ();
for (int i = startIndex; i <= Math.min (endIndex, itemsCount - 1); i++) {
  CTableItem item = items [i];

代码示例来源:origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

final int oldLineWidth = gc.getLineWidth();
final int oldAntialias = gc.getAntialias();

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

imageGC.setFont(figureCanvasGC.getFont());
imageGC.setLineStyle(figureCanvasGC.getLineStyle());
imageGC.setLineWidth(figureCanvasGC.getLineWidth());
imageGC.setXORMode(figureCanvasGC.getXORMode());
Graphics imgGraphics = new SWTGraphics(imageGC);

相关文章

GC类方法