Correctly calculate the height to point factor and the scale factor for outline drawing

The changed implementation works in the same way as the JUCE one.