Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Path.dispose()


      Path ovalPath = new Path(device);
      ovalPath.addArc(90, 90, width - 180, height - 180, 0, 360);

      path.addPath(ovalPath);
      gc.setClipping(path);
      ovalPath.dispose();
      path.dispose();
      break;
    case 5: // triangles
      path = new Path(device);
      path.addRectangle(0, 0, width, height);
View Full Code Here


      path.addPath(path3);
      path.addPath(path4);
      path.addPath(path5);
      gc.setClipping(path);

      path5.dispose();
      path4.dispose();
      path3.dispose();
      path2.dispose();
      path.dispose();
      break;
View Full Code Here

      return GraphicsExample.advanceGraphics;
    GraphicsExample.advanceGraphicsInit = true;
    Display display = parent.getDisplay();
    try {
      Path path = new Path(display);
      path.dispose();
    } catch (SWTException e) {
      Shell shell = display.getActiveShell(), newShell = null;
      if (shell == null)
        shell = newShell = new Shell(display);
      MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
View Full Code Here

    Rectangle rect = image.getBounds();
    gc.drawImage(image, 0, 0, rect.width, rect.height, 0, 0, width, height);
    gc.setClipping((Rectangle) null);
    gc.setForeground(device.getSystemColor(SWT.COLOR_BLUE));
    gc.drawPath(path);
    path.dispose();
  }
}
View Full Code Here

    gc.setBackground(device.getSystemColor(fillColor));

    gc.fillPath(path);
    gc.drawPath(path);
    font.dispose();
    path.dispose();
  }
}
View Full Code Here

    Path path = new Path(device);
    float offsetX = 2 * width / 3f, offsetY = height / 3f;
    for (int i = 0; i < 25; i++)
      path.addArc(offsetX - 50 * i, offsetY - 25 * i, 50 + 100 * i, 25 + 50 * i, 0, 360);
    gc.fillPath(path);
    path.dispose();
  }
}
View Full Code Here

        diameter / 25, 0, 360);
    path.addArc(39f * (width - diameter / 25) / 100, 67 * (height - diameter / 25) / 100, diameter / 25,
        diameter / 25, 0, 360);

    gc.fillPath(path);
    path.dispose();

    if (pattern != null)
      pattern.dispose();
  }
}
View Full Code Here

          .addArc((width - diameter + 50) / 2, (height - diameter + 50) / 2, diameter - 50, diameter - 50, 0,
              360);
      gc.drawPath(path);
      gc.setBackground(device.getSystemColor(SWT.COLOR_RED));
      gc.fillPath(path);
      path.dispose();

      Point point = gc.stringExtent(new Integer(nextNumber).toString());
      int textWidth = point.x;
      int textHeight = point.y;
View Full Code Here

    Path path = new Path(device);
    path.cubicTo(133 + cubDiffX1, -60 + cubDiffY1, 266 + cubDiffX2, 60 + cubDiffY2, 400 + cubEndDiffX,
        0 + cubEndDiffY);
    gc.drawPath(path);
    path.dispose();

    gc.setTransform(null);
    gc.setForeground(device.getSystemColor(SWT.COLOR_DARK_BLUE));
    gc.drawRectangle(cubHndl1.x + (int) cubXPos, cubHndl1.y + (int) cubYPos, cubHndl1.width, cubHndl1.height);
    gc.drawRectangle(cubHndl2.x + (int) cubXPos, cubHndl2.y + (int) cubYPos, cubHndl2.width, cubHndl2.height);
View Full Code Here

    gc.drawString(GraphicsExample.getResourceString("Quadratic"), 0, -50, true);

    path = new Path(device);
    path.quadTo(200 + quadDiffX, 150 + quadDiffY, 400 + quadEndDiffX, 0 + quadEndDiffY);
    gc.drawPath(path);
    path.dispose();

    gc.setTransform(null);
    gc.setForeground(device.getSystemColor(SWT.COLOR_GRAY));
    gc.drawRectangle(quadHndl.x + (int) quadXPos, quadHndl.y + (int) quadYPos, quadHndl.width, quadHndl.height);
    gc.drawRectangle(quadEndHndl.x + (int) quadXPos, quadEndHndl.y + (int) quadYPos, quadEndHndl.width,
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.