diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-11-06 20:33:29 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-11-06 20:38:02 -0500 |
commit | 7670e463cc98c351bc9203ede7d95da06af59b21 (patch) | |
tree | ee0da9d0394395347eb6f3de428f51e2aad4d41c /libs | |
parent | 787f9748b6fce2ada2b33d38d8f70d2b390d081d (diff) |
add API to extract color from ArdourCanvas::Text and tidy up member declarations
Conflicts:
libs/canvas/canvas/text.h
Diffstat (limited to 'libs')
-rw-r--r-- | libs/canvas/canvas/text.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libs/canvas/canvas/text.h b/libs/canvas/canvas/text.h index 85262ee984..f72c088566 100644 --- a/libs/canvas/canvas/text.h +++ b/libs/canvas/canvas/text.h @@ -38,8 +38,10 @@ public: void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const; void compute_bounding_box () const; + ArdourCanvas::Color color () const { return _color; } + void set_color (ArdourCanvas::Color); + void set (std::string const &); - void set_color (uint32_t); void set_font_description (Pango::FontDescription); void set_alignment (Pango::Alignment); @@ -51,16 +53,17 @@ public: std::string text() const { return _text; } private: - std::string _text; - uint32_t _color; + std::string _text; + ArdourCanvas::Color _color; Pango::FontDescription* _font_description; - Pango::Alignment _alignment; + Pango::Alignment _alignment; mutable Cairo::RefPtr<Cairo::ImageSurface> _image; - mutable Duple _origin; - mutable double _width; - mutable double _height; - mutable bool _need_redraw; - double _clamped_width; + mutable Duple _origin; + mutable double _width; + mutable double _height; + mutable bool _need_redraw; + mutable double _width_correction; + double _clamped_width; void redraw (Cairo::RefPtr<Cairo::Context>) const; void redraw (Glib::RefPtr<Pango::Context>) const; |