Browse Source

add comments and remove unused code.

master
Craig Oates 5 years ago
parent
commit
72d7fc40aa
  1. 19
      DeathSocket/GridPainter.fs
  2. 6
      DeathSocket/ScratchPad.fsx
  3. 1
      TestCentre/LibraryTests.fs

19
DeathSocket/GridPainter.fs

@ -17,7 +17,24 @@ namespace DeathSocket
open ImageServices
open System
// Not tested
/// <summary>
/// Uses the information included in spec to create a gridded image.
/// It then asynchronously saves it. Uses .jpg or .png formats only.
/// </summary>
/// <param name="spec">
/// The specification used to generate the new gridded image. The
/// ImageSpec is a discriminated union, consisting of a Brush, RGBA,
/// Skia or SkiaRGB spec.
/// </param>
/// <exeption cref="System.IO.FileNotFoundException">
/// If the file the grid is being applied to cannot be found,
/// a FileNotFoundException will be thrown.
/// </exception>
/// <remarks
/// 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.
/// </remarks>
let applyGridToImageAsync (spec: ImageSpec) =
async {
try

6
DeathSocket/ScratchPad.fsx

@ -1,6 +1,6 @@
#r @"C:/Users/craig/.nuget/packages/skiasharp/1.60.3/lib/netstandard1.3/SkiaSharp.dll"
// These two paths need adjusting to match your computer.
#r @"C:/Users/craig/.nuget/packages/skiasharp/1.60.3/lib/netstandard1.3/SkiaSharp.dll"
#r @"C:/Users/craig/.nuget/packages/skiasharp/1.60.3/lib/net45/SkiaSharp.dll"
#r @"C:/Users/craig/.nuget/packages/skiasharp/1.60.3/lib/Xamarin.Mac20/SkiaSharp.dll"
#load "Domain.fs"
#load "Validation.fs"
@ -83,4 +83,4 @@ SkiaRGB ({ originalPath = desktop + "/test.jpg"
rows = 10
columns = 10})
|> GridPainter.applyGridToImageAsync
|> Async.RunSynchronously
|> Async.Start

1
TestCentre/LibraryTests.fs

@ -102,7 +102,6 @@
open FsCheck.Xunit
open DeathSocket
open System.Drawing
open DeathSocket
open DeathSocket.GridPainter
open TestingHelpers
open System.IO

Loading…
Cancel
Save