diff --git a/DeathSocket/GridPainter.fs b/DeathSocket/GridPainter.fs index e55197a..198b44c 100644 --- a/DeathSocket/GridPainter.fs +++ b/DeathSocket/GridPainter.fs @@ -15,7 +15,6 @@ namespace DeathSocket open Validation open ImageServices - open System /// /// Uses the information included in spec to create a gridded image. @@ -30,7 +29,7 @@ namespace DeathSocket /// If the file the grid is being applied to cannot be found, /// a FileNotFoundException will be thrown. /// - /// /// Make sure the image, which is having the overlay added to it, /// is not in use or needed by another program/process. /// This is because it is locked whilst in this function. @@ -54,7 +53,33 @@ namespace DeathSocket with | :? FileNotFoundException as ex -> printfn "File could not be found at %s" ex.Message - } + } + + // NOT TESTED + + /// + /// Takes an image and determines the current scale it is viewed at + /// (E.G. scaled preview in image viewer). The (pen) line thickness is + /// then updated to match this preview scale and can be used when + /// drawing a grid line on the scaled preview of the image. + /// + /// + /// The width of the image when previewed (I.E. in a GUI). + /// + /// + /// The width of the actual image. + /// + /// + /// The thickness of the pen used to draw the grid line. + /// + /// + /// You should find you only need this function when dealing with + /// previewing an image in a GUI. Another thing to note is the + /// SkiaSharp based functions already scale the grid lines for you. So, + /// you should not need to use this function when using them. + /// + let scaleLineThickness (previewWidth: double) (actualWidth: double) (lineThickness: double) = + lineThickness / (previewWidth / actualWidth) // System.Drawing Functions // ========================================================================