|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcz.cuni.jagrlib.piece.PolygonScanline.Supersampler
protected static class PolygonScanline.Supersampler
Temporary rendering target for super-sampling.
Flushes finished hlines to attached AlphaMask
.
Uses PE's linear super-sampling buffer.
Field Summary | |
---|---|
protected double |
areaCoef
Pixel area multiplier (accelerator). |
protected int[] |
buffer
Linear ss-buffer. |
protected static int |
BUFFER_GRANUL
Buffer granularity (to reduce memory allocations). |
protected static BitMaskEnumerator |
ENUM
Useless enumerator singleton. |
protected AlphaMask |
output
Anti-aliased output. |
protected int |
supersampling
Supersampling factor (accelerator). |
protected int |
xMax
Right buffer coordinate. |
protected int |
xMin
Left buffer coordinate ( supersampling -multiple). |
protected int |
yMin
Upper buffer coordinate ( supersampling -multiple). |
Constructor Summary | |
---|---|
PolygonScanline.Supersampler(int superSampling,
AlphaMask aMask)
|
Method Summary | |
---|---|
BitMaskEnumerator |
enumerator()
Bit-mask enumeration. |
void |
flushBuffer()
Flushes unwritten data to attached AlphaMask . |
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". |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int BUFFER_GRANUL
protected final int supersampling
protected final double areaCoef
protected final AlphaMask output
protected int[] buffer
protected int xMin
supersampling
-multiple).
protected int xMax
protected int yMin
supersampling
-multiple).
protected static final BitMaskEnumerator ENUM
Constructor Detail |
---|
public PolygonScanline.Supersampler(int superSampling, AlphaMask aMask)
Method Detail |
---|
public void flushBuffer()
AlphaMask
.
public void init(int x, int y)
init
in interface BitMaskCore
x
- Width of a new bitmask.y
- Height of a new bitmask.public void init()
init
in interface BitMaskCore
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 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 BitMaskEnumerator enumerator()
enumerator
in interface BitMaskCore
BitMaskEnumerator
object instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |