Say I wanted the y distance in pixels between two points but the view is zoomed out. For example if the distance was 100 originally it would be less now that the view has changed.
How would I calculate this new distance?
First I would like to know why you need the exact pixels it would be depending on your view. You should be able to do everything without knowing the actual pixel distance based on the view.
Anyways, first you need to calculate the distance between the two points using the pythagorean theorem (this is how you calculate distance between two points all the time). You can then take that value and assuming that the view is scaled evenly and not rotated multiple the scale factor to the distance and you should get very close to the distance between the two points in screen pixels.