-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathFont.fs
More file actions
34 lines (26 loc) · 1.05 KB
/
Copy pathFont.fs
File metadata and controls
34 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace Plotly.NET
open System.Runtime.InteropServices
open DynamicObj
/// Font type inherits from dynamic object
type Font() =
inherit DynamicObj()
/// Init Font()
static member init
(
[<Optional; DefaultParameterValue(null)>] ?Family: StyleParam.FontFamily,
[<Optional; DefaultParameterValue(null)>] ?Size: float,
[<Optional; DefaultParameterValue(null)>] ?Color: Color
) =
Font() |> Font.style (?Family = Family, ?Size = Size, ?Color = Color)
// Applies the styles to Font()
static member style
(
[<Optional; DefaultParameterValue(null)>] ?Family: StyleParam.FontFamily,
[<Optional; DefaultParameterValue(null)>] ?Size: float,
[<Optional; DefaultParameterValue(null)>] ?Color: Color
) =
(fun (font: Font) ->
Family |> DynObj.setValueOptBy font "family" StyleParam.FontFamily.toString
Size |> DynObj.setValueOpt font "size"
Color |> DynObj.setValueOpt font "color"
font)