Death Socket consists of three projects. They are a .Net Standard 2.0 library, a console program and a Test Centre. The purpose of this repository is to provide a way for people to add grids to images.
https://www.craigoates.net/Software/project/13
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
721 B
24 lines
721 B
module internal ColourServices |
|
|
|
open System.Drawing |
|
open DeathSocket.Domain |
|
open System |
|
open SkiaSharp |
|
|
|
let makeBrushFromRGBASpec (spec: RGBASpec) = |
|
let a = int spec.alpha |
|
let r = int spec.red |
|
let g = int spec.green |
|
let b = int spec.blue |
|
let colour = Color.FromArgb (a, r, g, b) |
|
new SolidBrush (colour) |
|
|
|
let makeBrushFromRGBA r g b a = |
|
let colour = Color.FromArgb (a, r, g, b) |
|
new SolidBrush (colour) |
|
|
|
let makeSkiaColour r g b = |
|
let red = BitConverter.GetBytes (int r) |
|
let green = BitConverter.GetBytes (int g) |
|
let blue = BitConverter.GetBytes (int b) |
|
new SKColor (red.[0], green.[0], blue.[0]) |