Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.GC.fillRectangle()


    {
        Image img = createSmallIcon(display);

        GC gc = new GC(img);
        gc.setBackground(color);
        gc.fillRectangle(img.getBounds());
        gc.dispose();
       
        return img;
    }
View Full Code Here


    if (fForeground != null)
      gc.setForeground(fForeground);

    try {
      gc.setBackground(getBackground(fCanvas.getDisplay()));
      gc.fillRectangle(0, 0, size.x, size.y);

      ILineRange visibleLines= JFaceTextUtil.getVisibleModelLines(fCachedTextViewer);
      if (visibleLines == null)
        return;
      fScrollPos= fCachedTextWidget.getTopPixel();
View Full Code Here

      @Override
      public void paintControl(PaintEvent event) {
        Image image = new Image(getDisplay(), getClientArea());
        GC gc = new GC(image);
        gc.setBackground(new Color(getDisplay(), 0, 0, 0));
        gc.fillRectangle(0, 0, image.getBounds().width,
            image.getBounds().height);
        Point3D size = new Point3D(mapWidth - 1, mapHeight - 1,
            mapAltitude - 1); // The -1 is important :)
        for (int k = 0; k < mapAltitude; k++) {
          for (int i = 0; i < mapWidth; i++) {
View Full Code Here

        ImageData imageData = image.getImageData();
        int w = imageData.width;
        int h = imageData.height;

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(fill);
        gc.fillRectangle(2, 2, w - 4, h - 4);

        gc.setForeground(line);
View Full Code Here

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(fill);
        gc.fillRectangle(2, 2, w - 4, h - 4);

        gc.setForeground(line);
        gc.setLineWidth(width);
        gc.drawRectangle(2, 2, w - 4, w - 4);
View Full Code Here

        ImageData imageData = image.getImageData();
        int w = imageData.width;
        int h = imageData.height;

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(fill);
        gc.fillOval(w / 2 - width / 2, h / 2 - width / 2, width, width);

        return descriptor(imageData, image, gc);
View Full Code Here

        ImageData imageData = image.getImageData();
        int w = imageData.width;
        int h = imageData.height;

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setForeground(line);
        gc.setLineWidth(width);

        gc.drawLine(2, 2, 2, 4);
View Full Code Here

        ImageData imageData = image.getImageData();
        int w = imageData.width;
        int h = imageData.height;

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(line);
        gc.setForeground(line);
        gc.setLineWidth(width);
        gc.drawLine(1, h / 2, w - 1, h / 2);
View Full Code Here

        ImageData imageData = image.getImageData();
        int w = imageData.width;
        int h = imageData.height;

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(fill);
        gc.fillRectangle(2, 2, w - 4, h - 4);

        gc.setForeground(line);
View Full Code Here

        gc.setBackground(back);
        gc.fillRectangle(0, 0, w, h);

        gc.setBackground(fill);
        gc.fillRectangle(2, 2, w - 4, h - 4);

        gc.setForeground(line);
        gc.setLineWidth(width);
        gc.drawRectangle(2, 2, w - 4, w - 4);
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.