… | |
… | |
82 | if (len != 1 && len != 3 && len != 4) |
82 | if (len != 1 && len != 3 && len != 4) |
83 | croak ("component colour array must have 1, 3 or 4 components,"); |
83 | croak ("component colour array must have 1, 3 or 4 components,"); |
84 | |
84 | |
85 | c.a = rgba::MAX_CC; |
85 | c.a = rgba::MAX_CC; |
86 | |
86 | |
87 | c.r = c.g = c.b = float_to_component (SvIV (*av_fetch (av, 0, 0))); |
87 | c.r = c.g = c.b = float_to_component (SvNV (*av_fetch (av, 0, 0))); |
88 | |
88 | |
89 | if (len >= 3) |
89 | if (len >= 3) |
90 | { |
90 | { |
91 | c.g = float_to_component (SvIV (*av_fetch (av, 1, 0))); |
91 | c.g = float_to_component (SvNV (*av_fetch (av, 1, 0))); |
92 | c.b = float_to_component (SvIV (*av_fetch (av, 2, 0))); |
92 | c.b = float_to_component (SvNV (*av_fetch (av, 2, 0))); |
93 | |
93 | |
94 | if (len >= 4) |
94 | if (len >= 4) |
95 | c.a = float_to_component (SvIV (*av_fetch (av, 3, 0))); |
95 | c.a = float_to_component (SvNV (*av_fetch (av, 3, 0))); |
96 | } |
96 | } |
97 | } |
97 | } |
98 | else if (s) |
98 | else if (s) |
99 | { |
99 | { |
100 | rxvt_color rc; |
100 | rxvt_color rc; |