本文整理了Java中org.eclipse.swt.graphics.GC.setInterpolation()
方法的一些代码示例,展示了GC.setInterpolation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GC.setInterpolation()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.GC
类名称:GC
方法名:setInterpolation
[英]Sets the receiver's interpolation setting to the parameter, which must be one of SWT.DEFAULT
, SWT.NONE
, SWT.LOW
or SWT.HIGH
.
This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms.
[中]将接收器的插值设置设置为参数,该参数必须是SWT.DEFAULT
、SWT.NONE
、SWT.LOW
或SWT.HIGH
中的一个。
此操作需要操作系统的高级图形子系统,该子系统在某些平台上可能不可用。
代码示例来源:origin: stackoverflow.com
Image scaled = new Image(Display.getDefault(), width, height);
GC gc = new GC(scaled);
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
gc.drawImage(image, 0, 0,image.getBounds().width, image.getBounds().height, 0, 0, width, height);
gc.dispose();
// Image data from scaled image and transparent pixel from original
ImageData imageData = scaled.getImageData();
imageData.transparentPixel = image.getImageData().transparentPixel;
// Final scaled transparent image
Image finalImage = new Image(Display.getDefault(), imageData);
scaled.dispose();
代码示例来源:origin: stackoverflow.com
public static Image resize(Image image, int width, int height) {
Image scaled = new Image(Display.getDefault(), width, height);
GC gc = new GC(scaled);
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
gc.drawImage(image, 0, 0,image.getBounds().width, image.getBounds().height, 0, 0, width, height);
gc.dispose();
image.dispose(); // don't forget about me!
return scaled;
}
代码示例来源:origin: stackoverflow.com
private Image resize(Image image, int width, int height) {
Image scaled = new Image(Display.getDefault(), width, height);
GC gc = new GC(scaled);
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height,
0, 0, width, height);
gc.dispose();
image.dispose(); // don't forget about me!
return scaled;
}
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setInterpolation(SWT.HIGH);
} catch (Exception e) {
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
setClipping((Rectangle)null);
setForegroundPattern(null);
setInterpolation(SWT.DEFAULT);
setTextAntialias(SWT.DEFAULT);
setTransform(null);
代码示例来源:origin: com.googlecode.gstreamer-java/gstreamer-java
sizeX = size.x;
sizeY = size.y;
gc.setInterpolation(SWT.HIGH);
if (keepAspect) {
if (((float) currentWidth / (float) size.x) > ((float) currentHeight
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
setClipping(0);
setForegroundPattern(null);
setInterpolation(SWT.DEFAULT);
setTextAntialias(SWT.DEFAULT);
setTransform(null);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
setClipping(0);
setForegroundPattern(null);
setInterpolation(SWT.DEFAULT);
setTextAntialias(SWT.DEFAULT);
setTransform(null);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
setClipping(0);
setForegroundPattern(null);
setInterpolation(SWT.DEFAULT);
setTextAntialias(SWT.DEFAULT);
setTransform(null);
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setAdvanced(true);
gc.setAntialias(SWT.ON);
gc.setInterpolation(SWT.HIGH);
} catch (Exception e) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
gc.setInterpolation(SWT.NONE);
gc.drawImage(image, 0, 0);
gc.setInterpolation(SWT.LOW);
gc.drawImage(image, bounds.width, 0);
gc.setInterpolation(SWT.DEFAULT);
gc.drawImage(image, 2*bounds.width, 0);
gc.setInterpolation(SWT.HIGH);
gc.drawImage(image, 3*bounds.width, 0);
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setInterpolation(SWT.HIGH);
} catch (Exception e) {
代码示例来源:origin: BiglySoftware/BiglyBT
try {
gc.setAdvanced(true);
gc.setInterpolation(SWT.HIGH);
gc.setAntialias(SWT.ON);
} catch (Exception ex) {
代码示例来源:origin: BiglySoftware/BiglyBT
e.gc.setInterpolation(SWT.HIGH);
} catch (Exception ex) {
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setInterpolation(SWT.HIGH);
} catch (Exception e) {
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setInterpolation(SWT.HIGH);
} catch (Exception e) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
gc.setBackgroundPattern (oldBackgroundPattern);
gc.setForegroundPattern (oldForegroundPattern);
gc.setInterpolation (oldInterpolation);
gc.setTextAntialias (oldTextAntialias);
gc.setAdvanced (oldAdvanced);
gc.setClipping (cellBounds);
gc.setForegroundPattern (oldForegroundPattern);
gc.setInterpolation (oldInterpolation);
gc.setTextAntialias (oldTextAntialias);
gc.setAdvanced (oldAdvanced);
gc.setClipping (cellBounds);
gc.setForegroundPattern (oldForegroundPattern);
gc.setInterpolation (oldInterpolation);
gc.setTextAntialias (oldTextAntialias);
gc.setAdvanced (oldAdvanced);
代码示例来源:origin: BiglySoftware/BiglyBT
gc.setInterpolation(SWT.HIGH);
gc.drawImage(imageLeft, 0, 0, bounds.width, bounds.height, x, y, w, h );
内容来源于网络,如有侵权,请联系作者删除!