All you really need to do plot your points or draw your lines, using the unit scale and not the pixel scale. For instance if your line goes from 100 to 500, and the number of units on the screen is 1600,1200, the line would go from:
max_unit_x# = 1600 ; the number of units across your screen.
max_pixels_x# = 800 ; the number of pixels wide your screen is
ratio = max_pixels / max_unit_x
Multiply ever co-ord for your line/oval/plot, by the ratio figure. The drawviewport code will translate your unit co-ords back to pixel co-ords onscreen when drawing.
And your very welcome :o)
max_unit_x# = 1600 ; the number of units across your screen.
max_pixels_x# = 800 ; the number of pixels wide your screen is
ratio = max_pixels / max_unit_x
Multiply ever co-ord for your line/oval/plot, by the ratio figure. The drawviewport code will translate your unit co-ords back to pixel co-ords onscreen when drawing.
And your very welcome :o)