|
|
|
@ -52,15 +52,6 @@
|
|
|
|
|
} |
|
|
|
|
spec |
|
|
|
|
|
|
|
|
|
let buildBasicSpec iWidth iHeight mainColour path = |
|
|
|
|
let spec = |
|
|
|
|
{ width = iWidth; |
|
|
|
|
height = iHeight; |
|
|
|
|
colour = parseColour mainColour |
|
|
|
|
filePath = parsePath path |
|
|
|
|
overlay = None } |
|
|
|
|
spec |
|
|
|
|
|
|
|
|
|
let parseOverlay (oType: string) = |
|
|
|
|
match oType.ToLower() with |
|
|
|
|
| "border" -> Border |
|
|
|
@ -69,17 +60,26 @@
|
|
|
|
|
| "f" -> Full |
|
|
|
|
| _ -> invalidArg "Overlay Type" "The overlay type must be either 'border' or 'full'." |
|
|
|
|
|
|
|
|
|
// Need to think about building the two spec's seperately and bring them together in one place. |
|
|
|
|
// I'm repeating myself a little too much here. |
|
|
|
|
// Also, need to adjust pen width to match the image size (in library proj.). |
|
|
|
|
let buildOverlaySpec iWidth iHeight mainColour oColour oType path = |
|
|
|
|
let buildOverlaySpec oColour (oType: string) = |
|
|
|
|
let oSpec = |
|
|
|
|
{ colour = parseColour oColour; |
|
|
|
|
overlayType = parseOverlay oType } |
|
|
|
|
oSpec |
|
|
|
|
|
|
|
|
|
let buildMainSpec iWidth iHeight mainColour path oSpec = |
|
|
|
|
let spec = |
|
|
|
|
{width = iWidth; |
|
|
|
|
height = iHeight; |
|
|
|
|
colour = parseColour mainColour; |
|
|
|
|
filePath = parsePath path; |
|
|
|
|
overlay = Some oSpec } |
|
|
|
|
spec |
|
|
|
|
{ width = iWidth; |
|
|
|
|
height = iHeight; |
|
|
|
|
colour = parseColour mainColour |
|
|
|
|
filePath = parsePath path |
|
|
|
|
overlay = oSpec } |
|
|
|
|
spec |
|
|
|
|
|
|
|
|
|
let buildSpec iWidth iHeight mainColour oColour (oType: string) path = |
|
|
|
|
let spec = |
|
|
|
|
match oType.ToLower() with |
|
|
|
|
| "none" | "n" -> buildMainSpec iWidth iHeight mainColour path option.None |
|
|
|
|
| _ -> |
|
|
|
|
let oSpec = buildOverlaySpec oColour oType |
|
|
|
|
buildMainSpec iWidth iHeight mainColour path (Some oSpec) |
|
|
|
|
spec |
|
|
|
|