added drawing rotation to the lib