bug fix: when pattern had non-integer width or height it was rendered incorrectly