updated for OpenFL
renamed to rectangle converter class and fixed processing for OpenFL