Package ej.microvg

Class BufferedVectorImage

    • Constructor Detail

      • BufferedVectorImage

        public BufferedVectorImage​(int width,
                                   int height)
        Creates a buffered image that holds the GPU commands.

        A command is added in the image when the image's GraphicsContext is used to draw something into.

        Parameters:
        width - the width of the new image, in pixels
        height - the height of the new image, in pixels
        See Also:
        BufferedImage.getGraphicsContext()
    • Method Detail

      • getGraphicsContext

        public GraphicsContext getGraphicsContext()
        Returns the GraphicsContext associated with this image, which may be used in order to draw on the image.

        This method always returns the same GraphicsContext instance for a specific image. The graphics context has the same dimensions as the image.

        Returns:
        the image's graphics context.
        Throws:
        MicroUIException - if this image has been closed (see ResourceVectorImage.close()).
      • clear

        public void clear()
        Clears all commands.