Class GraphicsUtils


  • public final class GraphicsUtils
    extends java.lang.Object
    Utility-Klasse für Grafikmanipulationen.
    Author:
    Frank Münster
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.image.BufferedImage convertToAWT​(org.eclipse.swt.graphics.ImageData data)
      Converts SWT ImageData into AWT BufferedImage Taken from Eclipse snippet 156.
      static org.eclipse.swt.graphics.ImageData convertToSWT​(java.awt.image.BufferedImage bufferedImage)
      Converts a BufferedImage to a SWT ImageData.
      static java.awt.image.BufferedImage resize​(java.awt.image.BufferedImage image, int width, int height)
      Verändert die Größe eines Images
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • resize

        public static java.awt.image.BufferedImage resize​(java.awt.image.BufferedImage image,
                                                          int width,
                                                          int height)
        Verändert die Größe eines Images
        Parameters:
        image - image das in der Größe verändert werden soll
        width - die neue Breite des Images
        height - die neue Höhe des Images
        Returns:
        das in der Größe angepasste Image
      • convertToSWT

        public static org.eclipse.swt.graphics.ImageData convertToSWT​(java.awt.image.BufferedImage bufferedImage)
        Converts a BufferedImage to a SWT ImageData. Taken from Eclipse snippet 156. For more information see: {@link "http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java"}
        Parameters:
        bufferedImage - the AWT BufferedImage
        Returns:
        the SWT ImageData
      • convertToAWT

        public static java.awt.image.BufferedImage convertToAWT​(org.eclipse.swt.graphics.ImageData data)
        Converts SWT ImageData into AWT BufferedImage Taken from Eclipse snippet 156. For more information see: {@link "http://git.eclipse.org/c/platform/eclipse.platform.swt.git/tree/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet156.java"}
        Parameters:
        data - SWT ImageData image to be transfered
        Returns:
        transfered AWT BurredImage image