Package org.eclipse.swt.graphics

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


    py += 4;
    polyline2 = new int [] {
        px,py-1, px,py, px+1,py, px+1,py+1, px+2,py+1, px+2,py+2, px+3,py+2, px+3,py+3,
        px+3,py+2, px+4,py+2, px+4,py+1,  px+5,py+1, px+5,py, px+6,py, px+6,py-1};
    gc.setForeground(new Color(getDisplay(), 0, 64, 64));
    gc.drawPolyline(polyline1);
    gc.drawPolyline(polyline2);
   
    if(areaMenu){
      gc.setForeground(lastColor);
      gc.drawRoundRectangle(rect.width - 35, 4, 25, rect.height - 9, 6, 6);
View Full Code Here


    polyline2 = new int [] {
        px,py-1, px,py, px+1,py, px+1,py+1, px+2,py+1, px+2,py+2, px+3,py+2, px+3,py+3,
        px+3,py+2, px+4,py+2, px+4,py+1,  px+5,py+1, px+5,py, px+6,py, px+6,py-1};
    gc.setForeground(new Color(getDisplay(), 0, 64, 64));
    gc.drawPolyline(polyline1);
    gc.drawPolyline(polyline2);
   
    if(areaMenu){
      gc.setForeground(lastColor);
      gc.drawRoundRectangle(rect.width - 35, 4, 25, rect.height - 9, 6, 6);
    }
View Full Code Here

      }
     
      //draw 1 pixel border
      if (borderLeft > 0) {
        gc.setForeground(borderColor);
        gc.drawPolyline(shape);
      }
      return;
    }
   
    int x = Math.max(0, borderLeft - 1);
View Full Code Here

    // Draw border line
    if (borderLeft > 0) {
      RGB outside = getParent().getBackground().getRGB();
      antialias(shape, borderColor.getRGB(), null, outside, gc);
      gc.setForeground(borderColor);
      gc.drawPolyline(shape);
   
  }
  /**
   * Returns <code>true</code> if the receiver's border is visible.
   *
 
View Full Code Here

      private void drawErnie( GC gc ) {
        int oldLineWidth = currentLineWidth;
        gc.setLineWidth( 8 );
        gc.fillPolygon( transform( getHair( ERNIE ) ) );
        gc.drawPolyline( transform( getNeck( ERNIE ) ) );
        gc.fillPolygon( transform( getRightEye( ERNIE ) ) );
        gc.fillPolygon( transform( getLeftEye( ERNIE ) ) );
        gc.drawPolyline( transform( getMouth( ERNIE ) ) );
        drawDots( gc, ERNIE );
        gc.setLineWidth( oldLineWidth );
View Full Code Here

        gc.setLineWidth( 8 );
        gc.fillPolygon( transform( getHair( ERNIE ) ) );
        gc.drawPolyline( transform( getNeck( ERNIE ) ) );
        gc.fillPolygon( transform( getRightEye( ERNIE ) ) );
        gc.fillPolygon( transform( getLeftEye( ERNIE ) ) );
        gc.drawPolyline( transform( getMouth( ERNIE ) ) );
        drawDots( gc, ERNIE );
        gc.setLineWidth( oldLineWidth );
      }

      private int[] getLeftEye( List<int[]> dotInfos ) {
View Full Code Here

          marginHeight + 2, 1, gradientheight - 2, true);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0) {
      // New in 3.3 - edge treatmant
      gc.setForeground(getBackground());
      gc.drawPolyline(new int[] { marginWidth + 1,
          marginHeight + gradientheight - 1, marginWidth + 1,
          marginHeight + 2, marginWidth + 2, marginHeight + 2,
          marginWidth + 2, marginHeight + 1,
          bounds.width - marginWidth - 3, marginHeight + 1,
          bounds.width - marginWidth - 3, marginHeight + 2,
View Full Code Here

          marginHeight + 2, 1, gradientheight - 2, true);
    }
    if ((getExpansionStyle() & TITLE_BAR) != 0) {
      // New in 3.3 - edge treatmant
      gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WHITE));
      gc.drawPolyline(new int[] { marginWidth + 1,
          marginHeight + gradientheight - 1, marginWidth + 1,
          marginHeight + 2, marginWidth + 2, marginHeight + 2,
          marginWidth + 2, marginHeight + 1,
          bounds.width - marginWidth - 3, marginHeight + 1,
          bounds.width - marginWidth - 3, marginHeight + 2,
View Full Code Here

      @Override
      public void handleEvent(Event event) {
        GC gc = event.gc;

        gc.setLineAttributes(new LineAttributes(10, SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_SOLID, null, 0, 10));
        gc.drawPolyline(new int[] { 50, 100, 50, 20, 60, 30, 50, 45 });

        gc.setLineAttributes(new LineAttributes(1 / 2f, SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_DOT, null, 0, 10));
        gc.drawPolyline(new int[] { 100, 100, 100, 20, 110, 30, 100, 45 });
      }
    });
View Full Code Here

        gc.setLineAttributes(new LineAttributes(10, SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_SOLID, null, 0, 10));
        gc.drawPolyline(new int[] { 50, 100, 50, 20, 60, 30, 50, 45 });

        gc.setLineAttributes(new LineAttributes(1 / 2f, SWT.CAP_FLAT, SWT.JOIN_MITER, SWT.LINE_DOT, null, 0, 10));
        gc.drawPolyline(new int[] { 100, 100, 100, 20, 110, 30, 100, 45 });
      }
    });

    shell.setSize(150, 150);
    shell.open();
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.