diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-18 08:23:06 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-06-18 08:23:06 -0400 |
commit | 77f5f4c4bf9074d953a1653658c8f96f38ae258c (patch) | |
tree | 08790670f6435eed917ab3f2629a0373652cbc1e /libs/canvas/text.cc | |
parent | a0c5de281a2ba029a9af53a6ffe3a717280998b3 (diff) |
basically operational switch to canvas drawing coordinates, although text and waves don't work, and redraw areas are too small
Diffstat (limited to 'libs/canvas/text.cc')
-rw-r--r-- | libs/canvas/text.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/canvas/text.cc b/libs/canvas/text.cc index c0bac2f7ee..e4575de3b5 100644 --- a/libs/canvas/text.cc +++ b/libs/canvas/text.cc @@ -96,6 +96,8 @@ Text::redraw (Cairo::RefPtr<Cairo::Context> context) const * ::render */ + cerr << "rendered \"" << layout->get_text() << "\" into image\n"; + _need_redraw = false; } @@ -136,7 +138,7 @@ Text::compute_bounding_box () const } void -Text::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) const +Text::render (Rect const & area, Cairo::RefPtr<Cairo::Context> context) const { if (_text.empty()) { return; @@ -146,8 +148,12 @@ Text::render (Rect const & /*area*/, Cairo::RefPtr<Cairo::Context> context) cons redraw (context); } + + Rect self = item_to_window (Rect (0, 0, min (_clamped_width, _width), _height)); + cerr << "Draw \"" << _text << "\" @ " << self.x0 << ", " << self.y0 << ' ' << self.width() << " x " << self.height() << endl; + context->rectangle (self.x0, self.y0, self.width(), self.height()); context->set_source (_image, 0, 0); - context->rectangle (0, 0, min (_clamped_width, _width), _height); + //context->set_source_rgb (0.3, 0.4, 0.02); context->fill (); } |