Add ellipse support and refector codes.

Change-Id: I13e2126bcc13380be198e4a81862fc563c496ce7