KonturData<'T> Type
A Kontur together with one value of type 'T for every point of every path, for tracking where the vertices of a boolean result come from. Data.[p].[i] belongs to Kontur.Paths.[p].Points.[i]. Like its Polyline2D, each array has the closing point too: its last item belongs to the repeated first point. The engine reads only the first item for that point, and writes the same value to both ends of a result array. The values can be anything: an index into the caller's own tables, a height, a color, a reference to an object. KonturEngine.ExecuteWithData hands the value of every input point on to the result vertex it becomes, and calls a function of the caller for every new vertex where two segments cross. Like a Kontur, a KonturData does not copy the arrays it is given.
Instance members
| Instance member |
Description
|
Full Usage:
this.AsString
Returns: string
|
Format this KonturData into a string with its Kontur.
|
Full Usage:
this.Data
Returns: ResizeArray<'T[]>
|
One array of values per path of the Kontur, with one value per point of that path, the closing point included. This is the live internal list.
|
|
The Kontur the values belong to.
|
Static members
| Static member |
Description
|
Full Usage:
KonturData.create (kontur, data)
Parameters:
Kontur
-
The Kontur the values belong to.
data : 'T[] seq
-
One array per path of the Kontur, each with one value per point of its Polyline2D, the closing point included.
The value of the closing point is not used, the value of the first point stands for both.
Returns: KonturData<'T>
A new KonturData.
|
Creates a KonturData from a Kontur and one array of values per path. The list is copied, the arrays are not.
|
Full Usage:
KonturData.createSingleton (path, data, ?fillRule)
Parameters:
Polyline2D
-
The closed Polyline2D. It must have its first point repeated as last point and at least three distinct points.
data : 'T[]
-
One value per point of the Polyline2D, the closing point included.
The value of the closing point is not used, the value of the first point stands for both.
?fillRule : FillRule
-
Optional, FillRule.NonZero by default. How the winding number decides what is inside.
Returns: KonturData<'T>
A new KonturData with one path.
|
Creates a KonturData from one closed path and its values.
|
Full Usage:
KonturData.init (kontur, valueOf)
Parameters:
Kontur
-
The Kontur the values belong to.
valueOf : int -> int -> 'T
-
Gets the index of the path in kontur.Paths and the index of the point in its Polyline2D and returns the value of that point.
Returns: KonturData<'T>
A new KonturData.
|
Creates a KonturData by calling a function for every point of every path. The closing point of each path gets the value of its first point, the function is not called for it.
|
Euclid.Kontur