Package org.eclipse.swt.graphics

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


            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) {
                gc.drawImage(decorator, 0, bib.height - dib.height);
            } else if (corner == BOTTOM_RIGHT) {
View Full Code Here


            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) {
                gc.drawImage(decorator, 0, bib.height - dib.height);
            } else if (corner == BOTTOM_RIGHT) {
                gc.drawImage(decorator, bib.width - dib.width, bib.height - dib.height);
            }
View Full Code Here

            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) {
                gc.drawImage(decorator, 0, bib.height - dib.height);
            } else if (corner == BOTTOM_RIGHT) {
                gc.drawImage(decorator, bib.width - dib.width, bib.height - dib.height);
            }
            gc.dispose();
            //
View Full Code Here

            } else if (corner == TOP_RIGHT) {
                gc.drawImage(decorator, bib.width - dib.width, 0);
            } else if (corner == BOTTOM_LEFT) {
                gc.drawImage(decorator, 0, bib.height - dib.height);
            } else if (corner == BOTTOM_RIGHT) {
                gc.drawImage(decorator, bib.width - dib.width, bib.height - dib.height);
            }
            gc.dispose();
            //
            decoratedMap.put(decorator, result);
        }
View Full Code Here

                screenImage.dispose();
            }
            screenImage = new Image(getDisplay(), clientRect.width, clientRect.height);
            final GC newGC = new GC(screenImage);
            newGC.setClipping(clientRect);
            newGC.drawImage(sourceImage, imageRect.x, imageRect.y, imageRect.width,
                    imageRect.height, destRect.x, destRect.y, destRect.width,
                    destRect.height);
            newGC.dispose();

            gc.drawImage(screenImage, 0, 0);
View Full Code Here

        // center the image in the given space
        int x = imageBounds.x
            + Math.max(0, (imageBounds.width - bounds.width) / 2);
        int y = imageBounds.y
            + Math.max(0, (imageBounds.height - bounds.height) / 2);
        gc.drawImage(image, x, y);
      }
    }

    Rectangle textBounds = cell.getTextBounds();
    if (textBounds != null) {
View Full Code Here

    int srcWidth = data.width / collectionDimensions.x;
    int srcHeight = data.height / collectionDimensions.y;
    Image img = new Image(Display.getDefault(), srcWidth, srcHeight);
    GC gc = new GC(img);
    // Draw the image
    gc.drawImage(collectionImg, srcX, srcY, srcWidth, srcHeight, 0, 0, img.getImageData().width,
        img.getImageData().height);
    Image mask = new Image(Display.getDefault(), img.getBounds());
    img = new Image(Display.getDefault(), img.getImageData(), mask.getImageData());
   
    gc.dispose();
View Full Code Here

    ImageData underlay = src = overlay.length > UNDERLAY ? overlay[UNDERLAY]
        : null;
    if (src != null) {
      maskDepth = Math.max(maskDepth, getTransparencyDepth(src));
      Image img = new Image(device, src);
      gc.drawImage(img, 0, 0);
      img.dispose();
    }
    src = base;
    if (base != null) {
      maskDepth = Math.max(maskDepth,
View Full Code Here

    src = base;
    if (base != null) {
      maskDepth = Math.max(maskDepth,
          baseMaskDepth = getTransparencyDepth(src));
      Image img = new Image(device, src);
      gc.drawImage(img, 0, 0);
      img.dispose();
    }
    ImageData topLeft = src = overlay[TOP_LEFT];
    if (src != null) {
      maskDepth = Math.max(maskDepth, getTransparencyDepth(src));
View Full Code Here

    }
    ImageData topLeft = src = overlay[TOP_LEFT];
    if (src != null) {
      maskDepth = Math.max(maskDepth, getTransparencyDepth(src));
      Image img = new Image(device, src);
      gc.drawImage(img, 0, 0);
      img.dispose();
    }
    ImageData topRight = src = overlay[TOP_RIGHT];
    if (src != null) {
      maskDepth = Math.max(maskDepth, getTransparencyDepth(src));
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.