Take mapToPixel as pointer (null pointer means don't apply pixel transform