transform to local coordinates before painting to the labeling