|
||||||||||
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.OverwriteClassificator
public class OverwriteClassificator
Classificator for overwritting flood-fill.
Field Summary | |
---|---|
protected int[] |
aColor
Working color array. |
protected int |
bands
Accelerator: number of color bands of underlying RasterGraphics . |
protected static java.lang.String |
CATEGORY
Object category. |
protected int[] |
color
Overwritten color. |
protected int |
height
Height of the underlying image. |
protected RasterGraphics |
image
Accelerator: underlying raster image. |
static RegPiece |
reg
Static registration instance for this class. |
protected static java.lang.String |
TEMPLATE_NAME
Object template identifier. |
protected int |
width
Width of the underlying image. |
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 | |
---|---|
OverwriteClassificator()
|
Method Summary | |
---|---|
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]. |
BitMaskEnumerator |
enumerator()
BitMask enumeration. |
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()
BitMask re-initialization (keeps current bitmask size - if the size
is relevant). |
void |
init(int x,
int y)
BitMask (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 |
setHLine(int x1,
int x2,
int y)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y]. |
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, commit, doubleProperty, doubleProperty, doubleProperty, enumProperty, floatProperty, floatProperty, floatProperty, get, intProperty, intProperty, intProperty, longProperty, longProperty, longProperty, set, set, stringProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.jagrlib.iface.Property |
---|
commit, get, set |
Field Detail |
---|
protected int[] color
protected int[] aColor
protected int bands
RasterGraphics
.
protected int width
protected int height
protected RasterGraphics image
protected static final java.lang.String TEMPLATE_NAME
protected static final java.lang.String CATEGORY
public static final RegPiece reg
Constructor Detail |
---|
public OverwriteClassificator()
Method Detail |
---|
public void init(int x, int y)
BitMask
(re-)initialization.
init
in interface BitMaskCore
x
- Width of a new bitmask.y
- Height of a new bitmask.public void init()
BitMask
re-initialization (keeps current bitmask size - if the size
is relevant).
init
in interface BitMaskCore
public int setOperation(int _op)
set*()
methods).
setOperation
in interface BitMask
_op
- Binary set operation (BinaryOperation.BIN_OP_*
constant).
Binary operations
public void setPixel(int x, int y)
true
= "painted".
Accepts current binary set operation.
setPixel
in interface BitMaskCore
x
- X coordinate of a pixel.y
- Y coordinate of a pixel.public void putPixel(int x, int y, boolean value)
putPixel
in interface BitMask
x
- 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 BitMaskCore
x
- X coordinate of a pixel.y
- Y coordinate of a pixel.
false
for off-canvas access).public void setHLine(int x1, int x2, int y)
setHLine
in interface BitMaskCore
x1
- 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 BitMask
x1
- 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 BitMask
x1
- 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 BitMask
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).public void putRectangle(int x1, int y1, int x2, int y2, boolean[][] values)
putRectangle
in interface BitMask
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).values
- New pixels' values.public void getRectangle(int x1, int y1, int x2, int y2, boolean[][] values)
getRectangle
in interface BitMask
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).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 BitMask
dx
- 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
BitMaskEnumerator
object instance.public static int setTemplate(Template t, int ord)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |