Package org.eclipse.swt.graphics

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


//        Font fontPhotoLegend = new Font(null, "Arial", 12, SWT.BOLD);
//        gc.setFont(fontPhotoLegend);
//        gc.drawText("Seja",  categoryButtonsComposite.getBounds().width - 90,categoryButtonsComposite.getBounds().height - 80,SWT.DRAW_TRANSPARENT);
//        gc.drawText("bem-vindo",categoryButtonsComposite.getBounds().width - 90,categoryButtonsComposite.getBounds().height - 60,SWT.DRAW_TRANSPARENT);

        gc.drawImage(backgroundImage,0,0,backgroundImage.getBounds().width,backgroundImage.getBounds().height, categoryButtonsComposite.getClientArea().x, categoryButtonsComposite.getClientArea().y, categoryButtonsComposite.getClientArea().width, categoryButtonsComposite.getClientArea().height);
        gc.drawImage(logoWelcomeImage,0,0,logoWelcomeImage.getBounds().width,logoWelcomeImage.getBounds().height, categoryButtonsComposite.getClientArea().width/2-80, categoryButtonsComposite.getClientArea().height-200, logoWelcomeImage.getBounds().width,logoWelcomeImage.getBounds().height);

        // if (personPhoto == null){
        // if(photoExists(personId)) {
        // personPhoto.fillPhotoFromPerson(personId, false);
View Full Code Here


//        gc.setFont(fontPhotoLegend);
//        gc.drawText("Seja",  categoryButtonsComposite.getBounds().width - 90,categoryButtonsComposite.getBounds().height - 80,SWT.DRAW_TRANSPARENT);
//        gc.drawText("bem-vindo",categoryButtonsComposite.getBounds().width - 90,categoryButtonsComposite.getBounds().height - 60,SWT.DRAW_TRANSPARENT);

        gc.drawImage(backgroundImage,0,0,backgroundImage.getBounds().width,backgroundImage.getBounds().height, categoryButtonsComposite.getClientArea().x, categoryButtonsComposite.getClientArea().y, categoryButtonsComposite.getClientArea().width, categoryButtonsComposite.getClientArea().height);
        gc.drawImage(logoWelcomeImage,0,0,logoWelcomeImage.getBounds().width,logoWelcomeImage.getBounds().height, categoryButtonsComposite.getClientArea().width/2-80, categoryButtonsComposite.getClientArea().height-200, logoWelcomeImage.getBounds().width,logoWelcomeImage.getBounds().height);

        // if (personPhoto == null){
        // if(photoExists(personId)) {
        // personPhoto.fillPhotoFromPerson(personId, false);
        // }
View Full Code Here

    data.transparentPixel = -1;
    final Image image = new Image(categoryButtonsComposite.getDisplay(),
        data);

    GC gc = new GC(photoCanvas);
    gc.drawImage(image, 0, 0, image.getBounds().width,
        image.getBounds().height, 0, 0, 130, 130);
    photoCanvas.addListener(SWT.Paint, new Listener() {
      public void handleEvent(Event arg0) {
        GC gc = new GC(photoCanvas);
        gc.drawImage(image, 0, 0, image.getBounds().width, image
View Full Code Here

    gc.drawImage(image, 0, 0, image.getBounds().width,
        image.getBounds().height, 0, 0, 130, 130);
    photoCanvas.addListener(SWT.Paint, new Listener() {
      public void handleEvent(Event arg0) {
        GC gc = new GC(photoCanvas);
        gc.drawImage(image, 0, 0, image.getBounds().width, image
            .getBounds().height, 0, 0, 130, 130);
        gc.dispose();
      }
    });
    gc.dispose();
View Full Code Here

                if (screenMessageLabel.getText().equals("")) {
          gc.drawText(messageDefault, 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null, "img/exclamation.png"), 9, 9);
                }
                gc.dispose();
            }
        });
View Full Code Here

                gc.drawLine(0, 30, mainPanel.getClientArea().width, 30);
                gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText(DEFAULT_MESSAGE, 30, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
View Full Code Here

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText(DEFAULT_MESSAGE, 30, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
            }
        });
View Full Code Here

    }

    private void drawPhoto(Image imageToLoad) {
      final Image image = new Image(getDisplay(), imageToLoad.getImageData());
        GC gc = new GC(photoCanvas);
        gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height, 0, 0, 362, 198);
        gc.drawRectangle(0,0,photoCanvas.getBounds().width-1,photoCanvas.getBounds().height-1);
        photoCanvas.addListener(SWT.Paint, new Listener(){
            public void handleEvent(Event arg0) {
                GC gc = new GC(photoCanvas);
                gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height,0,0,362,198);
View Full Code Here

        gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height, 0, 0, 362, 198);
        gc.drawRectangle(0,0,photoCanvas.getBounds().width-1,photoCanvas.getBounds().height-1);
        photoCanvas.addListener(SWT.Paint, new Listener(){
            public void handleEvent(Event arg0) {
                GC gc = new GC(photoCanvas);
                gc.drawImage(image,0,0,image.getBounds().width,image.getBounds().height,0,0,362,198);
                gc.drawRectangle(0,0,photoCanvas.getBounds().width-1,photoCanvas.getBounds().height-1);     
                gc.dispose();
            }
        });
        gc.dispose();
View Full Code Here

                if (screenMessageLabel.getText().equals("")) {
                    gc.drawText("", 10, 10, SWT.DRAW_TRANSPARENT);
                } else {
                    gc.drawText(screenMessageLabel.getText(), 32, 10, SWT.DRAW_TRANSPARENT);
                    gc.drawImage(new Image(null,"img/exclamation.png"),9,9);
                }
                gc.dispose();
            }
        });
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.