Catalano.Imaging.Filters
Class FloodFill
- java.lang.Object
-
- Catalano.Imaging.Filters.FloodFill
-
- All Implemented Interfaces:
- IApplyInPlace
public class FloodFill extends java.lang.Object implements IApplyInPlace
Flood Fill filter. The purpose of Flood Fill is to color an entire area of connected pixels with the same color.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classFloodFill.AlgorithmSpecifies different floodfill algorithm.
-
Constructor Summary
Constructors Constructor and Description FloodFill(int x, int y, Color color)Initialize a new instance of the FloodFill class.FloodFill(int x, int y, int gray)Initialize a new instance of the FloodFill class.FloodFill(int x, int y, int gray, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.FloodFill(int x, int y, int r, int g, int b)Initialize a new instance of the FloodFill class.FloodFill(int x, int y, int r, int g, int b, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.FloodFill(IntPoint p, Color color)Initialize a new instance of the FloodFill class.FloodFill(IntPoint p, int gray)Initialize a new instance of the FloodFill class.FloodFill(IntPoint p, int gray, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.FloodFill(IntPoint p, int r, int g, int b)Initialize a new instance of the FloodFill class.FloodFill(IntPoint p, int r, int g, int b, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidapplyInPlace(FastBitmap fastBitmap)Apply filter to an image.FloodFill.AlgorithmgetAlgorithm()Floodfill algorithm.IntPointgetPoint()Get point.voidsetAlgorithm(FloodFill.Algorithm algorithm)Floodfill algorithm.voidsetPoint(int x, int y)Sets point.voidsetRGB(int r, int g, int b)Sets RGB.
-
-
-
Constructor Detail
-
FloodFill
public FloodFill(int x, int y, Color color)Initialize a new instance of the FloodFill class.- Parameters:
x- X axis coordinate.y- Y axis coordinate.color- Color.
-
FloodFill
public FloodFill(int x, int y, int r, int g, int b)Initialize a new instance of the FloodFill class.- Parameters:
x- X-axis.y- Y-axis.r- Red channel value.g- Green channel value.b- Blue channel value.
-
FloodFill
public FloodFill(int x, int y, int r, int g, int b, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.- Parameters:
x- X-axis.y- Y-axis.r- Red channel value.g- Green channel value.b- Blue channel value.algorithm- Floodfill algorithm.
-
FloodFill
public FloodFill(IntPoint p, int r, int g, int b)
Initialize a new instance of the FloodFill class.- Parameters:
p- Point (x,y);r- Red channel value.g- Green channel value.b- Blue channel value.
-
FloodFill
public FloodFill(IntPoint p, Color color)
Initialize a new instance of the FloodFill class.- Parameters:
p- Point(x,y).color- Color.
-
FloodFill
public FloodFill(IntPoint p, int r, int g, int b, FloodFill.Algorithm algorithm)
Initialize a new instance of the FloodFill class.- Parameters:
p- Point (x,y);r- Red channel value.g- Green channel value.b- Blue channel value.algorithm- Floodfill algorithm.
-
FloodFill
public FloodFill(int x, int y, int gray)Initialize a new instance of the FloodFill class.- Parameters:
x- X-axis.y- Y-axis.gray- Gray channel value.
-
FloodFill
public FloodFill(int x, int y, int gray, FloodFill.Algorithm algorithm)Initialize a new instance of the FloodFill class.- Parameters:
x- X-axis.y- Y-axis.gray- Gray channel value.algorithm- Floodfill algorithm.
-
FloodFill
public FloodFill(IntPoint p, int gray)
Initialize a new instance of the FloodFill class.- Parameters:
p- Point (x,y).gray- Gray channel value.
-
FloodFill
public FloodFill(IntPoint p, int gray, FloodFill.Algorithm algorithm)
Initialize a new instance of the FloodFill class.- Parameters:
p- Point (x,y).gray- Gray channel value.algorithm- Floodfill algorithm.
-
-
Method Detail
-
getAlgorithm
public FloodFill.Algorithm getAlgorithm()
Floodfill algorithm.- Returns:
- Floodfill algorithm.
-
setAlgorithm
public void setAlgorithm(FloodFill.Algorithm algorithm)
Floodfill algorithm.- Parameters:
algorithm- Floodfill algorithm.
-
setRGB
public void setRGB(int r, int g, int b)Sets RGB.- Parameters:
r- Red channel value.g- Green channel value.b- Blue channel value.
-
getPoint
public IntPoint getPoint()
Get point.- Returns:
- IntPoint.
-
setPoint
public void setPoint(int x, int y)Sets point.- Parameters:
x- X-axis.y- Y-axis.
-
applyInPlace
public void applyInPlace(FastBitmap fastBitmap)
Description copied from interface:IApplyInPlaceApply filter to an image.- Specified by:
applyInPlacein interfaceIApplyInPlace- Parameters:
fastBitmap- Image to be processed.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG