-
Notifications
You must be signed in to change notification settings - Fork 2
Polygon Geom
Jason Davies edited this page Oct 9, 2014
·
3 revisions
Wiki ▸ API Reference ▸ Geometry ▸ Polygon Geom
# d3.geom.polygon(vertices)
Returns the input array of vertices with additional methods attached, as described below.
# polygon.area()
Returns the signed area of this polygon. If the vertices are in counterclockwise order, the area is positive, otherwise it is negative.
# polygon.centroid()
Returns a two-element array representing the centroid of this polygon.
# polygon.clip(subject)
Clips the subject polygon against this polygon. In other words, returns a polygon representing the intersection of this polygon and the subject polygon. Assumes the clip polygon is counterclockwise and convex.
- Arrays
- Eixos
- Brushes
- Chords
- Cores
- Esquema de cores
- Valores separados por delimitador
- Dispatches
- Arrastando
- Easings
- Fetches
- Forças
- Geografias
- Hierarquias
- Interpoladores
- Formatos numéricos
- Paths
- Polígonos
- Quadtrees
- Números aleatórios
- Escalas
- Seleções
- Formas
- Formatos de hora
- Intervalos de tempo
- Temporizadores
- Transições
- Diagramas de Voronoi
- Zoom