cz.cuni.jagrlib.iface
Interface RasterGraphics

All Superinterfaces:
Property
All Known Implementing Classes:
DefaultRasterGraphics, HDRImage, RasterImage

public interface RasterGraphics
extends Property

Raster graphics interface (representation of pixel bitmap).

Since:
0.02
See Also:
RasterGraphics.java

Field Summary
static java.lang.String BANDS
           
static java.lang.String COLORMODE
           
static java.lang.String HEIGHT
           
static int MODE_BAND
          Higher dimensional pixel values (0 to getMaxRGB()).
static int MODE_COLORMAP
          Colormapped pixels (0 to getMaxColormap()).
static int MODE_GRAY
          Gray pixel values (0 to getMaxGray()).
static int MODE_RGB
          True-color pixel values (0 to getMaxRGB()).
static int MODE_RGBA
          True-color pixel values with alpha-channel (0 to getMaxRGB()).
static java.lang.String WIDTH
           
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 int getBands()
          Number of color bands of the bitmap.
 java.awt.image.BufferedImage getBufferedImage()
          Copies raster graphics to a BufferedImage object.
 void getColormap(int i0, int length, double[][] _colors)
          Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").
 void getColormap(int i0, int length, int[][] _colors)
          Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").
 int getColormapType()
          Colormap mode (valid only for MODE_COLORMAP bitmap mode).
 int getGray(int x, int y)
          Returns the pixel's gray value (for all modes).
 double getGrayDouble(int x, int y)
          Returns the pixel's gray value (for all modes).
 int getHeight()
          Height of the bitmap.
 void getHLine(int x1, int x2, int y, double[] _colors)
          Returns the values for the given horizontal line (for MODE_GRAY).
 void getHLine(int x1, int x2, int y, double[][] _colors)
          Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void getHLine(int x1, int x2, int y, int[] _colors)
          Returns the values for the given horizontal line (for MODE_GRAY or MODE_COLORMAP).
 void getHLine(int x1, int x2, int y, int[][] _colors)
          Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND).
 int getMaxColormap()
          Maximal ordinal number of colormap entry.
 int getMaxGray()
          Maximal gray value.
 int getMaxRGB()
          Maximal RGB[A] value.
 int getMode()
          Sample (color) model of the bitmap.
 int getPixel(int x, int y)
          Returns the pixel's value (for MODE_GRAY or MODE_COLORMAP).
 void getPixel(int x, int y, double[] _color)
          Returns the pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void getPixel(int x, int y, int[] _color)
          Returns the pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).
 double getPixelDouble(int x, int y)
          Returns the pixel's value (for MODE_GRAY).
 void getRGB(int x, int y, double[] _color)
          Returns the pixel's RGB[A] values (for all graphic modes).
 void getRGB(int x, int y, int[] _color)
          Returns the pixel's RGB[A] values (for all graphic modes).
 int getWidth()
          Width of the bitmap.
 void init()
          RasterGraphics re-initialization (keeps current bitmap size and mode).
 void init(int _width, int _height, int _mode, int _bands)
          RasterGraphics (re-)initialization.
 void putHLine(int x1, int x2, int y, double[] _colors)
          Sets the horizontal line's values (for MODE_GRAY).
 void putHLine(int x1, int x2, int y, double[][] _colors)
          Sets the horizontal line's values (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void putHLine(int x1, int x2, int y, int[] _colors)
          Sets the horizontal line's values (for MODE_GRAY or MODE_COLORMAP).
 void putHLine(int x1, int x2, int y, int[][] _colors)
          Sets the horizontal line's values (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void putPixel(int x, int y, double _color)
          Sets the given pixel's value (for MODE_GRAY).
 void putPixel(int x, int y, double[] _color)
          Sets the given pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void putPixel(int x, int y, int _color)
          Sets the given pixel's value (for MODE_GRAY or MODE_COLORMAP).
 void putPixel(int x, int y, int[] _color)
          Sets the given pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void setAlpha(double _alpha)
          Sets the current drawing alpha (for MODE_RGB, MODE_RGBA or MODE_GRAY).
 int setAlphaOperation(int _op)
          Sets the alpha-channel operation (used in all set*() methods).
 void setBufferedImage(java.awt.image.BufferedImage bi)
          Initializes raster graphics from a BufferedImage object.
 void setColor(double _color)
          Sets the current drawing color (for MODE_GRAY).
 void setColor(double[] _color)
          Sets the current drawing color (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void setColor(int _color)
          Sets the current drawing color (for MODE_GRAY or MODE_COLORMAP).
 void setColor(int[] _color)
          Sets the current drawing color (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void setColormap(double[][] _colors)
          Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").
 void setColormap(int[][] _colors)
          Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").
 void setColormapType(int _mode, int _max)
          Sets the colormap mode (valid only for MODE_COLORMAP bitmap mode).
 void setHLine(int x1, int x2, int y)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y].
 void setHLine(int x1, int x2, int y, double _color)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY).
 void setHLine(int x1, int x2, int y, double[] _color)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void setHLine(int x1, int x2, int y, int _color)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY or MODE_COLORMAP).
 void setHLine(int x1, int x2, int y, int[] _color)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND).
 int setOperation(int _op)
          Sets the binary set operation (used in all set*() methods).
 void setPixel(int x, int y)
          Sets the given pixel's value.
 void setRectangle(int x1, int y1, int x2, int y2)
          Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1].
 void setRectangle(int x1, int y1, int x2, int y2, double _color)
          Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY).
 void setRectangle(int x1, int y1, int x2, int y2, double[] _color)
          Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND).
 void setRectangle(int x1, int y1, int x2, int y2, int _color)
          Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY or MODE_COLORMAP).
 void setRectangle(int x1, int y1, int x2, int y2, int[] _color)
          Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND).
 ValueTransferFunction setTransferFunction(ValueTransferFunction _transfer)
          Sets the value-transfer function (used in all set*() methods).
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

