Package org.eclipse.swt.graphics

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


        x = 0;
      clipping.x += x;
*/
      int x = 0;
      gc.setClipping(clipping);
      gc.drawImage(image, x, 0);
    }
    gc.dispose();
  }

  /** Don't forget to call super.dispose()! */
 
View Full Code Here


        gc.fillRectangle(rect);
        int xPos = 0;
        while (xPos < rect.width) {
          int yPos = 0;
          while (yPos < rect.height) {
            gc.drawImage(backgroundImage, xPos, yPos);
            yPos += imageRect.height;
          }
          xPos += imageRect.width;
        }
      } else if (gradientColors != null) {
View Full Code Here

    }

    // draw the image
    if (img != null) {
      Rectangle imageRect = img.getBounds();
      gc.drawImage(img, 0, 0, imageRect.width, imageRect.height, x, (rect.height - imageRect.height) / 2, imageRect.width, imageRect.height);
      x += imageRect.width + GAP;
      extent.x -= imageRect.width + GAP;
    }
    // draw the text
    if (lines != null) {
View Full Code Here

        gc.fillRectangle(rect);
        int xPos = 0;
        while (xPos < rect.width) {
          int yPos = 0;
          while (yPos < rect.height) {
            gc.drawImage(backgroundImage, xPos, yPos);
            yPos += imageRect.height;
          }
          xPos += imageRect.width;
        }
      } else if (gradientColors != null) {
View Full Code Here

    }

    // draw the image
    if (img != null) {
      Rectangle imageRect = img.getBounds();
      gc.drawImage(img, 0, 0, imageRect.width, imageRect.height, x, (rect.height - imageRect.height) / 2, imageRect.width, imageRect.height);
      x += imageRect.width + GAP;
      extent.x -= imageRect.width + GAP;
    }
    // draw the text
    if (lines != null) {
View Full Code Here

        gc.fillRectangle(rect);
        int xPos = 0;
        while (xPos < rect.width) {
          int yPos = 0;
          while (yPos < rect.height) {
            gc.drawImage(backgroundImage, xPos, yPos);
            yPos += imageRect.height;
          }
          xPos += imageRect.width;
        }
      } else if (gradientColors != null) {
View Full Code Here

    }

    // draw the image
    if (img != null) {
      Rectangle imageRect = img.getBounds();
      gc.drawImage(img, 0, 0, imageRect.width, imageRect.height, x, (rect.height - imageRect.height) / 2, imageRect.width, imageRect.height);
      x += imageRect.width + GAP;
      extent.x -= imageRect.width + GAP;
    }
    // draw the text
    if (lines != null) {
View Full Code Here

        Color black = new Color(gc.getDevice(), 0, 0, 0);
        gc.setBackground(black);
        gc.fillRectangle(gc.getClipping());
        black.dispose();       
        Image image = new FastBackgroundRenderer(DEM, shading, mapInstance, colors, device).render();       
        gc.drawImage(image, 0, 0);
       
       
        gc.setForeground(new Color(gc.getDevice(), 255, 0, 0));
        for(int x = 0; x < mapInstance.width; x++) {
            for (int y = 0; y < mapInstance.height; y++) {
View Full Code Here

    private Image resizeImage(Image oldImage, int newWidth, int newHeight) {
      Image newImage = new Image(Display.getDefault(), newWidth, newHeight);
      GC gc = new GC(newImage);
      gc.setAntialias(SWT.ON);
      gc.setInterpolation(SWT.HIGH);
      gc.drawImage(oldImage, 0, 0, oldImage.getBounds().width, oldImage.getBounds().height, 0, 0, newWidth,
          newHeight);
      gc.dispose();
      oldImage.dispose();
      return newImage;
    }
View Full Code Here

            final Rectangle dib = decorator.getBounds();
            //
            result = new Image(Display.getCurrent(), bib.width, bib.height);
            //
            final GC gc = new GC(result);
            gc.drawImage(baseImage, 0, 0);
            if (corner == TOP_LEFT) {
                gc.drawImage(decorator, 0, 0);
            } else if (corner == TOP_RIGHT) {
                gc.drawImage(decorator, bib.width - dib.width, 0);
            } else if (corner == BOTTOM_LEFT) {
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.