Patch the transformations order to place and scale the ruler
The transformations are applied from the end of the array. Putting the scaling factor before the translation for the ruler_offset make the 0,0 point of the ruler stable on scale change (otherwise, the 0,0 point being moved by the ruler_offset value, it's position change on scale change)