namespace DeathSocket /// The domain types used by Death Socket. [] module Domain = open System.Drawing open SkiaSharp /// The specification used to note the orignial file's location and the /// changes the user would like to make to it. (including the save /// location of the modified version). Use this spec if you are using /// System.Drawing. type BrushSpec = { /// The original path of the image which the grid is being added to. originalPath: string /// The location of the new gridded image. savePath: string /// The (System.Drawing) brush used to draw the grid. /// This determines the colour of the grid. colour: Brush /// The thickness of the line on the grid. penWidth: float32 /// The number of rows the grid will have. rows: int ///The number of columns the grid will have. columns: int } /// The specification used to note the orignial file's location and the /// changes the user would like to make to it (including the save /// location of the modified version). This specification includes /// individual RGBA values to describe the grid's colour. Use this spec. /// if you are using System.Drawing. type RGBASpec = { /// The original path of the image which the grid is being added to. originalPath: string /// The location of the new gridded image. savePath: string /// The opacity level of the grid. /// 0 makes it completely see through and 1 makes it solid. alpha: float /// The amount of red the grid's line will have. red: float /// The amount of green the grid's line will have. green: float /// The amount of blue the grid's line will have. blue: float /// The thickness of the line on the grid. penWidth: float32 /// The number of rows the grid will have. rows: int ///The number of columns the grid will have. columns: int } /// The specification used to note the orignial file's location and the /// changes the user would like to make to it (including the save /// location of the modified version). Use this spec. if you are using /// the Skia-Sharp library. type SkiaSpec = { /// The original path of the image which the grid is being added to. originalPath: string /// The location of the new gridded image. savePath: string /// The (SkiaSharp) colour used to draw the grid. skColour: SKColor /// The thickness of the line on the grid. penWidth: float32 /// The number of rows the grid will have. rows: int ///The number of columns the grid will have. columns: int } /// The specification used to note the orignial file's location and the /// changes the user would like to make to it (including the save /// location of the modified version). This specification includes /// individual RGB values to describe the grid's colour. Use this spec. /// if you are using the Skia-Sharp library. type SkiaRGBSpec = { /// The original path of the image which the grid is being added to. originalPath: string /// The location of the new gridded image. savePath: string /// The amount of red (RGB) the grid's line will have. /// (0 = no red, 255 = red turned up to eleven). red: float32 /// The amount of green (RGB) the grid's line will have. /// (0 = no green, 255 = green turned up to eleven). green: float32 /// The amount of blue (RGB) the grid's line will have. /// (0 = no blue, 255 = blue turned up to eleven). blue: float32 /// The thickness of the line on the grid. penWidth: float32 /// The number of rows the grid will have. rows: int ///The number of columns the grid will have. columns: int } /// Discriminated Union representing the various specification types /// Death Socket can use to apply a grid to an image. type ImageSpec = | Brush of BrushSpec | RGBA of RGBASpec | Skia of SkiaSpec | SkiaRGB of SkiaRGBSpec