|
|
|
@ -15,6 +15,7 @@ namespace DeathSocket
|
|
|
|
|
|
|
|
|
|
open Validation |
|
|
|
|
open ImageServices |
|
|
|
|
open System |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// Uses the information included in spec to create a gridded image. |
|
|
|
@ -81,18 +82,25 @@ namespace DeathSocket
|
|
|
|
|
let scaleLineThickness (previewDimension: double) (actualDimension: double) (lineThickness: double) = |
|
|
|
|
lineThickness / (previewDimension / actualDimension) |
|
|
|
|
|
|
|
|
|
// NOT TESTED |
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
/// |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="imageType"></param> |
|
|
|
|
let determineImageDimensions imageType = |
|
|
|
|
match imageType with |
|
|
|
|
| SkiaSharp s -> |
|
|
|
|
validateIO s |> ignore |
|
|
|
|
determineSkiaDimensions s |
|
|
|
|
| SystemDrawing d -> |
|
|
|
|
validateIO d |> ignore |
|
|
|
|
determineSystemDrawingDimensions d |
|
|
|
|
try |
|
|
|
|
match imageType with |
|
|
|
|
| SkiaSharp s -> |
|
|
|
|
validateFilePath s |> ignore |
|
|
|
|
determineSkiaDimensions s |
|
|
|
|
| SystemDrawing d -> |
|
|
|
|
validateFilePath d |> ignore |
|
|
|
|
determineSystemDrawingDimensions d |
|
|
|
|
with |
|
|
|
|
| :? FileNotFoundException as ex -> |
|
|
|
|
printfn "%s" ex.Message |
|
|
|
|
(0,0) |
|
|
|
|
|
|
|
|
|
// System.Drawing Functions |
|
|
|
|
// ======================================================================== |
|
|
|
|