Package org.eclipse.swt.graphics

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


        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);
    }

    public static ImageDescriptor text( int color, int width ) {
View Full Code Here


          // int y = (int) (CellModel.EDGE_LEN - (lat.getVal() - cm.getLat())
          // / cm.getLatInc());
          final int y = (int) ((cm.getLat() - lat.getVal()) / cm.getLatInc());
          if (mo.equals(selO)) {
            gc.setBackground(high);
            gc.fillOval(x - 7, y - 7, 15, 15);
          }
          gc.setBackground(red);
          gc.fillOval(x - 3, y - 3, 7, 7);
          _log.info("object at " + x + "," + y);
        }
View Full Code Here

          if (mo.equals(selO)) {
            gc.setBackground(high);
            gc.fillOval(x - 7, y - 7, 15, 15);
          }
          gc.setBackground(red);
          gc.fillOval(x - 3, y - 3, 7, 7);
          _log.info("object at " + x + "," + y);
        }
    }
    catch (final Throwable t) {
      _log.error("can't draw object", t);
View Full Code Here

        gc.setBackground( getActiveColor() );
      } else {
        gc.setBackground( getInactiveColor() );
      }
      int x = ( getDiameter() + getSpacing() ) * i;
      gc.fillOval( x, 0, getDiameter(), getDiameter() );
    }
    gc.dispose();
  }

  Canvas getCanvas() {
View Full Code Here

          Color oldBackground = gc.getBackground();
          gc.setBackground( gc.getDevice().getSystemColor( SWT.COLOR_WHITE ) );
          gc.drawString( Integer.toString( dotLabel ), dot.x + 5, dot.y + 5 );
          gc.setBackground( oldBackground );
        }
        gc.fillOval( dot.x, dot.y, 5, 5 );
      }

      Point transform( Point coord ) {
        Point centerDelta = calculateCenterDelta();
        Point inTopLeft = translate( coord, -ernieMinima.x, -ernieMinima.y );
View Full Code Here

            if (i > 0// don't draw for first segment
                g.drawLine(lastx, lasty, xposition, yposition);

            g.setBackground(thisItem.color);
            g.setForeground(thisItem.color);
            g.fillOval(xposition-2, yposition-2, 5, 5);

            if (this.fAreaBuffer == null)
                this.fAreaBuffer= new StringBuffer();

            this.fAreaBuffer.append("\r<area shape=\"CIRCLE\" coords=\""+(xposition-2)+','+(yposition-2)+','+5+" alt=\""+ thisItem.title+": "+thisItem.description+"\""+ " title=\""+ thisItem.title+": "+thisItem.description+"\">");
View Full Code Here

    final Font font = new Font(display, fd.getName(), 60, SWT.BOLD | SWT.ITALIC);
    final Image image = new Image(display, 640, 480);
    final Rectangle rect = image.getBounds();
    GC gc = new GC(image);
    gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
    gc.fillOval(rect.x, rect.y, rect.width, rect.height);
    gc.dispose();
    shell.addListener(SWT.Paint, new Listener() {
      @Override
      public void handleEvent(Event event) {
        GC gc = event.gc;
View Full Code Here

        gc.drawLine((int) screenCoords[2], (int) screenCoords[3], (int) screenCoords[4], (int) screenCoords[5]);

        // draw dots
        int size = 10;
        gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
        gc.fillOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.fillOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
        gc.fillOval((int) screenCoords[4] - size / 2, (int) screenCoords[5] - size / 2, size, size);
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
        gc.drawOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.drawOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
View Full Code Here

        // draw dots
        int size = 10;
        gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
        gc.fillOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.fillOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
        gc.fillOval((int) screenCoords[4] - size / 2, (int) screenCoords[5] - size / 2, size, size);
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
        gc.drawOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.drawOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
        gc.drawOval((int) screenCoords[4] - size / 2, (int) screenCoords[5] - size / 2, size, size);
View Full Code Here

        // draw dots
        int size = 10;
        gc.setBackground(display.getSystemColor(SWT.COLOR_RED));
        gc.fillOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.fillOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
        gc.fillOval((int) screenCoords[4] - size / 2, (int) screenCoords[5] - size / 2, size, size);
        gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK));
        gc.drawOval((int) screenCoords[0] - size / 2, (int) screenCoords[1] - size / 2, size, size);
        gc.drawOval((int) screenCoords[2] - size / 2, (int) screenCoords[3] - size / 2, size, size);
        gc.drawOval((int) screenCoords[4] - size / 2, (int) screenCoords[5] - size / 2, size, size);
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.