Package org.eclipse.swt.graphics

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


          gcImage.drawLine(0, 0, newWidth - 1, 0);
          gcImage.drawLine(0, newHeight - 1, newWidth - 1, newHeight - 1);
        }
      } else if (borderVerticalSize > 0) {
        gcImage.drawLine(0, 0, 0, newHeight - 1);
        gcImage.drawLine(newWidth - 1, 0, newWidth - 1, newHeight - 1);
      }

      if (borderSplit > 0) {
        gcImage.setForeground(Colors.white);
        gcImage.drawLine(x0, completionHeight + borderHorizontalSize, x1,
View Full Code Here


        gcImage.drawLine(newWidth - 1, 0, newWidth - 1, newHeight - 1);
      }

      if (borderSplit > 0) {
        gcImage.setForeground(Colors.white);
        gcImage.drawLine(x0, completionHeight + borderHorizontalSize, x1,
            completionHeight + borderHorizontalSize);
      }
    } else {
      gcImage = new GC(image);
    }
View Full Code Here

        if (!bImageBufferValid || imageBuffer[i] != index) {
          imageBuffer[i] = index;
          bImageChanged = true;
          gcImage.setForeground(index == INDEX_COLOR_NONEAVAIL ? Colors.red
              : Colors.blues[index]);
          gcImage.drawLine(i + x0, y0, i + x0, y1);
        }
      }

      // pieces can sometimes be 0 due to timing or bad torrent (well, there's a bug with a /0 error
      // so it can happen somehow :)
View Full Code Here

      int x_axis_right_x = PAD_LEFT + usable_width;
      int x_axis_right_y = x_axis_left_y;


      gc.drawLine( x_axis_left_x, x_axis_left_y, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      for (int i=1;i<10;i++){
       
View Full Code Here

      int x_axis_right_x = PAD_LEFT + usable_width;
      int x_axis_right_y = x_axis_left_y;


      gc.drawLine( x_axis_left_x, x_axis_left_y, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      for (int i=1;i<10;i++){
       
        int  x = x_axis_left_x + ( x_axis_right_x - x_axis_left_x )*i/10;
 
View Full Code Here

      int x_axis_right_y = x_axis_left_y;


      gc.drawLine( x_axis_left_x, x_axis_left_y, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      gc.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      for (int i=1;i<10;i++){
       
        int  x = x_axis_left_x + ( x_axis_right_x - x_axis_left_x )*i/10;
       
View Full Code Here

      for (int i=1;i<10;i++){
       
        int  x = x_axis_left_x + ( x_axis_right_x - x_axis_left_x )*i/10;
       
        gc.drawLine( x, x_axis_left_y, x, x_axis_left_y+4 );
      }
     
      SpeedManagerLimitEstimate le = mapper.getEstimatedUploadLimit( false );
     
      if ( le != null ){
View Full Code Here

            int[]  seg = segs[i];
           
            int  next_x   = (int)((seg[1] + (seg[2]-seg[1])/2)*pos_ratio) + 1;
            int  next_y  = (int)((seg[0])*metric_ratio) + 1;
           
            gc.drawLine(
                x_axis_left_x + prev_x,
                x_axis_left_y - prev_y,
                x_axis_left_x + next_x,
                x_axis_left_y - next_y );
                           
View Full Code Here

         
          int speed = bad_up[i].getBytesPerSec();
         
          int  x = max_x == 0?0:(speed * usable_width / max_x);
       
          gc.drawLine(
              x_axis_left_x + x,
              x_axis_left_y - 0,
              x_axis_left_x + x,
              x_axis_left_y - 10 );

View Full Code Here

      int y_axis_bottom_y = usable_height + PAD_TOP;

      int y_axis_top_x   = PAD_LEFT;
      int y_axis_top_y   = PAD_TOP;

      gc.drawLine( y_axis_bottom_x, y_axis_bottom_y, y_axis_top_x, y_axis_top_y );

      gc.drawLine( y_axis_top_x-4, y_axis_top_y+PAD_TOP,  y_axis_top_x, y_axis_top_y );
      gc.drawLine( y_axis_top_x+4, y_axis_top_y+PAD_TOP,  y_axis_top_x, y_axis_top_y );

      for (int i=1;i<10;i++){
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.