Class SwingUniversalImage

    • Constructor Detail

      • SwingUniversalImage

        public SwingUniversalImage()
    • Method Detail

      • isBitmap

        public abstract boolean isBitmap()
      • renderSimple

        protected abstract void renderSimple​(BufferedImage area)
        Just scale for area's size.
      • render

        protected abstract void render​(Graphics2D gc,
                                       int centerX,
                                       int centerY,
                                       int width,
                                       int height,
                                       double angleRadians)
        Render with scale, at specified position, with possible rotation.
      • getAsBitmapForSize

        public BufferedImage getAsBitmapForSize​(int width,
                                                int height)
        Get scaled image.
      • getAsBitmapForSize

        public BufferedImage getAsBitmapForSize​(int width,
                                                int height,
                                                double angleRadians)
        Draw rotated image on double canvas size. It required against lost corners on rotate.
      • drawToGraphics

        public void drawToGraphics​(Graphics2D gc,
                                   int locationX,
                                   int locationY,
                                   int width,
                                   int height)
      • drawToGraphics

        public void drawToGraphics​(Graphics2D gc,
                                   int centerX,
                                   int centerY,
                                   int width,
                                   int height,
                                   double angleRadians)
      • createBitmap

        public static BufferedImage createBitmap​(int width,
                                                 int height)
        Create bitmap with specified size and full colorspace.
      • createDoubleBitmap

        public static BufferedImage createDoubleBitmap​(int width,
                                                       int height)
        Create bitmap with double of specified size and full colorspace. Used for rotated images.
      • createGraphics

        public static Graphics2D createGraphics​(BufferedImage area)
        Create Graphics2D for specified bitmap with rendering hints.