WIDTH

static final java.lang.String WIDTH
See Also:
Constant Field Values

HEIGHT

static final java.lang.String HEIGHT
See Also:
Constant Field Values

COLORMODE

static final java.lang.String COLORMODE
See Also:
Constant Field Values

BANDS

static final java.lang.String BANDS
See Also:
Constant Field Values

MODE_GRAY

static final int MODE_GRAY
Gray pixel values (0 to getMaxGray()).

See Also:
Constant Field Values

MODE_COLORMAP

static final int MODE_COLORMAP
Colormapped pixels (0 to getMaxColormap()).

See Also:
getColormapType(), setColormapType(int, int), Constant Field Values

MODE_RGB

static final int MODE_RGB
True-color pixel values (0 to getMaxRGB()).

See Also:
Constant Field Values

MODE_RGBA

static final int MODE_RGBA
True-color pixel values with alpha-channel (0 to getMaxRGB()).

See Also:
Constant Field Values

MODE_BAND

static final int MODE_BAND
Higher dimensional pixel values (0 to getMaxRGB()).

See Also:
Constant Field Values
Method Detail

init

void init(int _width,
          int _height,
          int _mode,
          int _bands)
RasterGraphics (re-)initialization.

Parameters:
_width - Width of a new bitmap.
_height - Height of a new bitmap.
_mode - Pixel value type (RasterGraphics.MODE_* constant).
_bands - Number of bands (for MODE_BAND).
See Also:
setColormapType(int, int)

init

void init()
RasterGraphics re-initialization (keeps current bitmap size and mode).


getWidth

int getWidth()
Width of the bitmap.

Returns:
Current bitmap width in pixels.

getHeight

int getHeight()
Height of the bitmap.

Returns:
Current bitmap height in pixels.

getMode

int getMode()
Sample (color) model of the bitmap.

Returns:
Current bitmap mode (RasterGraphics.MODE_* constants).

getBands

int getBands()
Number of color bands of the bitmap.

Returns:
Number of color bands.

getMaxGray

int getMaxGray()
Maximal gray value.

Returns:
Maximal acceptable gray value.

getMaxColormap

int getMaxColormap()
Maximal ordinal number of colormap entry.

Returns:
Maximal colormap's entry number.

getMaxRGB

int getMaxRGB()
Maximal RGB[A] value. Also used in multi-band mode.

Returns:
Maximal value for R,G,B,A and other bands.

getBufferedImage

java.awt.image.BufferedImage getBufferedImage()
Copies raster graphics to a BufferedImage object.

Returns:
BufferedImage object.
See Also:
setBufferedImage(java.awt.image.BufferedImage)

setBufferedImage

void setBufferedImage(java.awt.image.BufferedImage bi)
Initializes raster graphics from a BufferedImage object.

Parameters:
bi - Raster data.
See Also:
getBufferedImage()

getColormapType

int getColormapType()
Colormap mode (valid only for MODE_COLORMAP bitmap mode).

Returns:
Colormap mode (one of (RasterGraphics.MODE_* constants).

setColormapType

void setColormapType(int _mode,
                     int _max)
Sets the colormap mode (valid only for MODE_COLORMAP bitmap mode).

Parameters:
_mode - Colormap mode (one of (RasterGraphics.MODE_* constants).
_max - Maximal index of colormap entry.

getColormap

void getColormap(int i0,
                 int length,
                 double[][] _colors)
Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").

Parameters:
i0 - The first colormap index.
length - Length of colormap segment.
_colors - Returned color levels (each band: from 0.0 to 1.0).

getColormap

void getColormap(int i0,
                 int length,
                 int[][] _colors)
Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND").

Parameters:
i0 - The first colormap index.
length - Length of colormap segment.
_colors - Returned color levels (each band: from 0 to getMaxRGB()).

setColormap

void setColormap(double[][] _colors)
Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). Colormap size & mode has to be set before using setColormapType(int, int).

Parameters:
_colors - Color levels to be set (each band: from 0.0 to 1.0).

setColormap

void setColormap(int[][] _colors)
Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). Colormap size & mode has to be set before using setColormapType(int, int).

Parameters:
_colors - Color levels to be set (each band: from 0 to getMaxRGB()).

setOperation

int setOperation(int _op)
Sets the binary set operation (used in all set*() methods).

Parameters:
_op - Binary set operation (BinaryOperation.BIN_OP_* constant).
Returns:
The old binary set operation.
See Also:
Binary operations

setAlphaOperation

int setAlphaOperation(int _op)
Sets the alpha-channel operation (used in all set*() methods).

Parameters:
_op - Alpha-channel operation (AlphaOperation.ALPHA_* constant).
Returns:
The old alpha-channel operation.
See Also:
Alpha-channel operations

setTransferFunction

ValueTransferFunction setTransferFunction(ValueTransferFunction _transfer)
Sets the value-transfer function (used in all set*() methods).

Parameters:
_transfer - New value-transfer function or null.
Returns:
The old Value-transfer function or null.
See Also:
Value-transfor function prototype

setColor

void setColor(int _color)
Sets the current drawing color (for MODE_GRAY or MODE_COLORMAP).

Parameters:
_color - Current drawing color (0 to getMaxGray() or getMaxColormap()).

setColor

void setColor(double _color)
Sets the current drawing color (for MODE_GRAY).

Parameters:
_color - Current drawing color (0.0 to 1.0).

setColor

