g.js — graphical objects for JavaScript

centerPointcenterPoint

Calculate the geometric center point of a shape.

var e = g.ellipse({x: 0, y: 0}, 100, 100);
g.centerPoint(e);

Parameters

  • shape: The input shape.