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

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

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

GC.checkGC介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. Point textExtentInPixels(String string, int flags) {
  2. setString(string, flags);
  3. checkGC(FONT);
  4. if (data.stringWidth == -1) {
  5. computeStringSize();
  6. }
  7. return new Point(data.stringWidth, data.stringHeight);
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. Point textExtentInPixels(String string, int flags) {
  2. setString(string, flags);
  3. checkGC(FONT);
  4. if (data.stringWidth == -1) {
  5. computeStringSize();
  6. }
  7. return new Point(data.stringWidth, data.stringHeight);
  8. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. Point textExtentInPixels(String string, int flags) {
  2. setString(string, flags);
  3. checkGC(FONT);
  4. if (data.stringWidth == -1) {
  5. computeStringSize();
  6. }
  7. return new Point(data.stringWidth, data.stringHeight);
  8. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. void fillRoundRectangleInPixels (int x, int y, int width, int height, int arcWidth, int arcHeight) {
  2. if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
  3. checkGC(FILL);
  4. if (data.gdipGraphics != 0) {
  5. fillRoundRectangleGdip(data.gdipGraphics, data.gdipBrush, x, y, width, height, arcWidth, arcHeight);
  6. return;
  7. }
  8. if ((data.style & SWT.MIRRORED) != 0) x--;
  9. OS.RoundRect(handle, x,y,x+width+1,y+height+1,arcWidth, arcHeight);
  10. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. void fillOvalInPixels (int x, int y, int width, int height) {
  2. if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
  3. checkGC(FILL);
  4. if (data.gdipGraphics != 0) {
  5. Gdip.Graphics_FillEllipse(data.gdipGraphics, data.gdipBrush, x, y, width, height);
  6. return;
  7. }
  8. if ((data.style & SWT.MIRRORED) != 0) x--;
  9. OS.Ellipse(handle, x, y, x + width + 1, y + height + 1);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. void drawPolylineInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, false);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void drawPolylineInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, false);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void drawPointInPixels (int x, int y) {
  2. checkGC(DRAW);
  3. long /*int*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. Cairo.cairo_rectangle(cairo, x, y, 1, 1);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_point(data.drawable, handle, x, y);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void fillPolygonInPixels(int[] pointArray) {
  2. checkGC(FILL);
  3. long /*int*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. void fillPolygonInPixels(int[] pointArray) {
  2. checkGC(FILL);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void drawPointInPixels (int x, int y) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. Cairo.cairo_rectangle(cairo, x, y, 1, 1);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_point(data.drawable, handle, x, y);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. void drawPointInPixels (int x, int y) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. Cairo.cairo_rectangle(cairo, x, y, 1, 1);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_point(data.drawable, handle, x, y);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. void drawPolygonInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void drawPolygonInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void fillPolygonInPixels(int[] pointArray) {
  2. checkGC(FILL);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_fill(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 1, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void drawPolygonInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. long /*int*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, true);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_polygon(data.drawable, handle, 0, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void drawPolylineInPixels(int[] pointArray) {
  2. checkGC(DRAW);
  3. long /*int*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. drawPolyline(cairo, pointArray, false);
  6. Cairo.cairo_stroke(cairo);
  7. return;
  8. }
  9. OS.gdk_draw_lines(data.drawable, handle, pointArray, pointArray.length / 2);
  10. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

  1. void drawPointInPixels (int x, int y) {
  2. if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED);
  3. if (data.gdipGraphics != 0) {
  4. checkGC(DRAW);
  5. Gdip.Graphics_FillRectangle(data.gdipGraphics, getFgBrush(), x, y, 1, 1);
  6. return;
  7. }
  8. OS.SetPixel (handle, x, y, data.foreground);
  9. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

  1. void drawLineInPixels(int x1, int y1, int x2, int y2) {
  2. checkGC(DRAW);
  3. int /*long*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
  6. Cairo.cairo_move_to(cairo, x1 + xOffset, y1 + yOffset);
  7. Cairo.cairo_line_to(cairo, x2 + xOffset, y2 + yOffset);
  8. Cairo.cairo_stroke(cairo);
  9. return;
  10. }
  11. OS.gdk_draw_line (data.drawable, handle, x1, y1, x2, y2);
  12. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. void drawLineInPixels(int x1, int y1, int x2, int y2) {
  2. checkGC(DRAW);
  3. long /*int*/ cairo = data.cairo;
  4. if (cairo != 0) {
  5. double xOffset = data.cairoXoffset, yOffset = data.cairoYoffset;
  6. Cairo.cairo_move_to(cairo, x1 + xOffset, y1 + yOffset);
  7. Cairo.cairo_line_to(cairo, x2 + xOffset, y2 + yOffset);
  8. Cairo.cairo_stroke(cairo);
  9. return;
  10. }
  11. OS.gdk_draw_line (data.drawable, handle, x1, y1, x2, y2);
  12. }

相关文章

GC类方法