Browse Source

remove excess code.

master
Craig Oates 6 years ago
parent
commit
74c30f216d
  1. 17
      SmoulderingBeachBall/ImageMaker.fs
  2. 9
      SmoulderingBeachBall/ScratchPad.fsx

17
SmoulderingBeachBall/ImageMaker.fs

@ -32,23 +32,6 @@ module ImageMaker =
| false -> invalidArg "filePath" "Unable to save to the specified location because it does not exist."
| true -> ()
// This function is to be deleted.
let makeImageBase width height colour filepath =
async {
try
validateDimension width
validateDimension height
validateDirectory filepath
use bitmap = new Bitmap(width, height)
use graphics = Graphics.FromImage(bitmap)
graphics.FillRectangle(colour, new Rectangle(0, 0, bitmap.Width, bitmap.Height))
bitmap.Save(filepath)
return "Image saved."
with
| :? ArgumentException as ex -> return ex.Message
| _ as ex -> return ex.Message
}
let private penOffset penWidth = int (penWidth / (float32 2))
let private createBorderPath penWidth spec =

9
SmoulderingBeachBall/ScratchPad.fsx

@ -20,15 +20,6 @@ let draw () =
// IMAGE MAKER ========================================================================================================
let im_width = 500
let im_height = 500
let im_colour = Brushes.BurlyWood
let im_testPath = "C:/users/craig/desktop/test.png"
ImageMaker.makeImageBase im_width im_height im_colour im_testPath
|> Async.RunSynchronously
let borderOverlay =
{ colour = Brushes.BlueViolet;
overlayType = Border }

Loading…
Cancel
Save