Forked from https://code.google.com/p/tkgeometry/ , code license: GPL v3