Package org.eclipse.swt.graphics

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


    int height= imageData.height / 3;
    // gap between two bars of one third of the height
    // draw boxes using lines as drawing a line of a certain width produces
    // rounded corners.
    for (int i= 0; i < width ; i++) {
      gc.drawLine(i, 0, i, height - 1);
      gc.drawLine(i, imageData.height - height, i, imageData.height - 1);
    }

    gc.dispose();
View Full Code Here


    // gap between two bars of one third of the height
    // draw boxes using lines as drawing a line of a certain width produces
    // rounded corners.
    for (int i= 0; i < width ; i++) {
      gc.drawLine(i, 0, i, height - 1);
      gc.drawLine(i, imageData.height - height, i, imageData.height - 1);
    }

    gc.dispose();

    return bracketImage;
View Full Code Here

    int y= minLocation.y + text.getLineHeight() - 1;
   
    GC gc= event.gc;
    if (color != null && !color.isDisposed())
    gc.setForeground(color);
    gc.drawLine(x1, y, x2, y);
  }
 
  private boolean includes(IRegion region, IRegion position) {
    return
      position.getOffset() >= region.getOffset() &&
View Full Code Here

    // Geschlecht zeichnen.
    if (sex.equals(Person.MALE)) {
      gc.setBackground(SwtConsts.COLOR_BLUE);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 3 * size / 20, y + 9 * size / 20, 9 * size / 20, 9 * size / 20);
      gc.drawLine(x + 10 * size / 20, y + 10 * size / 20, x + 16 * size / 20, y + 1 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 12 * size / 20, y + 3 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 16 * size / 20, y + 6 * size / 20);
      // gc.drawRectangle(x, y, 19 * size / 20, 19 * size / 20);
    }
    else if (sex.equals(Person.FEMALE)) {
View Full Code Here

    if (sex.equals(Person.MALE)) {
      gc.setBackground(SwtConsts.COLOR_BLUE);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 3 * size / 20, y + 9 * size / 20, 9 * size / 20, 9 * size / 20);
      gc.drawLine(x + 10 * size / 20, y + 10 * size / 20, x + 16 * size / 20, y + 1 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 12 * size / 20, y + 3 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 16 * size / 20, y + 6 * size / 20);
      // gc.drawRectangle(x, y, 19 * size / 20, 19 * size / 20);
    }
    else if (sex.equals(Person.FEMALE)) {
      gc.setBackground(SwtConsts.COLOR_RED);
View Full Code Here

      gc.setBackground(SwtConsts.COLOR_BLUE);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 3 * size / 20, y + 9 * size / 20, 9 * size / 20, 9 * size / 20);
      gc.drawLine(x + 10 * size / 20, y + 10 * size / 20, x + 16 * size / 20, y + 1 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 12 * size / 20, y + 3 * size / 20);
      gc.drawLine(x + 16 * size / 20, y + 1 * size / 20, x + 16 * size / 20, y + 6 * size / 20);
      // gc.drawRectangle(x, y, 19 * size / 20, 19 * size / 20);
    }
    else if (sex.equals(Person.FEMALE)) {
      gc.setBackground(SwtConsts.COLOR_RED);
      gc.fillRectangle(0, 0, psize.x, psize.y);
View Full Code Here

    }
    else if (sex.equals(Person.FEMALE)) {
      gc.setBackground(SwtConsts.COLOR_RED);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 5 * size / 20, y + 1 * size / 20, 9 * size / 20, 9 * size / 20);
      gc.drawLine(x + 9 * size / 20, y + 10 * size / 20, x + 9 * size / 20, y + 18 * size / 20);
      gc.drawLine(x + 6 * size / 20, y + 14 * size / 20, x + 12 * size / 20, y + 14 * size / 20);
    }
    else if (sex.equals(Person.NO_SEX)) {
      gc.setBackground(SwtConsts.COLOR_DARK_GRAY);
      gc.fillRectangle(0, 0, psize.x, psize.y);
View Full Code Here

    else if (sex.equals(Person.FEMALE)) {
      gc.setBackground(SwtConsts.COLOR_RED);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 5 * size / 20, y + 1 * size / 20, 9 * size / 20, 9 * size / 20);
      gc.drawLine(x + 9 * size / 20, y + 10 * size / 20, x + 9 * size / 20, y + 18 * size / 20);
      gc.drawLine(x + 6 * size / 20, y + 14 * size / 20, x + 12 * size / 20, y + 14 * size / 20);
    }
    else if (sex.equals(Person.NO_SEX)) {
      gc.setBackground(SwtConsts.COLOR_DARK_GRAY);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 5 * size / 20, y + 5 * size / 20, 9 * size / 20, 9 * size / 20);
View Full Code Here

    }
    else if (sex.equals(Person.BOTH)) {
      gc.setBackground(SwtConsts.COLOR_MAGENTA);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 5 * size / 20, y + 6 * size / 20, 7 * size / 20, 7 * size / 20);
      gc.drawLine(x + 11 * size / 20, y + 7 * size / 20, x + 15 * size / 20, y + 1 * size / 20); // M
      gc.drawLine(x + 15 * size / 20, y + 1 * size / 20, x + 11 * size / 20, y + 2 * size / 20);
      gc.drawLine(x + 15 * size / 20, y + 1 * size / 20, x + 15 * size / 20, y + 5 * size / 20);
      gc.drawLine(x + 8 * size / 20, y + 13 * size / 20, x + 8 * size / 20, y + 18 * size / 20); // W
      gc.drawLine(x + 6 * size / 20, y + 15 * size / 20, x + 10 * size / 20, y + 15 * size / 20);
    }
View Full Code Here

    else if (sex.equals(Person.BOTH)) {
      gc.setBackground(SwtConsts.COLOR_MAGENTA);
      gc.fillRectangle(0, 0, psize.x, psize.y);
      gc.drawOval(x + 5 * size / 20, y + 6 * size / 20, 7 * size / 20, 7 * size / 20);
      gc.drawLine(x + 11 * size / 20, y + 7 * size / 20, x + 15 * size / 20, y + 1 * size / 20); // M
      gc.drawLine(x + 15 * size / 20, y + 1 * size / 20, x + 11 * size / 20, y + 2 * size / 20);
      gc.drawLine(x + 15 * size / 20, y + 1 * size / 20, x + 15 * size / 20, y + 5 * size / 20);
      gc.drawLine(x + 8 * size / 20, y + 13 * size / 20, x + 8 * size / 20, y + 18 * size / 20); // W
      gc.drawLine(x + 6 * size / 20, y + 15 * size / 20, x + 10 * size / 20, y + 15 * size / 20);
    }

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.