Class GraphicsConfigurationWithTransparency

    • Constructor Detail

      • GraphicsConfigurationWithTransparency

        public GraphicsConfigurationWithTransparency()
    • Method Detail

      • createCompatibleImage

        public BufferedImage createCompatibleImage​(int width,
                                                   int height,
                                                   int transparency)
        Construct a buffered image with an alpha channel, unless transparency is OPAQUE (no alpha at all).
        Overrides:
        createCompatibleImage in class GraphicsConfiguration
        Parameters:
        width - the width of the image
        height - the height of the image
        transparency - the alpha value of the image
        Returns:
        the new buffered image
      • createCompatibleImage

        public BufferedImage createCompatibleImage​(int width,
                                                   int height)
        Construct a buffered image with an alpha channel.
        Overrides:
        createCompatibleImage in class GraphicsConfiguration
        Parameters:
        width - the width of the image
        height - the height of the image
        Returns:
        the new buffered image
      • getBounds

        public Rectangle getBounds()
        TODO: This should return the page bounds in Pts, I couldn't figure out how to get this for the current page (this still works for now, but it should be fixed...).
        Specified by:
        getBounds in class GraphicsConfiguration
        Returns:
        the bounds of the document page
      • getColorModel

        public ColorModel getColorModel​(int transparency)
        Return a good color model given transparency
        Specified by:
        getColorModel in class GraphicsConfiguration
        Parameters:
        transparency - the alpha value for the colour model
        Returns:
        the colour model for the configuration
      • getNormalizingTransform

        public AffineTransform getNormalizingTransform()
        The normalizing transform (1:1) (since we currently render images at 72dpi, which we might want to change in the future).
        Specified by:
        getNormalizingTransform in class GraphicsConfiguration
        Returns:
        the normalizing transform for the configuration