diff --git a/SmoulderingBeachBall/Domain.fs b/SmoulderingBeachBall/Domain.fs index 286c5d8..d1687bc 100644 --- a/SmoulderingBeachBall/Domain.fs +++ b/SmoulderingBeachBall/Domain.fs @@ -1,18 +1,34 @@ namespace SmoulderingBeachBall.Domain [] + /// A collection of types used to describe a Smouldering Beach Ball image. module DomainTypes = open System.Drawing + /// + /// The type of overly the image should have. + /// Border creates a border around the base image. + /// Full creates a border and a 'X' over the base image. + /// type OverlayType = | Border | Full + /// + /// The specification for the overlay. + /// You define the overlays colour and overlay type here. + /// type OverlaySpec = { colour: Brush; overlayType: OverlayType } - + + /// + /// The specification for the whole image. + /// Set the width, height, colour, save location and overlay here. + /// The overlay requires an OverlaySpec if an overlay is desired. + /// To create an image without an overlay, just use 'None'. + /// type ImageSpec = { width: int; height: int; diff --git a/SmoulderingBeachBall/Services.fs b/SmoulderingBeachBall/Services.fs index f394b55..c42b148 100644 --- a/SmoulderingBeachBall/Services.fs +++ b/SmoulderingBeachBall/Services.fs @@ -1,5 +1,6 @@ namespace SmoulderingBeachBall +/// Provides the public facing functions of Smouldering Beach Ball. module Services = open System @@ -7,6 +8,12 @@ module Services = open InternalServices.Validation open InternalServices.Drawing + /// + /// Creates an image using the specification provided by the ImageSpec. + /// + /// + /// The image specification which describes how the image should look. + /// let makeImage (spec: ImageSpec) = async { try