Mercurial > hg > octave-nkf
changeset 19256:d3a223128efc
shrinkfaces.m: improve input checking
* Check that the input handle is a scalar patch object.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 31 Aug 2014 21:41:33 +0200 |
parents | f984fc55a825 |
children | d20c81d3cd21 |
files | scripts/plot/draw/shrinkfaces.m |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/draw/shrinkfaces.m +++ b/scripts/plot/draw/shrinkfaces.m @@ -76,7 +76,8 @@ colors = []; p = varargin{1}; - if (ishandle (p) && nargin < 3) + if (isscalar (p) && ishandle (p) && nargin < 3 && + strcmp (get (p, "type"), "patch")) faces = get (p, "Faces"); vertices = get (p, "Vertices"); colors = get (p, "FaceVertexCData");