| Package | de.popforge.imageprocessing.filters.render |
| Class | public final class CellGenerator |
| Implements | IFilter |
The method behind this filter that can generate a nearly unlimited amount of patterns is very simple. The first row will be filled with random values (on / off) and then for each row there is binary comparison based on the rule.
This filter is based on a technique from toxie^ainc..
Supported formats:
var filter: CellGenerator = new CellGenerator(); var image: Image = new Image( 160, 120, ImageFormat.BINARY ); filter.apply( image );
See also
| Method | Defined by | ||
|---|---|---|---|
|
CellGenerator(randomSeed:int = 0x123, rule:int = 0x81)
Creates a new CellGenerator object.
| CellGenerator | ||
|
Applies the filter to the given Image object.
| CellGenerator | ||
|
toString():String
Builds and returns a string containing the name of the class.
| CellGenerator | ||
| CellGenerator | () | constructor |
public function CellGenerator(randomSeed:int = 0x123, rule:int = 0x81)Creates a new CellGenerator object.
ParametersrandomSeed:int (default = 0x123) — The random seed number to use. If you keep all other parameters the same, you can generate different pseudo-random results by varying the random seed value. The CellGenerator function is a mapping function, not a true random-number generation function, so it creates the same results each time from the same random seed.
|
|
rule:int (default = 0x81) — Can be any value greater zero. A different rule will result in a different pattern even if the randomSeed is the same.
|
| apply | () | method |
public function apply(image:Image):voidApplies the filter to the given Image object.
Parametersimage:Image — The image that will be manipulated.
|
| toString | () | method |
public function toString():StringBuilds and returns a string containing the name of the class.
ReturnsString — A string containing the name of the class.
|