cz.cuni.jagrlib.iface
Interface BitMaskCore

All Known Subinterfaces:
AlphaMask, BitMask
All Known Implementing Classes:
AlphaMatrix, OverwriteClassificator, XTransitionList

public interface BitMaskCore

Core of bit-mask interface (representation of pixel set in 2D plane).

Since:
0.25
See Also:
BitMaskCore.java

Method Summary
 BitMaskEnumerator enumerator()
          Bit-mask enumeration.
 boolean getPixel(int x, int y)
          Returns the pixel's value.
 void init()
          Bit-mask re-initialization (keeps current bitmask size - if the size is relevant).
 void init(int x, int y)
          Bit-mask (re-)initialization.
 void setHLine(int x1, int x2, int y)
          Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y].
 void setPixel(int x, int y)
          Sets the given pixel's value to true = "painted".
 

Method Detail

init

void init(int x,
          int y)
Bit-mask (re-)initialization.

Parameters:
x - Width of a new bitmask.
y - Height of a new bitmask.

init

void init()
Bit-mask re-initialization (keeps current bitmask size - if the size is relevant).


setPixel

void setPixel(int x,
              int y)
Sets the given pixel's value to true = "painted". Accepts current binary set operation.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.

getPixel

boolean getPixel(int x,
                 int y)
Returns the pixel's value.

Parameters:
x - X coordinate of a pixel.
y - Y coordinate of a pixel.
Returns:
Pixel value (false 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]. Accepts current binary set operation.

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.

enumerator

BitMaskEnumerator enumerator()
Bit-mask enumeration.

Returns:
The BitMaskEnumerator object instance.