本文整理了Java中org.eclipse.swt.graphics.GC.checkGC()
方法的一些代码示例,展示了GC.checkGC()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。GC.checkGC()
方法的具体详情如下:
包路径:org.eclipse.swt.graphics.GC
类名称:GC
方法名:checkGC
暂无
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
Point textExtentInPixels(String string, int flags) {
setString(string, flags);
checkGC(FONT);
if (data.stringWidth == -1) {
computeStringSize();
}
return new Point(data.stringWidth, data.stringHeight);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
Point textExtentInPixels(String string, int flags) {
setString(string, flags);
checkGC(FONT);
if (data.stringWidth == -1) {
computeStringSize();
}
return new Point(data.stringWidth, data.stringHeight);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
Point textExtentInPixels(String string, int flags) {
setString(string, flags);
checkGC(FONT);
if (data.stringWidth == -1) {
computeStringSize();
}
return new Point(data.stringWidth, data.stringHeight);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void fillRoundRectangleInPixels (int x, int y, int width, int height, int arcWidth, int arcHeight) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(FILL);
if (data.gdipGraphics != 0) {
fillRoundRectangleGdip(data.gdipGraphics, data.gdipBrush, x, y, width, height, arcWidth, arcHeight);
return;
}
if ((data.style & SWT.MIRRORED) != 0) x--;
OS.RoundRect(handle, x,y,x+width+1,y+height+1,arcWidth, arcHeight);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void fillOvalInPixels (int x, int y, int width, int height) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
checkGC(FILL);
if (data.gdipGraphics != 0) {
Gdip.Graphics_FillEllipse(data.gdipGraphics, data.gdipBrush, x, y, width, height);
return;
}
if ((data.style & SWT.MIRRORED) != 0) x--;
OS.Ellipse(handle, x, y, x + width + 1, y + height + 1);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void drawPolylineInPixels(int[] pointArray) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, false);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void drawPolylineInPixels(int[] pointArray) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, false);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void drawPointInPixels (int x, int y) {
checkGC(DRAW);
long /*int*/ cairo = data.cairo;
if (cairo != 0) {
Cairo.cairo_rectangle(cairo, x, y, 1, 1);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_point(data.drawable, handle, x, y);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void fillPolygonInPixels(int[] pointArray) {
checkGC(FILL);
long /*int*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void fillPolygonInPixels(int[] pointArray) {
checkGC(FILL);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void drawPointInPixels (int x, int y) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
Cairo.cairo_rectangle(cairo, x, y, 1, 1);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_point(data.drawable, handle, x, y);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void drawPointInPixels (int x, int y) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
Cairo.cairo_rectangle(cairo, x, y, 1, 1);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_point(data.drawable, handle, x, y);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
void drawPolygonInPixels(int[] pointArray) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void drawPolygonInPixels(int[] pointArray) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void fillPolygonInPixels(int[] pointArray) {
checkGC(FILL);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_fill(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void drawPolygonInPixels(int[] pointArray) {
checkGC(DRAW);
long /*int*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, true);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void drawPolylineInPixels(int[] pointArray) {
checkGC(DRAW);
long /*int*/ cairo = data.cairo;
if (cairo != 0) {
drawPolyline(cairo, pointArray, false);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
void drawPointInPixels (int x, int y) {
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
if (data.gdipGraphics != 0) {
checkGC(DRAW);
Gdip.Graphics_FillRectangle(data.gdipGraphics, getFgBrush(), x, y, 1, 1);
return;
}
OS.SetPixel (handle, x, y, data.foreground);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
void drawLineInPixels(int x1, int y1, int x2, int y2) {
checkGC(DRAW);
int /*long*/ cairo = data.cairo;
if (cairo != 0) {
double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
Cairo.cairo_move_to(cairo, x1 + xOffset, y1 + yOffset);
Cairo.cairo_line_to(cairo, x2 + xOffset, y2 + yOffset);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_line (data.drawable, handle, x1, y1, x2, y2);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
void drawLineInPixels(int x1, int y1, int x2, int y2) {
checkGC(DRAW);
long /*int*/ cairo = data.cairo;
if (cairo != 0) {
double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
Cairo.cairo_move_to(cairo, x1 + xOffset, y1 + yOffset);
Cairo.cairo_line_to(cairo, x2 + xOffset, y2 + yOffset);
Cairo.cairo_stroke(cairo);
return;
}
OS.gdk_draw_line (data.drawable, handle, x1, y1, x2, y2);
}
内容来源于网络,如有侵权,请联系作者删除!