public class Pixers extends Object
Modifier and Type | Field and Description |
---|---|
static Pixer |
EMPTY
Pixer with no pixels.
|
Modifier and Type | Method and Description |
---|---|
static Pixer |
clip(Pixer base,
Rectangle clip)
Returns a clipped version of a given pixel iterator whose extent
is not known.
|
static Pixer |
clip(Pixer base,
Rectangle clip,
int xminBase,
int xmaxBase,
int yminBase,
int ymaxBase)
Returns a clipped version of a given pixel iterator whose extent
is known.
|
static PixelDrawing |
convolve(PixerFactory shape,
PixerFactory kernel,
Rectangle clip)
Convolves two PixerFactories together, which can be used
for instance to apply a smoothing kernel to a given shape.
|
static PixerFactory |
copy(PixerFactory base)
Returns an efficient copy of the given factory.
|
static Pixer |
createArrayPixer(int[] xs,
int[] ys,
int np)
Returns a new pixer that iterates over a given list of X,Y coordinates.
|
static Pixer |
createClippedPixer(PixerFactory pfact,
Rectangle clip)
Returns a pixer that results from applying a clip rectangle to
the output of a given PixerFactory.
|
static PixerFactory |
createPixerCopier(Pixer pixer)
Takes a given pixer and copies its data, returning an object that
can issue pixers that behave the same as the original.
|
static Pixer |
createPointsPixer(Point[] points)
Returns a new pixer that iterates over an array of Points.
|
static Pixer |
translate(Pixer base,
int tx,
int ty)
Returns a translated version of a pixel iterator.
|
public static final Pixer EMPTY
public static Pixer createArrayPixer(int[] xs, int[] ys, int np)
xs
- array of X valuesys
- array of Y valuesnp
- number of points (xs and ys must be at least this length)public static Pixer createPointsPixer(Point[] points)
points
- point arraypublic static PixerFactory copy(PixerFactory base)
base
- base implementationpublic static PixerFactory createPixerCopier(Pixer pixer)
pixer
- input pixerpublic static Pixer translate(Pixer base, int tx, int ty)
base
- base pixel iteratortx
- offset in X directionty
- offset in Y directionpublic static Pixer clip(Pixer base, Rectangle clip)
base
- base pixel iteratorclip
- clipping rectanglepublic static Pixer createClippedPixer(PixerFactory pfact, Rectangle clip)
pfact
- pixer factoryclip
- clipping rectanglepublic static Pixer clip(Pixer base, Rectangle clip, int xminBase, int xmaxBase, int yminBase, int ymaxBase)
base
- base pixel iteratorclip
- clipping rectanglexminBase
- lower limit of X values dispensed by base pixerxmaxBase
- upper limit of X values dispensed by base pixeryminBase
- lower limit of Y values dispensed by base pixerymaxBase
- upper limit of Y values dispensed by base pixerpublic static PixelDrawing convolve(PixerFactory shape, PixerFactory kernel, Rectangle clip)
shape
- first supplier of pixelskernel
- second supplier of pixelsclip
- clipping rectangle for outputCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.