|
|
|
@ -6,6 +6,7 @@
|
|
|
|
|
#load "Domain.fs" |
|
|
|
|
#load "ValidationServices.fs" |
|
|
|
|
#load "ColourServices.fs" |
|
|
|
|
#load "ImagePrep.fs" |
|
|
|
|
#load "ImageServices.fs" |
|
|
|
|
#load "GridPainter.fs" |
|
|
|
|
|
|
|
|
@ -13,6 +14,7 @@ open System
|
|
|
|
|
open System.Drawing |
|
|
|
|
open SkiaSharp |
|
|
|
|
open ValidationServices |
|
|
|
|
open ImagePrep |
|
|
|
|
open ImageServices |
|
|
|
|
open DeathSocket |
|
|
|
|
|
|
|
|
@ -41,33 +43,13 @@ let skVerticalLines = createSKVerticalLines 120 450 22
|
|
|
|
|
(* You will need to provide the image and specify its load/save location. |
|
|
|
|
Death Socket assumes either JPEG or PNG files.*) |
|
|
|
|
|
|
|
|
|
// Internal function call. Not accessible outside this project. |
|
|
|
|
let skiaSharpDimensions = |
|
|
|
|
determineSkiaDimensions (desktop + "/test.jpg") |
|
|
|
|
|
|
|
|
|
// Internal function call. Not accessible outside this project. |
|
|
|
|
let systemDrawingDimensions = |
|
|
|
|
determineSystemDrawingDimensions (desktop + "/test.jpg") |
|
|
|
|
|
|
|
|
|
// Internal function calls. Not accessible outside this project. |
|
|
|
|
let width = double (fst skiaSharpDimensions) |
|
|
|
|
let width2 = double (fst systemDrawingDimensions) |
|
|
|
|
|
|
|
|
|
// Internal function calls. Not accessible outside this project. |
|
|
|
|
let height = double (snd skiaSharpDimensions) |
|
|
|
|
let height2 = double (snd systemDrawingDimensions) |
|
|
|
|
|
|
|
|
|
// Public function for the internal ones above. |
|
|
|
|
let dimensions = |
|
|
|
|
//SkiaSharp (desktop + "/test.jpg") |
|
|
|
|
SystemDrawing (desktop + "/test.jpg") |
|
|
|
|
|> GridPainter.determineImageDimensions |
|
|
|
|
|
|
|
|
|
let width3 = fst dimensions |
|
|
|
|
let height3 = snd dimensions |
|
|
|
|
|
|
|
|
|
// Change the line thickness (the last parameter) to whatever you want. |
|
|
|
|
let scaledPen = GridPainter.scaleLineThickness width height 8.0 |
|
|
|
|
let scaledPen = GridPainter.scaleLineThickness (100, 100) dimensions 8.0 |
|
|
|
|
|
|
|
|
|
// Brush Specification (uses System.Drawing) |
|
|
|
|
Brush ({ originalPath = desktop + "/test.jpg" |
|
|
|
|