cz.cuni.jagrlib.iface
Interface Order2D

All Superinterfaces:
Property
All Known Implementing Classes:
OrderSerpentine, OrderSFC

public interface Order2D
extends Property

Abstract 2D rectangle passing algorithm. From mathematical point of view it is a mapping "<0,M*N-1> -> <0,M-1> x <0,N-1>".

Since:
0.04
See Also:
Order2D.java

Field Summary
static java.lang.String ORDER_TYPE
          Order type property (int).
 
Fields inherited from interface cz.cuni.jagrlib.iface.Property
LOGGING, STATISTICS, TEXT_DESCRIPTION
 
Method Summary
 void init()
          Re-initializes the pass algorithm.
 boolean isNext()
          Anything to pass?
 int[] next(int[] coords)
          Returns the next 2D point.
 void pass()
          Executes the whole rectangle pass.
 void setSize(int _m, int _n)
          Sets the source rectangle size.
 
Methods inherited from interface cz.cuni.jagrlib.iface.Property
commit, get, set
 

Field Detail

ORDER_TYPE

static final java.lang.String ORDER_TYPE
Order type property (int).

See Also:
Constant Field Values
Method Detail

setSize

void setSize(int _m,
             int _n)
Sets the source rectangle size. Initializes the pass algorithm. For both Active and Passive modes.

Parameters:
_m - Horizontal rectangle size (width).
_n - Vertical rectangle size (height).
See Also:
init()

init

void init()
Re-initializes the pass algorithm. For Passive pass mode.

See Also:
setSize(int, int)

next

int[] next(int[] coords)
Returns the next 2D point. For Passive pass mode.

Parameters:
coords - Pre-allocated array of size 2 (for [X,Y] coordinates). Can be null.
Returns:
The next point's coordinates ([X,Y]).
See Also:
init()

isNext

boolean isNext()
Anything to pass? For Passive pass mode.

Returns:
true if there is at least one pixel to pass.
See Also:
init(), next(int[])

pass

void pass()
Executes the whole rectangle pass. For Active (="modal") pass mode.

See Also:
setSize(int, int)