public class Voronoi
extends com.google.gwt.core.client.JavaScriptObject
| Modifier | Constructor and Description |
|---|---|
protected |
Voronoi() |
| Modifier and Type | Method and Description |
|---|---|
<T> Array<T> |
apply(Array<T> vertices)
Returns an array of polygons, one for each input vertex in the specified
data array.
|
Voronoi |
clearClipExtent()
Clear the extent clipping.
|
Array<Array<Double>> |
clipExtent()
Get the current clip extent which defaults to null.
|
Voronoi |
clipExtent(int x0,
int y0,
int x1,
int y1)
Sets the clip extent of the Voronoi layout to the specified bounds and
returns the layout.
|
Array<Link> |
links(Array<?> nodes)
TODO: make a demo from http://bl.ocks.org/mbostock/1073373 TODO:
documentation
|
Array<Link> |
triangles(Array<?> nodes)
TODO: make a demo from http://bl.ocks.org/mbostock/1073373 TODO:
documentation
|
Voronoi |
x(DatumFunction<Double> xAccessor)
Sets the x-coordinate accessor.
|
Voronoi |
y(DatumFunction<Double> yAccessor)
Sets the y-coordinate accessor.
|
public final Voronoi clipExtent(int x0, int y0, int x1, int y1)
Use of a clip extent is strongly recommended, as unclipped polygons may have large coordinates which do not display correctly.
Alternatively, you can also employ custom clipping without specifying a
size, either in SVG or by post-processing with
Polygon.clip(Array).
To clear the clipping, see clearClipExtent()
x0 - the left side of the extenty0 - the top side of the extentx1 - the right side of the extenty1 - the bottom side of the extentpublic final Voronoi clearClipExtent()
public final Array<Array<Double>> clipExtent()
public final <T> Array<T> apply(Array<T> vertices)
If any vertices are coincident or have NaN positions, the behavior of this method is undefined: most likely, invalid polygons will be returned! You should filter invalid vertices, and consolidate coincident vertices, before computing the tessellation.
vertices - the array of verticespublic final Voronoi x(DatumFunction<Double> xAccessor)
The default accessor consider datum as a two element array and returns the first element.
xAccessor - the x accessorpublic final Voronoi y(DatumFunction<Double> yAccessor)
The default accessor consider datum as a two element array and returns the first element.
yAccessor - the y accessorpublic final Array<Link> links(Array<?> nodes)
Copyright © 2015 gwt-d3. All rights reserved.