Implemented ellipse drawing [C++ API]

Implemented ellipse drawing for the C++ API
Added fflush when writing messages to avoid caching issues on some operating systems