Mercurial > octave-nkf
comparison scripts/plot/draw/fill.m @ 18039:8e7d2ee1254d
fill.m: Fix incorrect face coloring when using RGB triple (bug #40732).
* fill.m: Don't set "facecolor" to "flat" when row vector color is found.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 02 Dec 2013 10:37:48 -0800 |
parents | d63878346099 |
children | b4b5ee91561a |
comparison
equal
deleted
inserted
replaced
18038:c404cec84eb4 | 18039:8e7d2ee1254d |
---|---|
92 set (hax, "nextplot", "add"); | 92 set (hax, "nextplot", "add"); |
93 | 93 |
94 for i = 1 : length (iargs) | 94 for i = 1 : length (iargs) |
95 cdata = varargin{iargs(i) + 2}; | 95 cdata = varargin{iargs(i) + 2}; |
96 | 96 |
97 ## Matlab uses flat/interp shading based on orientation of cdata. | |
98 if (isnumeric (cdata) && isrow (cdata)) | |
99 popt = ["facecolor", "flat", opts]; | |
100 else | |
101 popt = opts; | |
102 endif | |
103 | |
104 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata, | 97 [htmp, fail] = __patch__ (hax, varargin{iargs(i)+(0:1)}, cdata, |
105 popt{:}); | 98 opts{:}); |
106 if (fail) | 99 if (fail) |
107 print_usage (); | 100 print_usage (); |
108 endif | 101 endif |
109 | 102 |
110 hlist(end+1, 1) = htmp; | 103 hlist(end+1, 1) = htmp; |
143 if (any (strcmpi (arg, colors))) | 136 if (any (strcmpi (arg, colors))) |
144 retval = true; | 137 retval = true; |
145 endif | 138 endif |
146 elseif (isnumeric (arg)) | 139 elseif (isnumeric (arg)) |
147 ## Assume any numeric argument is correctly formatted cdata. | 140 ## Assume any numeric argument is correctly formatted cdata. |
148 ## Let patch worry about the multple different input formats | 141 ## Let patch worry about the multple different input formats. |
149 retval = true; | 142 retval = true; |
150 endif | 143 endif |
151 endfunction | 144 endfunction |
152 | 145 |
153 | 146 |