- java.lang.Object
-
- org.refcodes.graphical.RgbPixmapImpl
-
- org.refcodes.graphical.RgbPixmapBuilderImpl
-
- All Implemented Interfaces:
HeightAccessor
,Pixmap<RgbPixel>
,Pixmap.PixmapBuilder<RgbPixel,RgbPixmap.RgbPixmapBuilder>
,Pixmap.PixmapMutator<RgbPixel>
,Pixmap.PixmapProperty<RgbPixel>
,RgbPixmap
,RgbPixmap.RgbPixmapBuilder
,RgbPixmap.RgbPixmapMutator
,RgbPixmap.RgbPixmapProperty
,WidthAccessor
public class RgbPixmapBuilderImpl extends RgbPixmapImpl implements RgbPixmap.RgbPixmapBuilder
The Class RgbPixmapBuilderImpl.
-
-
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.RgbPixmap
RgbPixmap.RgbPixmapBuilder, RgbPixmap.RgbPixmapMutator, RgbPixmap.RgbPixmapProperty
-
Nested classes/interfaces inherited from interface org.refcodes.graphical.WidthAccessor
WidthAccessor.WidthBuilder<B extends WidthAccessor.WidthBuilder<B>>, WidthAccessor.WidthMutator, WidthAccessor.WidthProperty
-
-
Field Summary
-
Fields inherited from class org.refcodes.graphical.RgbPixmapImpl
_pixels
-
-
Constructor Summary
Constructors Constructor Description RgbPixmapBuilderImpl()
RgbPixmapBuilderImpl(int aWidth, int aHeight)
RgbPixmapBuilderImpl(BufferedImage aImage)
RgbPixmapBuilderImpl(BufferedImage aImage, int aWidth, int aHeight)
RgbPixmapBuilderImpl(File aImageFile)
RgbPixmapBuilderImpl(File aImageFile, int aWidth, int aHeight)
RgbPixmapBuilderImpl(InputStream aImageInputStream)
RgbPixmapBuilderImpl(InputStream aImageInputStream, int aWidth, int aHeight)
RgbPixmapBuilderImpl(URL aImageUrl)
RgbPixmapBuilderImpl(URL aImageUrl, int aWidth, int aHeight)
RgbPixmapBuilderImpl(RgbPixel[][] aPixels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setPixelAt(RgbPixel aPixel, int aPosX, int aPosY)
Sets a pixel in the pixmap.void
setPixels(RgbPixel[][] aPixels)
Sets the pixels.RgbPixmapBuilderImpl
withPixelAt(RgbPixel aPixel, int aPosX, int aPosY)
Sets the pixmap for the pixmap property.RgbPixmapBuilderImpl
withPixels(RgbPixel[][] aPixels)
With pixels.RgbPixmapBuilderImpl
withRgbAt(int aPixel, int aPosX, int aPosY)
Sets an integer value interpreted as pixel in the pixmap.-
Methods inherited from class org.refcodes.graphical.RgbPixmapImpl
getHeight, getPixelAt, getPixels, getWidth
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.refcodes.graphical.Pixmap
getHeight, getPixelAt, getPixels, getWidth, hasPixelAt
-
Methods inherited from interface org.refcodes.graphical.Pixmap.PixmapBuilder
mergeColorArrays, mergeWith, mergeWith
-
Methods inherited from interface org.refcodes.graphical.Pixmap.PixmapProperty
letPixels, letRgbAt
-
Methods inherited from interface org.refcodes.graphical.RgbPixmap
getColorAt, getRgbAt
-
Methods inherited from interface org.refcodes.graphical.RgbPixmap.RgbPixmapBuilder
withColorlAt
-
Methods inherited from interface org.refcodes.graphical.RgbPixmap.RgbPixmapMutator
setColorAt, setRgbAt
-
Methods inherited from interface org.refcodes.graphical.RgbPixmap.RgbPixmapProperty
letColorAt, letRgbAt
-
-
-
-
Constructor Detail
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(BufferedImage aImage, int aWidth, int aHeight)
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(BufferedImage aImage)
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(File aImageFile, int aWidth, int aHeight) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(File aImageFile) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(InputStream aImageInputStream, int aWidth, int aHeight) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(InputStream aImageInputStream) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(URL aImageUrl, int aWidth, int aHeight) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(URL aImageUrl) throws IOException
- Throws:
IOException
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl()
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(int aWidth, int aHeight)
-
RgbPixmapBuilderImpl
public RgbPixmapBuilderImpl(RgbPixel[][] aPixels)
-
-
Method Detail
-
withPixels
public RgbPixmapBuilderImpl withPixels(RgbPixel[][] aPixels)
With pixels.- Specified by:
withPixels
in interfacePixmap.PixmapBuilder<RgbPixel,RgbPixmap.RgbPixmapBuilder>
- Parameters:
aPixels
- the pixels- Returns:
- the b
-
setPixelAt
public void setPixelAt(RgbPixel aPixel, int aPosX, int aPosY) throws IndexOutOfBoundsException
Sets a pixel in the pixmap.- Specified by:
setPixelAt
in interfacePixmap.PixmapMutator<RgbPixel>
- Parameters:
aPixel
- The pixel to be placed at the given position.aPosX
- The x position of the pixel.aPosY
- The y position of the pixel.- Throws:
IndexOutOfBoundsException
- in case the index is out of bounds.
-
setPixels
public void setPixels(RgbPixel[][] aPixels)
Sets the pixels.- Specified by:
setPixels
in interfacePixmap.PixmapMutator<RgbPixel>
- Parameters:
aPixels
- the new pixels
-
withPixelAt
public RgbPixmapBuilderImpl withPixelAt(RgbPixel aPixel, int aPosX, int aPosY) throws IndexOutOfBoundsException
Sets the pixmap for the pixmap property.- Specified by:
withPixelAt
in interfacePixmap.PixmapBuilder<RgbPixel,RgbPixmap.RgbPixmapBuilder>
- 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.
-
withRgbAt
public RgbPixmapBuilderImpl withRgbAt(int aPixel, int aPosX, int aPosY) throws IndexOutOfBoundsException
Sets an integer value interpreted as pixel in the pixmap.- Specified by:
withRgbAt
in interfaceRgbPixmap.RgbPixmapBuilder
- Parameters:
aPixel
- The pixel to be placed at the given position.aPosX
- The x position of the pixel.aPosY
- The y position of the pixel.- Returns:
- the RgbPixmapBuilder
- Throws:
IndexOutOfBoundsException
- in case the index is out of bounds.
-
-