copied files from cross-platform-shapes