Mercurial > hg > octave-terminal
changeset 7108:60a1165732f9
[project @ 2007-11-06 22:05:18 by jwe]
author | jwe |
---|---|
date | Tue, 06 Nov 2007 22:06:27 +0000 |
parents | 22397f0fb0b2 |
children | 5436efbf35e3 |
files | scripts/image/colormap.m src/ChangeLog src/graphics.cc src/graphics.h.in |
diffstat | 4 files changed, 93 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/image/colormap.m +++ b/scripts/image/colormap.m @@ -70,7 +70,7 @@ endif ## Return current color map. - if (nargout > 0) + if (nargout > 0 || (nargout == 0 && nargin == 0)) cmap = get (gcf (), "colormap"); endif
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2007-11-06 Kai Habel <kai.habel@gmx.de> + + * graphics.h.in (class surface::properties): New properties, + cdata, facecolor, facealpha, edgecolor, linestyle, + linewidth, marker, markeredgecolor, markerfacecolor, markersize. + * graphics.cc (surface::properties::properties, + surface::properties::set, surface::properties::get, + surface::properties::factory_defaults): Handle new properities. + 2007-11-06 David Bateman <dbateman@free.fr> * OPERATORS/op-bm-bm.cc (matrix_to_bool_matrix,
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -2252,7 +2252,7 @@ else if (name.compare ("facecolor")) retval = facecolor; else if (name.compare ("facealpha")) - retval = facecolor; + retval = facealpha; else if (name.compare ("egdecolor")) retval = edgecolor; else if (name.compare ("linestyle")) @@ -2284,9 +2284,9 @@ m["zdata"] = Matrix (); m["faces"] = Matrix (); m["vertices"] = Matrix (); - m["facecolor"] = color_property(); + m["facecolor"] = color_property (); m["facealpha"] = 1.0; - m["edgecolor"] = color_property("black"); + m["edgecolor"] = color_property ("black"); m["linestyle"] = "-"; m["linewidth"] = 0.5; m["marker"] = "none"; @@ -2308,6 +2308,16 @@ xdata (Matrix ()), ydata (Matrix ()), zdata (Matrix ()), + cdata (Matrix ()), + facecolor (radio_values ("{flat}|none|interp")), + facealpha (1.0), + edgecolor (color_values(0, 0, 0), radio_values ("flat|none|interp")), + linestyle ("-"), + linewidth (0.5), + marker ("none"), + markeredgecolor ("auto"), + markerfacecolor ("none"), + markersize (1), keylabel ("") { } @@ -2332,6 +2342,26 @@ set_ydata (val); else if (name.compare ("zdata")) set_zdata (val); + else if (name.compare ("cdata")) + set_cdata (val); + else if (name.compare ("facecolor")) + set_facecolor (val); + else if (name.compare ("facealpha")) + set_facealpha (val); + else if (name.compare ("edgecolor")) + set_edgecolor (val); + else if (name.compare ("linestyle")) + set_linestyle (val); + else if (name.compare ("linewidth")) + set_linewidth (val); + else if (name.compare ("marker")) + set_marker (val); + else if (name.compare ("markeredgecolor")) + set_markeredgecolor (val); + else if (name.compare ("markerfacecolor")) + set_markerfacecolor (val); + else if (name.compare ("markersize")) + set_markersize (val); else if (name.compare ("keylabel")) set_keylabel (val); else @@ -2356,6 +2386,16 @@ m.assign ("xdata", xdata); m.assign ("ydata", ydata); m.assign ("zdata", zdata); + m.assign ("cdata", cdata); + m.assign ("facecolor", facecolor); + m.assign ("facealpha", facealpha); + m.assign ("edgecolor", edgecolor); + m.assign ("linestyle", linestyle); + m.assign ("linewidth", linewidth); + m.assign ("marker", marker); + m.assign ("markeredgecolor", markeredgecolor); + m.assign ("markerface", markerfacecolor); + m.assign ("markersize", markersize); m.assign ("keylabel", keylabel); return m; @@ -2380,6 +2420,26 @@ retval = ydata; else if (name.compare ("zdata")) retval = zdata; + else if (name.compare ("cdata")) + retval = cdata; + else if (name.compare ("facecolor")) + retval = facecolor; + else if (name.compare ("facealpha")) + retval = facealpha; + else if (name.compare ("edgecolor")) + retval = edgecolor; + else if (name.compare ("linestyle")) + retval = linestyle; + else if (name.compare ("linewidth")) + retval = linewidth; + else if (name.compare ("marker")) + retval = marker; + else if (name.compare ("markeredgecolor")) + retval = markeredgecolor; + else if (name.compare ("markerfacecolor")) + retval = markerfacecolor; + else if (name.compare ("markersize")) + retval = markersize; else if (name.compare ("keylabel")) retval = keylabel; else @@ -2396,6 +2456,16 @@ m["xdata"] = Matrix (); m["ydata"] = Matrix (); m["zdata"] = Matrix (); + m["cdata"] = Matrix (); + m["facecolor"] = color_property (); + m["facealpha"] = 1.0; + m["edgecolor"] = color_property ("black"); + m["linestyle"] = "-"; + m["linewidth"] = 0.5; + m["marker"] = "none"; + m["markeredgecolor"] = "auto"; + m["markerfacecolor"] = "none"; + m["markersize"] = 1; m["keylabel"] = ""; return m;
--- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -1698,6 +1698,16 @@ octave_value xdata octave_value ydata octave_value zdata + octave_value cdata + color_property facecolor a + octave_value facealpha + color_property edgecolor a + octave_value linestyle + octave_value linewidth + octave_value marker + octave_value markeredgecolor + octave_value markerfacecolor + octave_value markersize octave_value keylabel END_PROPERTIES