Package org.eclipse.swt.graphics

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


         
          if ( x > 1 ){           
              int h1 = bounds.height - scale.getScaledValue(targetValue) - 2;
              int h2 = bounds.height - scale.getScaledValue(oldTargetValue) - 2;
              gcImage.setForeground( z <= 2 ? colors[z+1] : colors[3]);
              gcImage.drawLine(xDraw,h1,xDraw+1, h2);           
          }
         
          oldTargetValues[z] = all_values[z][position];
        }
       
View Full Code Here


        if(x > 6) {
          int h1 = bounds.height - scale.getScaledValue(average) - 2;
          int h2 = bounds.height - scale.getScaledValue(oldAverage) - 2;
          gcImage.setForeground(colors[COLOR_AVERAGE]);
          gcImage.setLineWidth(2);
          gcImage.drawLine(xDraw,h1,xDraw+1, h2);
        }
        oldAverage = average;
     
     
      if(nbValues > 0) {
View Full Code Here

      colors[2] = lightGrey2;
      colors[3] = lightGrey;
      GC gcBuffer = new GC(bufferBackground);
      for(int i = 0 ; i < bounds.height - 2 ; i++) {
        gcBuffer.setForeground(colors[i%4]);
        gcBuffer.drawLine(1,i+1,bounds.width-1,i+1);
      }      
      gcBuffer.setForeground(Colors.black);
      gcBuffer.drawLine(bounds.width-70,0,bounds.width-70,bounds.height-1);   
     
      gcBuffer.drawRectangle(0,0,bounds.width-1,bounds.height-1);
View Full Code Here

      for(int i = 0 ; i < bounds.height - 2 ; i++) {
        gcBuffer.setForeground(colors[i%4]);
        gcBuffer.drawLine(1,i+1,bounds.width-1,i+1);
      }      
      gcBuffer.setForeground(Colors.black);
      gcBuffer.drawLine(bounds.width-70,0,bounds.width-70,bounds.height-1);   
     
      gcBuffer.drawRectangle(0,0,bounds.width-1,bounds.height-1);
      gcBuffer.dispose();
    }
  }
View Full Code Here

        int  y1 = x_axis_left_y - (( y_axis_left_y - y_axis_right_y )*i/x_lines);
       
        int x2 = x_axis_right_x;
        int y2 = y1;
       
        image.drawLine( x1, y1, x2, y2 );
      }
     
      int  y_lines = 10;

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

        int  y1 = y_axis_left_y;
       
        int x2 = y_axis_right_x + (( x_axis_right_x - x_axis_left_x )*i/x_lines);
        int y2 = y_axis_right_y;
       
        image.drawLine( x1, y1, x2, y2 );
      }
     
      image.setClipping( old_clip );
     
      int  z_lines = 10;
View Full Code Here

      for (int i=1;i<z_lines;i++){

        int  z = z_axis_bottom_y + ( z_axis_top_y - z_axis_bottom_y )*i/z_lines;

        image.drawLine( z_axis_bottom_x, z, z_axis_bottom_x-4, z );
      }
     
        // now values
     
      for (int i=0;i<values.length;i++){
View Full Code Here

       
        draw_x += draw_y / ANGLE_TAN;
       
        image.setForeground( colours[(int)(((float)entry[2]/max_z)*(colours.length-1))]);
     
        image.drawLine(
            PAD_LEFT + draw_x,
            PAD_TOP + usable_height - draw_y,
            PAD_LEFT + draw_x,
            PAD_TOP + usable_height - ( draw_y + draw_z ));
      }
View Full Code Here

      int  font_height = image.getFontMetrics().getHeight();
      int char_width  = image.getFontMetrics().getAverageCharWidth();
     
        // x axis
     
      image.drawLine( x_axis_left_x, x_axis_left_y, x_axis_right_x, x_axis_right_y );
      image.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      image.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      String x_text = labels[0] + " - " + formatters[0].format( max_x );
     
View Full Code Here

      int char_width  = image.getFontMetrics().getAverageCharWidth();
     
        // x axis
     
      image.drawLine( x_axis_left_x, x_axis_left_y, x_axis_right_x, x_axis_right_y );
      image.drawLine( usable_width, x_axis_right_y - 4, x_axis_right_x, x_axis_right_y );
      image.drawLine( usable_width, x_axis_right_y + 4, x_axis_right_x, x_axis_right_y );

      String x_text = labels[0] + " - " + formatters[0].format( max_x );
     
      image.drawText(
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.