1 #ifndef __ardour_canvas_text_h__
2 #define __ardour_canvas_text_h__
4 #include <pangomm/fontdescription.h>
5 #include <pangomm/layout.h>
7 #include "canvas/item.h"
9 namespace ArdourCanvas {
11 class Text : public Item
17 void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
18 void compute_bounding_box () const;
19 XMLNode* get_state () const;
20 void set_state (XMLNode const *);
22 void set (std::string const &);
23 void set_color (uint32_t);
24 void set_font_description (Pango::FontDescription);
25 void set_alignment (Pango::Alignment);
27 void set_size_chars (int nchars);
32 Pango::FontDescription* _font_description;
33 Pango::Alignment _alignment;
34 mutable Cairo::RefPtr<Cairo::ImageSurface> _image;
35 mutable Duple _origin;
38 mutable bool _need_redraw;
40 void redraw (Cairo::RefPtr<Cairo::Context>) const;
45 #endif /* __ardour_canvas_text_h__ */