Package org.refcodes.graphical
Class RgbPixmapImpl
- java.lang.Object
-
- org.refcodes.graphical.RgbPixmapImpl
-
- Direct Known Subclasses:
RgbPixmapImpl.RgbPixmapPropertyBuilderImpl
public class RgbPixmapImpl extends java.lang.Object implements RgbPixmap
The Class RgbPixmapImpl.- Author:
- steiner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RgbPixmapImpl.RgbPixmapPropertyBuilderImpl
The Class RgbPixmapPropertyBuilderImpl.-
Nested classes/interfaces inherited from interface org.refcodes.graphical.Pixmap
Pixmap.PixmapBuilder<PX,B extends Pixmap.PixmapBuilder<PX,B>>, Pixmap.PixmapMutator<PX>, Pixmap.PixmapProperty<PX>, Pixmap.PixmapPropertyBuilder<PX,B extends Pixmap.PixmapPropertyBuilder<PX,B>>
-
Nested classes/interfaces inherited from interface org.refcodes.graphical.RgbPixmap
RgbPixmap.RgbPixmapBuilder<B extends RgbPixmap.RgbPixmapBuilder<B>>, RgbPixmap.RgbPixmapMutator, RgbPixmap.RgbPixmapProperty, RgbPixmap.RgbPixmapPropertyBuilder
-
-
Constructor Summary
Constructors Constructor Description RgbPixmapImpl()
Instantiates a new rgb pixmap impl.RgbPixmapImpl(int aWidth, int aHeight)
Instantiates a new rgb pixmap impl.RgbPixmapImpl(RgbPixel[][] aPixels)
Instantiates a new rgb pixmap impl.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RgbPixel
getPixelAt(int aPosX, int aPosY)
Retrieves a pixel at a given position.RgbPixel[][]
getPixels()
Returns the two dimensional pixels array representing the pixmap.int
getPixmapHeight()
Retrieves the height of thePixmap
.int
getPixmapWidth()
Retrieves the width of thePixmap
.
-
-
-
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 widthaHeight
- the height
-
-
Method Detail
-
getPixels
public RgbPixel[][] getPixels()
Returns the two dimensional pixels array representing the pixmap.
-
getPixmapWidth
public int getPixmapWidth()
Retrieves the width of thePixmap
.- Specified by:
getPixmapWidth
in interfacePixmap<RgbPixel>
- Returns:
- The width of the
Pixmap
-
getPixmapHeight
public int getPixmapHeight()
Retrieves the height of thePixmap
.- Specified by:
getPixmapHeight
in interfacePixmap<RgbPixel>
- Returns:
- The height of the
Pixmap
-
getPixelAt
public RgbPixel getPixelAt(int aPosX, int aPosY) throws java.lang.IndexOutOfBoundsException
Retrieves a pixel at a given position.- Specified by:
getPixelAt
in interfacePixmap<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.
-
-