- Type Parameters:
PX
- The type of the pixel being managed by thePixmap
.
- All Superinterfaces:
HeightAccessor
,WidthAccessor
- All Known Subinterfaces:
Pixmap.PixmapBuilder<PX,
,B> Pixmap.PixmapProperty<PX>
,RgbPixmap
,RgbPixmap.RgbPixmapBuilder
,RgbPixmap.RgbPixmapProperty
- All Known Implementing Classes:
RgbPixmapBuilderImpl
,RgbPixmapImpl
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Pixmap.PixmapBuilder<PX,
B extends Pixmap.PixmapBuilder<PX, B>> Provides a builder method for a pixmap property returning the builder for applying multiple build operations.static interface
Provides a mutator for a pixmap property.static interface
Provides a pixmap property.Nested classes/interfaces inherited from interface org.refcodes.graphical.HeightAccessor
HeightAccessor.HeightBuilder<B extends HeightAccessor.HeightBuilder<B>>, HeightAccessor.HeightMutator, HeightAccessor.HeightProperty
Nested classes/interfaces inherited from interface org.refcodes.graphical.WidthAccessor
WidthAccessor.WidthBuilder<B extends WidthAccessor.WidthBuilder<B>>, WidthAccessor.WidthMutator, WidthAccessor.WidthProperty
-
Method Summary
Modifier and TypeMethodDescriptionint
Retrieves the height of thePixmap
.getPixelAt
(int aPosX, int aPosY) Retrieves a pixel at a given position.PX[][]
Returns the two dimensional pixels array representing the pixmap.int
getWidth()
Retrieves the width of thePixmap
.default boolean
hasPixelAt
(int aPosX, int aPosY) Tests whether there is a pixel at a given position.
-
Method Details
-
getPixels
PX[][] getPixels()Returns the two dimensional pixels array representing the pixmap.- Returns:
- The pixmap array.
-
getWidth
int getWidth()Retrieves the width of thePixmap
.- Specified by:
getWidth
in interfaceWidthAccessor
- Returns:
- The width of the
Pixmap
-
getHeight
int getHeight()Retrieves the height of thePixmap
.- Specified by:
getHeight
in interfaceHeightAccessor
- Returns:
- The height of the
Pixmap
-
getPixelAt
Retrieves a pixel at a given position.- 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:
IndexOutOfBoundsException
- in case the index is out of bounds.
-
hasPixelAt
Tests whether there is a pixel at a given position.- Parameters:
aPosX
- The x position for the pixel to be tested.aPosY
- The y position for the pixel to be tested.- Returns:
- True if we have a pixel at this position.
- Throws:
IndexOutOfBoundsException
- in case the index is out of bounds.
-