abbottjord94 / AgSwift

AgSwift library and GUI
0 stars 0 forks source link

Add project and image scale #43

Open abbottjord94 opened 3 years ago

abbottjord94 commented 3 years ago

Add a scale factor to the project and for each image, so that they'll appear at the appropriate size.

For example,

First image imported has a scale of 1 in = 20 ft. Since the images are imported at 96 DPI (dots per pixel inch), we can assume that 1 in = 96 pixels, thus 20 ft = 96 pixels. All measurements are currently in pixel values, so scale conversion for cut/fill measurements can be done on the calculation measurement (i.e., no need to convert pixel values to feet relative to another point)

If the first image imported has a scale of 1 in = 20 ft, and a second imported image has a scale factor of 1 in = 10 ft, then the second image should half the size (in pixels) of the first image. This will ensure that points drawn over that image will scale appropriately.