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

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

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

GC.setLineAttributes介绍

[英]Sets the receiver's line attributes.

This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms.
[中]设置接收器的线路属性。
此操作需要操作系统的高级图形子系统,该子系统在某些平台上可能不可用。

代码示例

代码示例来源: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.neoscada.chart/org.eclipse.scada.chart.swt

@Override
public void setLineAttributes ( final LineAttributes lineAttributes )
{
  this.gc.setLineAttributes ( lineAttributes );
}

代码示例来源:origin: de.dentrassi.eclipse.neoscada.chart/org.eclipse.scada.chart.swt

@Override
public void setLineAttributes ( final LineAttributes lineAttributes )
{
  this.gc.setLineAttributes ( lineAttributes );
}

代码示例来源:origin: org.xworker/xworker_swt

gc.setLineAttributes(lineAttributes);
gc.setForeground(oldForeground);
gc.setBackground(oldBackground);
gc.setLineAttributes(oldLineAttributes);
gc.setFont(oldFont);
gc.setTransform(oldTransform);

相关文章

微信公众号

最新文章

更多

GC类方法