2using System.Threading.Tasks;
71 int Width = Pixels.
Width;
72 int Height = Pixels.
Height;
74 byte[] Bin = (
byte[])Raw.
Binary.Clone();
75 int i, j, c = Bin.Length / 4;
76 double[] R =
new double[c];
77 double[] G =
new double[c];
78 double[] B =
new double[c];
79 double[] A =
new double[c];
81 for (i = j = 0; i < c; i++)
89 (
double[] BoundaryR,
double[] BoundaryG,
double[] BoundaryB,
double[] BoundaryA) =
92 await
FractalGraph.
Smooth(R, G, B, A, BoundaryR, BoundaryG, BoundaryB, BoundaryA, Width, Height,
this,
Variables);
Script runtime exception.
Class managing a script expression.
Defines a clickable fractal graph in the complex plane.
static async Task Smooth(double[] ColorIndex, double[] Boundary, int Width, int Height, int N, SKColor[] Palette, ScriptNode Node, Variables Variables)
TODO
static PixelInformation ToPixels(double[] ColorIndex, int Width, int Height, SKColor[] Palette)
TODO
static double[] FindBoundaries(double[] ColorIndex, int Width, int Height)
TODO
Creates a smooth image from an image source.
override string FunctionName
Name of the function
SmoothImage(ScriptNode Argument, int Start, int Length, Expression Expression)
Creates a smooth image from an image source.
override IElement Evaluate(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override string[] DefaultArgumentNames
Default Argument names
override async Task< IElement > EvaluateScalarAsync(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Handles bitmap-based graphs.
PixelInformation CreatePixels()
Creates a bitmap of the graph.
Base class for funcions of one scalar variable.
override async Task< IElement > EvaluateAsync(IElement Argument, Variables Variables)
Evaluates the function.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
int Length
Length of expression covered by node.
int Start
Start position in script expression.
Basic interface for all types of elements.