Package org.esa.snap.core.util
Class ShapeRasterizer.BresenhamLineRasterizer
- java.lang.Object
-
- org.esa.snap.core.util.ShapeRasterizer.BresenhamLineRasterizer
-
- All Implemented Interfaces:
ShapeRasterizer.LineRasterizer
- Enclosing class:
- ShapeRasterizer
public static class ShapeRasterizer.BresenhamLineRasterizer extends Object implements ShapeRasterizer.LineRasterizer
The Bresenham Algorithm is the default algorithm used to rasterize lines.
-
-
Constructor Summary
Constructors Constructor Description BresenhamLineRasterizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
rasterize(int x0, int y0, int x1, int y1, ShapeRasterizer.LinePixelVisitor visitor)
Rasterizes a line by visiting all pixels between the two line end-points.
-
-
-
Method Detail
-
rasterize
public void rasterize(int x0, int y0, int x1, int y1, ShapeRasterizer.LinePixelVisitor visitor)
Description copied from interface:ShapeRasterizer.LineRasterizer
Rasterizes a line by visiting all pixels between the two line end-points.- Specified by:
rasterize
in interfaceShapeRasterizer.LineRasterizer
- Parameters:
x0
- x of the first end-pointy0
- y of the first end-pointx1
- x of the seconf end-pointy1
- y of the seconf end-pointvisitor
- the pixel visitor
-
-