|
|
|
@ -1,11 +1,13 @@
|
|
|
|
|
#load "GridPainter.fs" |
|
|
|
|
#load "Validation.fs" |
|
|
|
|
#load "GridPainter.fs" |
|
|
|
|
|
|
|
|
|
open DeathSocket |
|
|
|
|
open System.Drawing |
|
|
|
|
open System |
|
|
|
|
open System.Drawing.Imaging |
|
|
|
|
open Validation |
|
|
|
|
open DeathSocket |
|
|
|
|
|
|
|
|
|
// Initial Idea ============================================================== |
|
|
|
|
// INITIAL IDEA =============================================================== |
|
|
|
|
|
|
|
|
|
// Change the image or its path to suit your purposes. |
|
|
|
|
let img = Bitmap.FromFile (__SOURCE_DIRECTORY__ + "/test-img.jpg") |
|
|
|
@ -25,9 +27,18 @@ let horizontalLine =
|
|
|
|
|
let pen = new Pen (Brushes.Red, width = (float32 (10)) ) |
|
|
|
|
graphics.DrawLine (pen, verticalLine.[0], verticalLine.[1]) |
|
|
|
|
graphics.DrawLine (pen, horizontalLine.[0], horizontalLine.[1]) |
|
|
|
|
let desktop = Environment.GetFolderPath (Environment.SpecialFolder.Desktop) |
|
|
|
|
let savePath = desktop + "/test-grid.png" // Change this to suit you. |
|
|
|
|
img.Save (savePath) |
|
|
|
|
let formSavePath = |
|
|
|
|
let desktop = Environment.GetFolderPath (Environment.SpecialFolder.Desktop) |
|
|
|
|
desktop + "/test-grid.png" // Change this to suit you. |
|
|
|
|
img.Save (formSavePath) |
|
|
|
|
img.Dispose |
|
|
|
|
graphics.Dispose |
|
|
|
|
pen.Dispose |
|
|
|
|
pen.Dispose |
|
|
|
|
|
|
|
|
|
// DEATH SOCKET TESTING ======================================================= |
|
|
|
|
|
|
|
|
|
let desktop = Environment.GetFolderPath (Environment.SpecialFolder.Desktop) |
|
|
|
|
let savePath = desktop + "/test-grid.png" // Change this to suit you. |
|
|
|
|
|
|
|
|
|
// Throws an exception if no file is found. |
|
|
|
|
let validationTest = validateFilePath savePath |