|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.cuni.jagrlib.DefaultProperty
cz.cuni.jagrlib.Piece
cz.cuni.jagrlib.piece.XTransitionList
public class XTransitionList
Bit-mask represented by "X-transition list" data structure.
| Nested Class Summary | |
|---|---|
class |
XTransitionList.XTransitionListEnumerator
Special Enumerator for XTransitionList. |
| Field Summary | |
|---|---|
protected int |
binaryOp
Actual binary set operation. |
protected static java.lang.String |
CATEGORY
Object category. |
static RegPiece |
reg
Static registration instance for this class. |
protected cz.cuni.jagrlib.piece.XLine[] |
scanlines
Array of scanlines (they are holding XItems). |
protected int |
setHeight
|
protected int |
setWidth
|
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected int |
yMax
Maximum scanline coordinate + 1. |
protected int |
yMin
Minimum scanline coordinate. |
| Fields inherited from class cz.cuni.jagrlib.Piece |
|---|
channels, info, pl, plugs, TEMPLATE_TYPE, userBreak |
| Fields inherited from interface cz.cuni.jagrlib.iface.BitMask |
|---|
HEIGHT, WIDTH |
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Constructor Summary | |
|---|---|
XTransitionList()
|
|
| Method Summary | |
|---|---|
protected void |
assertY(int y)
Asserts that the given scanline is included in the set. |
void |
bitBlt(int dx,
int dy,
int sx,
int sy,
int width,
int height)
Bit-block-transfer routine: copies the source rectangle [sx,sy,width,height] to the new location [dx,dy]. |
void |
commit()
Commits all previous changes to the internal object state. |
BitMaskEnumerator |
enumerator()
BitMask enumeration. |
protected static boolean |
find(int x,
java.util.ListIterator<cz.cuni.jagrlib.piece.XItem> li)
Finds the given X coordinate in the given List. |
java.lang.Object |
get(java.lang.String key)
Gets the given property. |
void |
getHLine(int x1,
int x2,
int y,
boolean[] values)
Returns the pixels' values for the given horizontal line. |
boolean |
getPixel(int x,
int y)
Returns the pixel's value. |
void |
getRectangle(int x1,
int y1,
int x2,
int y2,
boolean[][] values)
Returns the pixels' values for the given rectangle. |
void |
init()
XTransitionList re-initialization (keeps current bitmask size - if the size is relevant). |
void |
init(int x,
int y)
XTransitionList (re-)initialization. |
void |
putHLine(int x1,
int x2,
int y,
boolean[] values)
Sets the horizontal line's values (ignores current binary set operation). |
void |
putPixel(int x,
int y,
boolean value)
Sets the given pixel's value (ignores current binary set operation). |
void |
putRectangle(int x1,
int y1,
int x2,
int y2,
boolean[][] values)
Sets the rectangle's values (ignores current binary set operation). |
void |
set(java.lang.String key,
java.lang.Object value)
Sets the given property. |
void |
setHLine(int x1,
int x2,
int y)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y]. |
protected cz.cuni.jagrlib.piece.XLine |
setList(cz.cuni.jagrlib.piece.XLine l,
int y)
Sets the given scanline-set (using binaryOp operation). |
protected cz.cuni.jagrlib.piece.XLine |
setList(cz.cuni.jagrlib.piece.XLine l,
int y,
int x1,
int x2)
Sets the given scanline-set (hard-set .. by-passes the binaryOp operation) within the given bounds (from x1 to x2-1). |
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 to true = "painted". |
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]. |
static int |
setTemplate(Template t,
int ord)
General-purpose registration routine. |
| Methods inherited from class cz.cuni.jagrlib.Piece |
|---|
className, connect, findPlug, findPlug, getInfo, getInterface, getInterface, getPlug, getReg, init, isCompatible, isCompatible, isConnected, logError, logWarning, myInterface, newInputPlug, newOptOutputPlug, newOutputPlug, newPlug, noTemplates, propBegin, propBounds, propDefault, propEnd, propEnum, propManipulator, propManipulator, setProgressListener, setRegStrings, setTemplateDynamic, stop |
| Methods inherited from class cz.cuni.jagrlib.DefaultProperty |
|---|
booleanProperty, booleanProperty, colorDoubleProperty, colorProperty, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, stringProperty |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int yMin
protected int yMax
protected cz.cuni.jagrlib.piece.XLine[] scanlines
XItems).
protected int binaryOp
protected int setWidth
protected int setHeight
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
| Constructor Detail |
|---|
public XTransitionList()
| Method Detail |
|---|
protected void assertY(int y)
y - Y coordinate to be included.
protected cz.cuni.jagrlib.piece.XLine setList(cz.cuni.jagrlib.piece.XLine l,
int y)
binaryOp operation).
l - The scanline-set.y - Y coordinate of the scanline.
protected cz.cuni.jagrlib.piece.XLine setList(cz.cuni.jagrlib.piece.XLine l,
int y,
int x1,
int x2)
l - The scanline-set.y - Y coordinate of the scanline.x1 - X coordinate of the scanline-set begin.x2 - X coordinate of the first point after the scanline-set.
protected static boolean find(int x,
java.util.ListIterator<cz.cuni.jagrlib.piece.XItem> li)
x - Boundary X coordinateli - The initialized ListIterator.
XItem.
public void init(int x,
int y)
init in interface BitMaskCorex - Width of a new bitmask.y - Height of a new bitmask.public void init()
init in interface BitMaskCorepublic int setOperation(int _op)
setOperation in interface BitMask_op - Binary set operation (BinaryOperation.BIN_OP_* constant).
Binary operations
public void setPixel(int x,
int y)
setPixel in interface BitMaskCorex - X coordinate of a pixel.y - Y coordinate of a pixel.
public void putPixel(int x,
int y,
boolean value)
putPixel in interface BitMaskx - X coordinate of a pixel.y - Y coordinate of a pixel.value - New pixel's value.
public boolean getPixel(int x,
int y)
getPixel in interface BitMaskCorex - X coordinate of a pixel.y - Y coordinate of a pixel.
public void setHLine(int x1,
int x2,
int y)
setHLine in interface BitMaskCorex1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line.
public void putHLine(int x1,
int x2,
int y,
boolean[] values)
putHLine in interface BitMaskx1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line.values - New pixels' values.
public void getHLine(int x1,
int x2,
int y,
boolean[] values)
getHLine in interface BitMaskx1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line.values - Returned values in boolean[] array (false for
off-canvas access).
public void setRectangle(int x1,
int y1,
int x2,
int y2)
setRectangle in interface BitMaskx1 - 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).
public void putRectangle(int x1,
int y1,
int x2,
int y2,
boolean[][] values)
putRectangle in interface BitMaskx1 - 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).values - New pixels' values.
public void getRectangle(int x1,
int y1,
int x2,
int y2,
boolean[][] values)
getRectangle in interface BitMaskx1 - 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).values - Returned values in boolean[][] array (false for
off-canvas access).
public void bitBlt(int dx,
int dy,
int sx,
int sy,
int width,
int height)
bitBlt in interface BitMaskdx - X coordinate of the upper left destination corner.dy - Y coordinate of the upper left destination corner.sx - X coordinate of the upper left source corner.sy - Y coordinate of the upper left source corner.width - Rectangle width.height - Rectangle height.public BitMaskEnumerator enumerator()
BitMask enumeration.
enumerator in interface BitMaskCore
public void set(java.lang.String key,
java.lang.Object value)
set in interface Propertyset in class DefaultPropertykey - Key string.value - The new value.Property.commit()public java.lang.Object get(java.lang.String key)
get in interface Propertyget in class DefaultPropertykey - Key string.
public void commit()
commit in interface Propertycommit in class DefaultProperty
public static int setTemplate(Template t,
int ord)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||