Package org.eclipse.swt.graphics

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


      result = new Image(Display.getCurrent(), bib.width, bib.height);
      //
      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


      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

          }

        int x0 = (size - width) / 2;
        int y0 = (size - height) / 2;

        gc.drawImage(new Image(device, iconData), x0, y0);

        gc.dispose();
        }

      }
View Full Code Here

          }

        int x0 = (size - width) / 2;
        int y0 = (size - height) / 2;

        gc.drawImage(new Image(device, iconData), x0, y0);

        gc.dispose();
        }

      }
View Full Code Here

   * .events.PaintEvent)
   */
  public void paintControl(PaintEvent pe) {
    GC gc = pe.gc;
    if (buffer != null) {
      gc.drawImage(buffer, 0, 0);
    }
  }

  /*
   * (non-Javadoc)
 
View Full Code Here

    }    
    Image img = image;
    if(img != null){
      Rectangle imageRect = img.getBounds();
      if(type == 0){
        gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
            x+1, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else if(type == 1){
          gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
              x+3, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else
View Full Code Here

      Rectangle imageRect = img.getBounds();
      if(type == 0){
        gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
            x+1, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else if(type == 1){
          gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
              x+3, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else
        gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
            x+3, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      x +=  imageRect.width + 5;
View Full Code Here

            x+1, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else if(type == 1){
          gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
              x+3, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      }else
        gc.drawImage(img, 0, 0, imageRect.width, imageRect.height,
            x+3, (rect.height-imageRect.height)/2-16, imageRect.width, imageRect.height);
      x +=  imageRect.width + 5;
      extent.x -= imageRect.width + 5;
    }
  }
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.