add getMidX and getMidY and assume canonicalized