Package org.eclipse.swt.graphics

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


      path.close();
    if (fillButton.getSelection())
      gc.fillPath(path);
    if (drawButton.getSelection())
      gc.drawPath(path);
    path.dispose();

    // shape on left
    Transform transform = new Transform(device);
    transform.translate((width - 250) / 4, height / 2 - 150);
    gc.setTransform(transform);
View Full Code Here


      path.close();
    if (fillButton.getSelection())
      gc.fillPath(path);
    if (drawButton.getSelection())
      gc.drawPath(path);
    path.dispose();
    gc.setTransform(null);

    // shape on right
    path = new Path(device);
    path.moveTo(3 * (width - 250) / 4 - 25 + 250, height / 2);
View Full Code Here

    path.addArc((width - diameter + 25) / 2, (height - diameter + 25) / 2, diameter - 25, diameter - 25, 0, 360);
    path.close();
    gc.setBackground(device.getSystemColor(SWT.COLOR_GRAY));
    gc.fillPath(path);
    gc.drawPath(path);
    path.dispose();
  }
}
View Full Code Here

    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);
    path = new Path(device);
    path.addRectangle(width / 4f, 0, width / 4f, height / 4f);
View Full Code Here

    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();
    pattern2.dispose();
    return image;
View Full Code Here

  public Shell open(final Display display) {
    final Shell shell = new Shell(display);
    shell.setText(AdvancedGraphics.RESOURCE_BUNDLE.getString("AdvancedGraphics")); //$NON-NLS-1$
    try {
      Path path = new Path(display);
      path.dispose();
    } catch (SWTException e) {
      MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
      dialog.setText(AdvancedGraphics.RESOURCE_BUNDLE.getString("Warning")); //$NON-NLS-1$
      dialog.setMessage(AdvancedGraphics.RESOURCE_BUNDLE.getString("LibNotFound")); //$NON-NLS-1$
      dialog.open();
View Full Code Here

        gc.setBackground(display.getSystemColor(SWT.COLOR_GREEN));
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLUE));
        gc.fillPath(path);
        gc.drawPath(path);
        tr.dispose();
        path.dispose();
      }
    });
    shell.setSize(shell.computeSize(rect.width, rect.height));
    shell.open();
    shell.addListener(SWT.Dispose, new Listener() {
View Full Code Here

        path.addArc(0, 0, bc[j].ball_size, bc[j].ball_size, 0, 360);
        gc.setAlpha(255 - i * 255 / bc[j].capacity);
        gc.setBackground(bc[j].colors[0]);
        gc.fillPath(path);
        gc.drawPath(path);
        path.dispose();
      }
  }
}
View Full Code Here

    gc.drawPath(path);

    if (pattern != null)
      pattern.dispose();

    path9.dispose();
    path8.dispose();
    path7.dispose();
    path6.dispose();
    path5.dispose();
    path4.dispose();
View Full Code Here

      path.close();
    if (fillButton.getSelection())
      gc.fillPath(path);
    if (drawButton.getSelection())
      gc.drawPath(path);
    path.dispose();

    if (pattern != null)
      pattern.dispose();
  }
}
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.