Class RgbPixmapImpl

    • Field Detail

      • _pixels

        protected RgbPixel[][] _pixels
    • Constructor Detail

      • RgbPixmapImpl

        public RgbPixmapImpl()
        Instantiates a new rgb pixmap impl.
      • RgbPixmapImpl

        public RgbPixmapImpl​(RgbPixel[][] aPixels)
        Instantiates a new rgb pixmap impl.
        Parameters:
        aPixels - the pixels
      • RgbPixmapImpl

        public RgbPixmapImpl​(int aWidth,
                             int aHeight)
        Instantiates a new rgb pixmap impl.
        Parameters:
        aWidth - the width
        aHeight - the height
    • Method Detail

      • getPixels

        public RgbPixel[][] getPixels()
        Returns the two dimensional pixels array representing the pixmap.
        Specified by:
        getPixels in interface Pixmap<RgbPixel>
        Returns:
        The pixmap array.
      • getPixelAt

        public RgbPixel getPixelAt​(int aPosX,
                                   int aPosY)
                            throws java.lang.IndexOutOfBoundsException
        Retrieves a pixel at a given position.
        Specified by:
        getPixelAt in interface Pixmap<RgbPixel>
        Parameters:
        aPosX - The x position for the pixel to be retrieved.
        aPosY - The y position for the pixel to be retrieved.
        Returns:
        The according pixel
        Throws:
        java.lang.IndexOutOfBoundsException - in case the index is out of bounds.