Class GraphicsUtil


  • public final class GraphicsUtil
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Logger LOGGER  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private GraphicsUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void cleanupPaint​(@NotNull Output output, @NotNull java.awt.Paint paint)  
      static @NotNull java.awt.Graphics2D createGraphics​(@NotNull java.awt.image.BufferedImage image)  
      static @NotNull java.awt.Composite deriveComposite​(@NotNull java.awt.Graphics2D g, float opacity)  
      private static @NotNull java.awt.Paint exchangePaint​(@NotNull Output output, @NotNull java.awt.Paint current, @NotNull java.awt.Paint paint, boolean doCleanUp)  
      static void preparePaint​(@NotNull java.awt.Paint paint)  
      static void safelyDrawImage​(@NotNull Output output, @NotNull java.awt.Graphics2D g, @NotNull java.awt.Image image, @Nullable java.awt.image.ImageObserver observer)  
      static void safelySetPaint​(@NotNull Output output, @NotNull java.awt.Graphics2D g, @NotNull java.awt.Paint paint)  
      static void safelySetPaint​(@NotNull Output output, @NotNull java.awt.Graphics2D g, @NotNull java.awt.Paint paint, boolean disposeOld)  
      • Methods inherited from class java.lang.Object

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

      • LOGGER

        private static final java.util.logging.Logger LOGGER
    • Constructor Detail

      • GraphicsUtil

        private GraphicsUtil()
    • Method Detail

      • safelySetPaint

        public static void safelySetPaint​(@NotNull
                                          @NotNull Output output,
                                          @NotNull
                                          @NotNull java.awt.Graphics2D g,
                                          @NotNull
                                          @NotNull java.awt.Paint paint)
      • safelySetPaint

        public static void safelySetPaint​(@NotNull
                                          @NotNull Output output,
                                          @NotNull
                                          @NotNull java.awt.Graphics2D g,
                                          @NotNull
                                          @NotNull java.awt.Paint paint,
                                          boolean disposeOld)
      • cleanupPaint

        public static void cleanupPaint​(@NotNull
                                        @NotNull Output output,
                                        @NotNull
                                        @NotNull java.awt.Paint paint)
      • preparePaint

        public static void preparePaint​(@NotNull
                                        @NotNull java.awt.Paint paint)
      • exchangePaint

        @NotNull
        private static @NotNull java.awt.Paint exchangePaint​(@NotNull
                                                             @NotNull Output output,
                                                             @NotNull
                                                             @NotNull java.awt.Paint current,
                                                             @NotNull
                                                             @NotNull java.awt.Paint paint,
                                                             boolean doCleanUp)
      • createGraphics

        @NotNull
        public static @NotNull java.awt.Graphics2D createGraphics​(@NotNull
                                                                  @NotNull java.awt.image.BufferedImage image)
      • deriveComposite

        @NotNull
        public static @NotNull java.awt.Composite deriveComposite​(@NotNull
                                                                  @NotNull java.awt.Graphics2D g,
                                                                  float opacity)
      • safelyDrawImage

        public static void safelyDrawImage​(@NotNull
                                           @NotNull Output output,
                                           @NotNull
                                           @NotNull java.awt.Graphics2D g,
                                           @NotNull
                                           @NotNull java.awt.Image image,
                                           @Nullable
                                           @Nullable java.awt.image.ImageObserver observer)