excelizer v0.1.2 Excelizer.Style.Fill
module to manage a struct about filling
Link to this section Summary
Functions
convert Fill struct to json
Link to this section Types
Link to this type
pattern()
Specs
pattern() :: 0..18
type for filling pattern
Index | Style | Index | Style -------+-----------------+-------+----------------- 0 | None | 10 | darkTrellis 1 | solid | 11 | lightHorizontal 2 | mediumGray | 12 | lightVertical 3 | darkGray | 13 | lightDown 4 | lightGray | 14 | lightUp 5 | darkHorizontal | 15 | lightGrid 6 | darkVertical | 16 | lightTrellis 7 | darkDown | 17 | gray125 8 | darkUp | 18 | gray0625 9 | darkGrid | |
Link to this type
shading()
Specs
shading() :: :horizontal | :vertical | :diagonal_up | :diagonal_down | :from_corner | :from_center
type for shading pattern
Specs
t() :: %Excelizer.Style.Fill{ color: [String.t()], pattern: pattern(), shading: shading(), type: String.t() | nil }
type for filling style
Link to this section Functions
Link to this function
convert_to_map(data)
Specs
convert Fill struct to json
Example
iex> convert_to_map(%Excelizer.Style.Fill{shading: :horizontal})
%{color: [], pattern: 0, shading: 0, type: nil}
iex> convert_to_map(%Excelizer.Style.Fill{shading: :vertical})
%{color: [], pattern: 0, shading: 1, type: nil}
iex> convert_to_map(%Excelizer.Style.Fill{shading: :diagonal_up})
%{color: [], pattern: 0, shading: 2, type: nil}
iex> convert_to_map(%Excelizer.Style.Fill{shading: :diagonal_down})
%{color: [], pattern: 0, shading: 3, type: nil}
iex> convert_to_map(%Excelizer.Style.Fill{shading: :from_corner})
%{color: [], pattern: 0, shading: 4, type: nil}
iex> convert_to_map(%Excelizer.Style.Fill{shading: :from_center})
%{color: [], pattern: 0, shading: 5, type: nil}