void setColor(int[] _color)
Sets the current drawing color (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
_color - Current drawing color (channel values between 0 and getMaxRGB()).

setColor

void setColor(double[] _color)
Sets the current drawing color (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
_color - Current drawing color (channel values between 0.0 and 1.0).

setAlpha

void setAlpha(double _alpha)
Sets the current drawing alpha (for MODE_RGB, MODE_RGBA or MODE_GRAY).

Parameters:
_alpha - Current drawing alpha (values between 0.0 and 1.0).

setPixel

void setPixel(int x,
              int y)
Sets the given pixel's value.

Ignores any off-canvas access.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
See Also:
setColor(int), setColor(double), setColor(int[]), setColor(double[])

putPixel

void putPixel(int x,
              int y,
              int _color)
Sets the given pixel's value (for MODE_GRAY or MODE_COLORMAP).

Ignores any off-canvas access.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Pixel color (between 0 and getMaxGray() or getMaxColormap()).

putPixel

void putPixel(int x,
              int y,
              double _color)
Sets the given pixel's value (for MODE_GRAY).

Ignores any off-canvas access.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Pixel color (between 0.0 and 1.0).

putPixel

void putPixel(int x,
              int y,
              int[] _color)
Sets the given pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Pixel color (between 0 and getMaxRGB()).

putPixel

void putPixel(int x,
              int y,
              double[] _color)
Sets the given pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Pixel color (between 0.0 and 1.0).

getPixel

int getPixel(int x,
             int y)
Returns the pixel's value (for MODE_GRAY or MODE_COLORMAP).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
Returns:
Pixel value (0 for off-canvas access).

getPixelDouble

double getPixelDouble(int x,
                      int y)
Returns the pixel's value (for MODE_GRAY).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
Returns:
Pixel value (0.0 for off-canvas access).

getPixel

void getPixel(int x,
              int y,
              int[] _color)
Returns the pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Current pixel RGB[A] value.

getPixel

void getPixel(int x,
              int y,
              double[] _color)
Returns the pixel's value (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Current pixel RGB[A] value.

getRGB

void getRGB(int x,
            int y,
            int[] _color)
Returns the pixel's RGB[A] values (for all graphic modes).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Current pixel RGB[A] value (if the array's length is at least 4, alpha will be returned).

getRGB

void getRGB(int x,
            int y,
            double[] _color)
Returns the pixel's RGB[A] values (for all graphic modes).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
_color - Current pixel RGB[A] value (if the array's length is at least 4, alpha will be returned).

getGray

int getGray(int x,
            int y)
Returns the pixel's gray value (for all modes).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
Returns:
Pixel value (0 for off-canvas access).

getGrayDouble

double getGrayDouble(int x,
                     int y)
Returns the pixel's gray value (for all modes).

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
Returns:
Pixel value (0.0 for off-canvas access).

setHLine

void setHLine(int x1,
              int x2,
              int y)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y].

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
See Also:
setColor(int), setColor(double), setColor(int[]), setColor(double[])

setHLine

void setHLine(int x1,
              int x2,
              int y,
              int _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY or MODE_COLORMAP).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_color - Drawing color (0 to getMaxGray() or getMaxColormap()).

setHLine

void setHLine(int x1,
              int x2,
              int y,
              double _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_color - Drawing color (0.0 to 1.0).

setHLine

void setHLine(int x1,
              int x2,
              int y,
              int[] _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_color - Drawing color (channel values between 0 and getMaxRGB()).

setHLine

void setHLine(int x1,
              int x2,
              int y,
              double[] _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_color - Drawing color (channel values between 0.0 and 1.0).

putHLine

void putHLine(int x1,
              int x2,
              int y,
              int[] _colors)
Sets the horizontal line's values (for MODE_GRAY or MODE_COLORMAP).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Line colors (between 0 and getMaxGray() or getMaxColormap()).

putHLine

void putHLine(int x1,
              int x2,
              int y,
              double[] _colors)
Sets the horizontal line's values (for MODE_GRAY).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Line colors (between 0.0 and 1.0).

putHLine

void putHLine(int x1,
              int x2,
              int y,
              int[][] _colors)
Sets the horizontal line's values (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Line colors (between 0 and getMaxRGB()).

putHLine

void putHLine(int x1,
              int x2,
              int y,
              double[][] _colors)
Sets the horizontal line's values (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Line colors (between 0.0 and 1.0).

getHLine

void getHLine(int x1,
              int x2,
              int y,
              int[] _colors)
Returns the values for the given horizontal line (for MODE_GRAY or MODE_COLORMAP).

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Returned colors (0 to getMaxGray() or getMaxColormap(), 0 for off-canvas access).

getHLine

void getHLine(int x1,
              int x2,
              int y,
              double[] _colors)
Returns the values for the given horizontal line (for MODE_GRAY).

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Returned colors (0.0 to 1.0, 0.0 for off-canvas access).

getHLine

void getHLine(int x1,
              int x2,
              int y,
              int[][] _colors)
Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Returned colors (channel values between 0 and getMaxRGB(), 0 for off-canvas access).

getHLine

void getHLine(int x1,
              int x2,
              int y,
              double[][] _colors)
Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND).

Parameters:
x1 - X coordinate of the starting pixel.
x2 - X coordinate of the first pixel after the line.
y - Common Y coordinate of the line.
_colors - Returned colors (channel values between 0.0 and 1.0, 0.0 for off-canvas access).

setRectangle

void setRectangle(int x1,
                  int y1,
                  int x2,
                  int y2)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1].

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).

setRectangle

void setRectangle(int x1,
                  int y1,
                  int x2,
                  int y2,
                  int _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY or MODE_COLORMAP).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).
_color - Drawing color (0 to getMaxGray() or getMaxColormap()).

setRectangle

void setRectangle(int x1,
                  int y1,
                  int x2,
                  int y2,
                  double _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).
_color - Drawing color (0.0 to 1.0).

setRectangle

void setRectangle(int x1,
                  int y1,
                  int x2,
                  int y2,
                  int[] _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).
_color - Drawing color (0 to getMaxRGB()).

setRectangle

void setRectangle(int x1,
                  int y1,
                  int x2,
                  int y2,
                  double[] _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND).

Ignores any off-canvas access.

Parameters:
x1 - X coordinate of the upper left corner.
y1 - Y coordinate of the upper left corner.
x2 - X coordinate of the lower right corner (outside pixel).
y2 - Y coordinate of the upper left corner (outside pixel).
_color - Drawing color (0.0 to 1.0).