Fix #2530941
Merge branch 'trac2530941' into trac2533080

Merge trac2530941 into trac2533089
Break out common drawing functionality into DrawingBase class for easier maintainability.
First pass at generating path data from drawing commands. (WIP)