Package org.eclipse.swt.graphics

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


    gcBuffer.setBackground(Colors.blues[Colors.BLUES_MIDDARK]);
    PieUtils.drawPie(gcBuffer,x0 - OWN_SIZE / 2 ,y0 - OWN_SIZE / 2,OWN_SIZE,OWN_SIZE,manager.getStats().getCompleted() / 10);
   
    gcBuffer.dispose();
    GC gcPanel = new GC(panel);
    gcPanel.drawImage(buffer,0,0);
    gcPanel.dispose();
    buffer.dispose();  
  }
 
  public void peerManagerWillBeAdded( PEPeerManager  peer_manager ){}
View Full Code Here


     
      int wInside = bounds.width - (marginWidth * 2);
      int hInside = bounds.height - (marginHeight * 2);
      Image imageCellBG = new Image(Display.getDefault(), wInside, hInside);
      GC gc = new GC(imageCellBG);
      gc.drawImage(imageRowBG, bounds.x + marginWidth, 0 + marginHeight,
          wInside, hInside, 0, 0, wInside, hInside);
      gc.dispose();
     
      return imageCellBG;
    }
View Full Code Here

     
      bufferScale = new Image(drawCanvas.getDisplay(),bounds);
     
      GC gcBuffer = new GC(bufferScale);
      try {
      gcBuffer.drawImage(bufferBackground,0,0);
      gcBuffer.setForeground(Colors.black);
      //gcImage.setBackground(null);
      scale.setNbPixels(bounds.height - 16);
      int[] levels = scale.getScaleValues();
      for(int i = 0 ; i < levels.length ; i++) {
View Full Code Here

    if(internalLoop == 0 || sizeChanged) {
      drawChart(sizeChanged);
    }
   
    GC gc = new GC(drawCanvas);
    gc.drawImage(bufferImage,bounds.x,bounds.y);
    gc.dispose();   
  }
 
  protected void drawChart(boolean sizeChanged) {
   try{
View Full Code Here

     
      bufferImage = new Image(drawCanvas.getDisplay(),bounds);
     
      GC gcImage = new GC(bufferImage);
     
      gcImage.drawImage(bufferScale,0,0);
     
      int oldAverage = 0;  
      int[] oldTargetValues = new int[all_values.length];
      int[] maxs = new int[all_values.length];
      for(int x = 0 ; x < bounds.width - 71 ; x++) {
View Full Code Here

      drawPlot();
    }

    GC gc = new GC(canvas);
   
    gc.drawImage(bufferImage,bounds.x,bounds.y);
   
    gc.dispose();  
  }
 
 
View Full Code Here

      if ( buffer_image != null ){
       
        GC gc = new GC( canvas );
 
        gc.drawImage( buffer_image, bounds.x, bounds.y );
 
        gc.dispose();  
      }
    }
   
View Full Code Here

        GC gc = arg0.gc;
        gc.setForeground (GRADIENT_COLOR_2);
        gc.setBackground (GRADIENT_COLOR_1);
        gc.fillGradientRectangle (rect.x, rect.y, rect.width, rect.height, false);
        Image image = SWTImageRepository.getImage(logo_image);
        gc.drawImage(image, rect.width - image.getImageData().width - 10, 5);
       
        gc.setForeground(new Color(SWTThread.getDisplay(),0,0,0));
        Font font = new Font(display,"Arial",14,SWT.NONE );
        gc.setFont(font);
        gc.drawText(JMConstants.JMULE_NAME, 20, TOP_GRADIENT_HEIGHT / 2 - 15,true);
View Full Code Here

        cBlockView.setSize(bounds.width, bounds.height);
        GC gc = new GC(cBlockView);
        if (gc == null) {
          return;
        }
        gc.drawImage(image, 0, 0, imageBounds.width, imageBounds.height,
                     0, 0, bounds.width, bounds.height);
        gc.dispose();
/*
        // _OR_ enable refresh() for slower visual update with lots of flicker
        //refresh();
View Full Code Here

    if (gc == null) {
      return;
    }
    if (orientation == SWT.FILL) {
      gc.setClipping(clipping);
      gc.drawImage(image, 0, 0);
    } else {
/*
      // Grab a pixel beside the cell and draw that as our background
      // Advantage: paints correct color when hilighted and not in focus
      // Disadvatage: doesn't always work!
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.