Enable text based alternatives for graph display and drawing entry

Try another version of this question

Write the polynomial that represents the perimeter of the figure pictured below.

12x2x4x19x22[Graphs generated by this script: initPicture(-10,19+10,-10,12+10);path([[0,0],[0,12],[2,12],[2,4],[19,4],[19,0],[0,0]]);text([0,6],'12x','left');text([1,12],'2x','above');text([19,2],'4x','right');text([9.5,0],'19x','below');text([1+2.1,12+5.25],'2','below');text([9.5+2.9,.5],'2','below');]

Perimeter =