# HG changeset patch # User jwe # Date 1189628075 0 # Node ID b2b7526a57722463975bedf08ff38ecd4d74abd7 # Parent ebff56d6b0a85e5e58829de69a06a05e098ded58 [project @ 2007-09-12 20:14:35 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2007-09-12 John W. Eaton + + * graphics.cc (text::properties::properties): Default color is + black, not white. + * graphics.h (text::properties::color): Declare as color_property, + not octave_value. + + * graphics.h.in (root_figure::defaults, figure::defaults, + axes::defaults, line::defaults, text::defaults, image::defaults, + patch::defaults, surface::defaults): New functions. + * gripes.cc (gripe_not_implemented): New function. + * gripes.h: Provide decl. + 2007-09-10 John W. Eaton * genprops.awk: Add missing newline character at end of file. diff --git a/src/graphics.cc b/src/graphics.cc --- a/src/graphics.cc +++ b/src/graphics.cc @@ -1257,7 +1257,7 @@ void axes::properties::set_defaults (base_graphics_object& obj, - const std::string& mode) + const std::string& mode) { position = Matrix (); title = octave_NaN; @@ -1873,7 +1873,7 @@ position (Matrix (1, 3, 0.0)), rotation (0), horizontalalignment ("left"), - color (Matrix (1, 3, 1.0)) + color (Matrix (1, 3, 0.0)) { } void diff --git a/src/graphics.h.in b/src/graphics.h.in --- a/src/graphics.h.in +++ b/src/graphics.h.in @@ -36,6 +36,7 @@ #include #include +#include "gripes.h" #include "oct-map.h" #include "ov.h" @@ -915,6 +916,11 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const + { + gripe_not_implemented ("root_figure::defaults"); + } + bool valid_object (void) const { return true; } private: @@ -1049,6 +1055,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("figure::defaults"); } + bool valid_object (void) const { return true; } private: @@ -1227,6 +1235,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("axes::defaults"); } + bool valid_object (void) const { return true; } private: @@ -1332,6 +1342,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("line::defaults"); } + bool valid_object (void) const { return true; } }; @@ -1366,7 +1378,7 @@ octave_value position octave_value rotation octave_value horizontalalignment - octave_value color + color_property color END_PROPERTIES static std::string go_name; @@ -1425,6 +1437,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("text::defaults"); } + bool valid_object (void) const { return true; } }; @@ -1515,6 +1529,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("image::defaults"); } + bool valid_object (void) const { return true; } }; @@ -1615,6 +1631,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("patch::defaults"); } + bool valid_object (void) const { return true; } }; @@ -1706,6 +1724,8 @@ base_properties& get_properties (void) { return xproperties; } + void defaults (void) const { gripe_not_implemented ("surface::defaults"); } + bool valid_object (void) const { return true; } }; diff --git a/src/gripes.cc b/src/gripes.cc --- a/src/gripes.cc +++ b/src/gripes.cc @@ -38,6 +38,12 @@ } void +gripe_not_implemented (const char *fcn) +{ + error ("%s: not implemented", fcn); +} + +void gripe_string_invalid (void) { error ("std::string constant used in invalid context"); diff --git a/src/gripes.h b/src/gripes.h --- a/src/gripes.h +++ b/src/gripes.h @@ -34,6 +34,9 @@ gripe_not_supported (const char *); extern OCTINTERP_API void +gripe_not_implemented (const char *); + +extern OCTINTERP_API void gripe_string_invalid (void); extern OCTINTERP_API void