Module org.refcodes.graphical
Package org.refcodes.graphical
Interface Pixmap.PixmapBuilder<PX,B extends Pixmap.PixmapBuilder<PX,B>>
- Type Parameters:
PX
- The type of the pixel being managed by thePixmap
.B
- The builder to return in order to be able to apply multiple build operations.
- All Superinterfaces:
HeightAccessor
,Pixmap<PX>
,Pixmap.PixmapMutator<PX>
,Pixmap.PixmapProperty<PX>
,WidthAccessor
- All Known Subinterfaces:
RgbPixmap.RgbPixmapBuilder
- All Known Implementing Classes:
RgbPixmapBuilderImpl
public static interface Pixmap.PixmapBuilder<PX,B extends Pixmap.PixmapBuilder<PX,B>>
extends Pixmap.PixmapProperty<PX>
Provides a builder method for a pixmap property returning the builder for
applying multiple build operations.
-
Nested Class Summary
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.Pixmap
Pixmap.PixmapBuilder<PX,
B extends Pixmap.PixmapBuilder<PX, B>>, Pixmap.PixmapMutator<PX>, Pixmap.PixmapProperty<PX> 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 TypeMethodDescriptiondefault void
mergeColorArrays
(Pixmap<PX> aSourceColorArray) Merge color arrays.default void
mergeWith
(B aSourcePixmap, int aSourcePosX, int aSourcePosY, boolean isWrapHorizontically, boolean isWrapVertically, int aDestionationPosX, int aDestionationPosY, int aWidth, int aHeight) default void
mergeWith
(B aSourcePixmap, int aSourcePosX, int aSourcePosY, boolean isWrapHorizontically, boolean isWrapVertically, int aDestinationPosX, int aDestinationPosY, int aWidth, int aHeight, Color aTransparency) withPixelAt
(PX aPixel, int aPosX, int aPosY) Sets the pixmap for the pixmap property.withPixels
(PX[][] aPixels) With pixels.Methods inherited from interface org.refcodes.graphical.Pixmap
getHeight, getPixelAt, getPixels, getWidth, hasPixelAt
Methods inherited from interface org.refcodes.graphical.Pixmap.PixmapMutator
setPixelAt, setPixels
Methods inherited from interface org.refcodes.graphical.Pixmap.PixmapProperty
letPixels, letRgbAt
-
Method Details
-
mergeWith
default void mergeWith(B aSourcePixmap, int aSourcePosX, int aSourcePosY, boolean isWrapHorizontically, boolean isWrapVertically, int aDestionationPosX, int aDestionationPosY, int aWidth, int aHeight) - Parameters:
aSourcePixmap
- The sourcePixmap
with which to merge.aSourcePosX
- The X position in the sourcePixmap
from which to start merging.aSourcePosY
- The Y position in the sourcePixmap
from which to start merging.isWrapHorizontically
- True in case merging is to be continued on the left when reaching thePixmap
bounds on the right.isWrapVertically
- True in case merging is to be continued on the top when reaching thePixmap
bounds on the bottom.aDestionationPosX
- the destionation pos XaDestionationPosY
- the destionation pos YaWidth
- The merge window's width.aHeight
- The merge window's height.
-
mergeWith
default void mergeWith(B aSourcePixmap, int aSourcePosX, int aSourcePosY, boolean isWrapHorizontically, boolean isWrapVertically, int aDestinationPosX, int aDestinationPosY, int aWidth, int aHeight, Color aTransparency) - Parameters:
aSourcePixmap
- The sourcePixmap
with which to merge.aSourcePosX
- The X position in the sourcePixmap
from which to start merging.aSourcePosY
- The Y position in the sourcePixmap
from which to start merging.isWrapHorizontically
- True in case merging is to be continued on the left when reaching thePixmap
bounds on the right.isWrapVertically
- True in case merging is to be continued on the top when reaching thePixmap
bounds on the bottom.aDestinationPosX
- The X position in the destinationPixmap
from which to start merging.aDestinationPosY
- The Y position in the destinationPixmap
from which to start merging.aWidth
- The merge window's width.aHeight
- The merge window's height.aTransparency
- The color indicating transparency, null when to be ignored.
-
mergeColorArrays
Merge color arrays.- Parameters:
aSourceColorArray
- the source color array
-
withPixelAt
Sets the pixmap for the pixmap property.- Parameters:
aPixel
- the pixelaPosX
- the pos XaPosY
- the pos Y- Returns:
- The builder for applying multiple build operations.
- Throws:
IndexOutOfBoundsException
- in case the index is out of bounds.
-
withPixels
With pixels.- Parameters:
aPixels
- the pixels- Returns:
- the b
-