Fix issues with rounded corner.
Deal with flipped origin.
Update sample