ruler tick drawing + real calculation