public static Image makePreview ( final Display display, final LineAttributes lineAttributes, final Color lineColor, final Point p )
{
final Image img = new Image ( display, p.x, p.y );
final GC gc = new GC ( img );
try
{
gc.setForeground ( img.getDevice ().getSystemColor ( SWT.COLOR_WHITE ) );
gc.setBackground ( img.getDevice ().getSystemColor ( SWT.COLOR_WHITE ) );
gc.fillRectangle ( 0, 0, p.x, p.y );
gc.setLineAttributes ( lineAttributes );
if ( lineColor != null )
{
gc.setForeground ( lineColor );
}
gc.drawLine ( 0, p.y / 2, p.x, p.y / 2 );
}
finally
{
gc.dispose ();
}
return img;
}
LineInput.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:neoscada
作者:
评论列表
文章目录