|
|
|
@ -5,7 +5,6 @@
|
|
|
|
|
|
|
|
|
|
open System.Drawing |
|
|
|
|
open System |
|
|
|
|
open System.Drawing.Imaging |
|
|
|
|
open DeathSocket |
|
|
|
|
open Domain |
|
|
|
|
open Validation |
|
|
|
@ -43,13 +42,22 @@ pen.Dispose
|
|
|
|
|
// DEATH SOCKET TESTING ======================================================= |
|
|
|
|
|
|
|
|
|
let desktop = Environment.GetFolderPath (Environment.SpecialFolder.Desktop) |
|
|
|
|
let savePath = desktop + "/1000x1000.png" // Change this to suit you. |
|
|
|
|
let testSavePath = desktop + "/1000x1000.png" // Change this to suit you. |
|
|
|
|
let testImagePath = __SOURCE_DIRECTORY__ + "/1000x1000.png" |
|
|
|
|
|
|
|
|
|
let testImg = Bitmap.FromFile (__SOURCE_DIRECTORY__ + "/1000x1000.png") |
|
|
|
|
|
|
|
|
|
// Throws an exception if no file is found. |
|
|
|
|
let validationTest = validateFilePath savePath |
|
|
|
|
let validationTest = validateFilePath testSavePath |
|
|
|
|
let horizontalLines = |
|
|
|
|
createHorizontalLines (testImg.Size.Width) (testImg.Size.Height) 10 |
|
|
|
|
let verticalLines = |
|
|
|
|
createVerticalLines (testImg.Size.Width) (testImg.Size.Height) 10 |
|
|
|
|
createVerticalLines (testImg.Size.Width) (testImg.Size.Height) 10 |
|
|
|
|
let spec = |
|
|
|
|
{ filePath = testImagePath |
|
|
|
|
savePath = testSavePath |
|
|
|
|
colour = Brushes.Red |
|
|
|
|
penWidth = float32 (10) |
|
|
|
|
rows = 10 |
|
|
|
|
columns = 10 } |
|
|
|
|
GridPainter.applyGridToImage spec |