forked from plotly/Plotly.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFont.fs
More file actions
51 lines (44 loc) · 1.47 KB
/
Copy pathFont.fs
File metadata and controls
51 lines (44 loc) · 1.47 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
namespace Plotly.NET
/// Font type inherits from dynamic object
type Font () =
inherit DynamicObj ()
/// Init Font()
static member init
(
?Family ,
?Size ,
?Color ,
?Familysrc ,
?Sizesrc ,
?Colorsrc
) =
Font()
|> Font.style
(
?Family = Family ,
?Size = Size ,
?Color = Color ,
?Familysrc = Familysrc ,
?Sizesrc = Sizesrc ,
?Colorsrc = Colorsrc
)
// Applies the styles to Font()
static member style
(
?Family: StyleParam.FontFamily,
?Size,
?Color,
?Familysrc,
?Sizesrc,
?Colorsrc
) =
(fun (font:Font) ->
Family |> DynObj.setValueOptBy font "family" StyleParam.FontFamily.toString
Size |> DynObj.setValueOpt font "size"
Color |> DynObj.setValueOpt font "color"
Familysrc |> DynObj.setValueOpt font "familysrc"
Sizesrc |> DynObj.setValueOpt font "sizesrc"
Colorsrc |> DynObj.setValueOpt font "colorsrc"
// out ->
font
)