本文整理了Java中org.eclipse.swt.graphics.GC.getAdvanced()
方法的一些代码示例,展示了GC.getAdvanced()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GC.getAdvanced()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.GC
类名称:GC
方法名:getAdvanced
[英]Returns true
if receiver is using the operating system's advanced graphics subsystem. Otherwise, false
is returned to indicate that normal graphics are in use.
Advanced graphics may not be installed for the operating system. In this case, false
is always returned. Some operating system have only one graphics subsystem. If this subsystem supports advanced graphics, then true
is always returned. If any graphics operation such as alpha, antialias, patterns, interpolation, paths, clipping or transformation has caused the receiver to switch from regular to advanced graphics mode, true
is returned. If the receiver has been explicitly switched to advanced mode and this mode is supported, true
is returned.
[中]如果接收器正在使用操作系统的高级图形子系统,则返回true
。否则,将返回false
以指示正在使用普通图形。
操作系统可能未安装高级图形。在这种情况下,始终返回false
。某些操作系统只有一个图形子系统。如果此子系统支持高级图形,则始终返回true
。如果任何图形操作(如alpha、antialias、patterns、interpolation、Path、clipping或transformation)导致接收器从常规图形模式切换到高级图形模式,则返回true
。如果接收器已明确切换到高级模式,并且支持此模式,则返回true
。
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms
public static void setAntialias(GC gc, int style) {
if (!gc.getAdvanced()) {
gc.setAdvanced(true);
if (!gc.getAdvanced())
return;
}
gc.setAntialias(style);
}
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.forms
public static void setAntialias(GC gc, int style) {
if (!gc.getAdvanced()) {
gc.setAdvanced(true);
if (!gc.getAdvanced())
return;
}
gc.setAntialias(style);
}
}
代码示例来源:origin: rherrmann/eclipse-extras
private void prepareGC() {
if( gc.getAdvanced() ) {
gc.setTextAntialias( SWT.ON );
}
gc.fillRectangle( clientArea );
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench.texteditor
@Override
public void paintControl(PaintEvent event) {
GC gc = event.gc;
int clientAreaWidth = fMinimapTextWidget.getClientArea().width;
gc.setBackground(fMinimapTextWidget.getSelectionBackground());
Rectangle rect = new Rectangle(0, fTopIndexY, clientAreaWidth,
Math.max(fBottomIndexY - fTopIndexY, fMinimalHeight));
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(20);
gc.fillRectangle(rect);
gc.setAdvanced(false);
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
/**
* Creates a new painter for the given text viewer.
*
* @param textViewer the text viewer the painter should be attached to
*/
public WhitespaceCharacterPainter(ITextViewer textViewer) {
super();
fTextViewer= textViewer;
fTextWidget= textViewer.getTextWidget();
GC gc= new GC(fTextWidget);
gc.setAdvanced(true);
fIsAdvancedGraphicsPresent= gc.getAdvanced();
gc.dispose();
fIsFullSelectionStyle= (fTextWidget.getStyle() & SWT.FULL_SELECTION) != SWT.NONE;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
/**
* Creates a new painter for the given text viewer.
*
* @param textViewer the text viewer the painter should be attached to
*/
public WhitespaceCharacterPainter(ITextViewer textViewer) {
super();
fTextViewer= textViewer;
fTextWidget= textViewer.getTextWidget();
GC gc= new GC(fTextWidget);
gc.setAdvanced(true);
fIsAdvancedGraphicsPresent= gc.getAdvanced();
gc.dispose();
fIsFullSelectionStyle= (fTextWidget.getStyle() & SWT.FULL_SELECTION) != SWT.NONE;
}
代码示例来源:origin: BiglySoftware/BiglyBT
private boolean swt_printString_NoAdvanced() {
boolean b = false;
try {
boolean wasAdvanced = gc.getAdvanced();
Rectangle clipping = null;
if (gc.getAdvanced() && gc.getTextAntialias() == SWT.DEFAULT
&& gc.getAlpha() == 255) {
clipping = gc.getClipping();
代码示例来源:origin: stackoverflow.com
GC gc = e.gc;
gc.setAdvanced(true);
if (!gc.getAdvanced()){
gc.drawText("Advanced graphics not supported", 30, 30, true);
return;
代码示例来源:origin: BiglySoftware/BiglyBT
Utils.setClipping(gc, cellBounds);
boolean hack_adv = Constants.isWindows8OrHigher && gc.getAdvanced();
代码示例来源:origin: stackoverflow.com
public void handleEvent( Event event ) {
event.detail &= ~SWT.HOT;
GC gc = event.gc;
Rectangle area = table.getClientArea();
/*
* If you wish to paint the selection beyond the end of
* last column, you must change the clipping region.
*/
int columnCount = table.getColumnCount();
if ( event.index == columnCount - 1 || columnCount == 0 ) {
int width = area.x + area.width - event.x;
if ( width > 0 ) {
Region region = new Region();
gc.getClipping(region);
region.add(event.x, event.y, width, event.height);
gc.setClipping(region);
region.dispose();
}
}
gc.setAdvanced(true);
if ( gc.getAdvanced() ) gc.setAlpha(127);
Rectangle rect = event.getBounds();
Color background = gc.getBackground();
gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
gc.fillRectangle(0, rect.y, 500, rect.height);
// restore colors for subsequent drawing
gc.setBackground(background);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
forceHorizontal = !gc.getAdvanced();
gc.dispose();
代码示例来源:origin: org.eclipse.platform/org.eclipse.tips.ui
private void paintButton(GC gc, Composite providerButton, TipProvider provider) {
gc.setAdvanced(true);
if (!gc.getAdvanced()) {
throw new RuntimeException(Messages.Slider_13);
}
if (provider.equals(fSelectedProvider)) {
gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION_TEXT));
gc.setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION));
gc.drawRectangle(0, 0, fIconSize + 3, fIconSize + 3);
} else {
gc.setForeground(fLeftButton.getForeground());
gc.setBackground(fLeftButton.getBackground());
boolean mouseIn = getDisplay().getCursorControl() == providerButton;
if (mouseIn) {
gc.drawRectangle(0, 0, fIconSize + 3, fIconSize + 3);
} else {
gc.setBackground(fScroller.getBackground());
}
}
gc.fillRectangle(2, 2, fIconSize, fIconSize);
Image overlay = getUnreadOverlay(providerButton, provider);
gc.drawImage(overlay, 2, 2);
if (overlay != getProviderImage(provider, selectProviderImage(provider))) {
overlay.dispose();
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(100);
gc.fillRectangle(rect);
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(100);
gc.fillRectangle(rect);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(100);
gc.fillRectangle(rect);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(100);
gc.fillRectangle(rect);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
gc.drawRectangle(rect.x, rect.y, Math.max(1, rect.width - 1), Math.max(1, rect.height - 1));
gc.setAdvanced(true);
if (gc.getAdvanced()) {
gc.setAlpha(100);
gc.fillRectangle(rect);
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
if (gc.getAdvanced()) {
gc.setAntialias(SWT.ON);
代码示例来源:origin: BiglySoftware/BiglyBT
Utils.setClipping(gc, cellBounds);
boolean hack_adv = Constants.isWindows8OrHigher && gc.getAdvanced();
代码示例来源:origin: BiglySoftware/BiglyBT
Utils.setClipping(gc, cellBounds);
boolean hack_adv = Constants.isWindows8OrHigher && gc.getAdvanced();
内容来源于网络,如有侵权,请联系作者删除!