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

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

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

GC.setXORMode介绍

[英]If the argument is true, puts the receiver in a drawing mode where the resulting color in the destination is the exclusive or of the color values in the source and the destination, and if the argument is false, puts the receiver in a drawing mode where the destination color is replaced with the source color value.

Note that this mode in fundamentally unsupportable on certain platforms, notably Carbon (Mac OS X). Clients that want their code to run on all platforms need to avoid this method.
[中]如果参数为true,则将接收器置于绘图模式,其中目标中的结果颜色是源和目标中颜色值的异或;如果参数为false,则将接收器置于绘图模式,其中目标颜色替换为源颜色值。
请注意,这种模式在某些平台上根本不受支持,尤其是Carbon(Mac OS X)。希望代码在所有平台上运行的客户端需要避免这种方法。

代码示例

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

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

代码示例来源:origin: org.eclipse/org.eclipse.jst.pagedesigner

gc.setXORMode(true);
gc.setLineWidth(size.x);

相关文章

微信公众号

最新文章

更多

GC类方法