Allow reusability of ruler marker drawing code.