Examples of addRectangle()


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

      gc.setClipping(path);
      path.dispose();
      break;
    case 1: // rectangle
      path = new Path(device);
      path.addRectangle(100, 100, width - 200, height - 200);
      path.addRectangle(120, 120, width - 240, height - 240);
      path.addRectangle(140, 140, width - 280, height - 280);
      gc.setClipping(path);
      path.dispose();
      break;
View Full Code Here

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

      path.dispose();
      break;
    case 1: // rectangle
      path = new Path(device);
      path.addRectangle(100, 100, width - 200, height - 200);
      path.addRectangle(120, 120, width - 240, height - 240);
      path.addRectangle(140, 140, width - 280, height - 280);
      gc.setClipping(path);
      path.dispose();
      break;
    case 2: // circle
View Full Code Here

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

      break;
    case 1: // rectangle
      path = new Path(device);
      path.addRectangle(100, 100, width - 200, height - 200);
      path.addRectangle(120, 120, width - 240, height - 240);
      path.addRectangle(140, 140, width - 280, height - 280);
      gc.setClipping(path);
      path.dispose();
      break;
    case 2: // circle
      path = new Path(device);
View Full Code Here

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

    Rectangle rect = image.getBounds();

    Pattern pattern1 = new Pattern(device, rect.x, rect.y, rect.width / 2f, rect.height / 2f, color1, color2);
    gc.setBackgroundPattern(pattern1);
    Path path = new Path(device);
    path.addRectangle(0, 0, width / 4f, height / 4f);
    path.addRectangle(width / 4f, height / 4f, width / 4f, height / 4f);
    gc.fillPath(path);
    path.dispose();

    Pattern pattern2 = new Pattern(device, rect.width, 0, rect.width / 2f, rect.height / 2f, color1, color2);
View Full Code Here

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

    Pattern pattern1 = new Pattern(device, rect.x, rect.y, rect.width / 2f, rect.height / 2f, color1, color2);
    gc.setBackgroundPattern(pattern1);
    Path path = new Path(device);
    path.addRectangle(0, 0, width / 4f, height / 4f);
    path.addRectangle(width / 4f, height / 4f, width / 4f, height / 4f);
    gc.fillPath(path);
    path.dispose();

    Pattern pattern2 = new Pattern(device, rect.width, 0, rect.width / 2f, rect.height / 2f, color1, color2);
    gc.setBackgroundPattern(pattern2);
View Full Code Here

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

    path.dispose();

    Pattern pattern2 = new Pattern(device, rect.width, 0, rect.width / 2f, rect.height / 2f, color1, color2);
    gc.setBackgroundPattern(pattern2);
    path = new Path(device);
    path.addRectangle(width / 4f, 0, width / 4f, height / 4f);
    path.addRectangle(0, height / 4f, width / 4f, height / 4f);
    gc.fillPath(path);
    path.dispose();

    gc.dispose();
View Full Code Here

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

    Pattern pattern2 = new Pattern(device, rect.width, 0, rect.width / 2f, rect.height / 2f, color1, color2);
    gc.setBackgroundPattern(pattern2);
    path = new Path(device);
    path.addRectangle(width / 4f, 0, width / 4f, height / 4f);
    path.addRectangle(0, height / 4f, width / 4f, height / 4f);
    gc.fillPath(path);
    path.dispose();

    gc.dispose();
    pattern1.dispose();
View Full Code Here

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

    path5.moveTo((width - 200) / 2, (height - 200) / 2);
    path5.addArc((width - 200) / 2, (height - 200) / 2, 200, 200, 0, 360);

    // top rectangle
    Path path6 = new Path(device);
    path6.addRectangle((width - 40) / 2, 175, 40, (height - 200) / 2 - 177);

    // bottom rectangle
    Path path7 = new Path(device);
    path7.addRectangle((width - 40) / 2, (height - 200) / 2 + 202, 40, height - 175 - ((height - 200) / 2 + 202));
View Full Code Here

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

    Path path6 = new Path(device);
    path6.addRectangle((width - 40) / 2, 175, 40, (height - 200) / 2 - 177);

    // bottom rectangle
    Path path7 = new Path(device);
    path7.addRectangle((width - 40) / 2, (height - 200) / 2 + 202, 40, height - 175 - ((height - 200) / 2 + 202));

    // left rectangle
    Path path8 = new Path(device);
    path8.addRectangle(175, (height - 40) / 2, (width - 200) / 2 - 177, 40);
View Full Code Here

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

    Path path7 = new Path(device);
    path7.addRectangle((width - 40) / 2, (height - 200) / 2 + 202, 40, height - 175 - ((height - 200) / 2 + 202));

    // left rectangle
    Path path8 = new Path(device);
    path8.addRectangle(175, (height - 40) / 2, (width - 200) / 2 - 177, 40);

    // right rectangle
    Path path9 = new Path(device);
    path9.addRectangle((width - 200) / 2 + 202, (height - 40) / 2, width - 175 - ((width - 200) / 2 + 202), 40);
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.