using rounded dimension instead of getDimensionPixelOffset