Bug 952235 - Handle device offset when applying pattern transform. r=bas