projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use PBD::to_string from pbd/string_convert.h in MeterStrip class
[ardour.git]
/
libs
/
canvas
/
image.cc
diff --git
a/libs/canvas/image.cc
b/libs/canvas/image.cc
index 46cadd0d1cc32008b3c0482725715970c11df2bc..fc22af8556f9344a0facfffb855bd125e4477526 100644
(file)
--- a/
libs/canvas/image.cc
+++ b/
libs/canvas/image.cc
@@
-42,7
+42,7
@@
Image::Image (Item* parent, Cairo::Format fmt, int width, int height)
DataReady.connect (data_connections, MISSING_INVALIDATOR, boost::bind (&Image::accept_data, this), gui_context());
}
DataReady.connect (data_connections, MISSING_INVALIDATOR, boost::bind (&Image::accept_data, this), gui_context());
}
-void
+void
Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
{
if (_need_render && _pending) {
Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
{
if (_need_render && _pending) {
@@
-53,13
+53,13
@@
Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
_pending->stride);
_current = _pending;
}
_pending->stride);
_current = _pending;
}
-
+
Rect self = item_to_window (Rect (0, 0, _width, _height));
Rect self = item_to_window (Rect (0, 0, _width, _height));
-
boost::optional<Rect>
draw = self.intersection (area);
+
Rect
draw = self.intersection (area);
if (_surface && draw) {
context->set_source (_surface, self.x0, self.y0);
if (_surface && draw) {
context->set_source (_surface, self.x0, self.y0);
- context->rectangle (draw
->x0, draw->y0, draw->width(), draw->
height());
+ context->rectangle (draw
.x0, draw.y0, draw.width(), draw.
height());
context->fill ();
}
}
context->fill ();
}
}
@@
-67,7
+67,7
@@
Image::render (Rect const& area, Cairo::RefPtr<Cairo::Context> context) const
void
Image::compute_bounding_box () const
{
void
Image::compute_bounding_box () const
{
- _bounding_box =
boost::optional<Rect> (Rect (0, 0, _width, _height)
);
+ _bounding_box =
Rect (0, 0, _width, _height
);
_bounding_box_dirty = false;
}
_bounding_box_dirty = false;
}
@@
-96,12
+96,12
@@
Image::put_image (boost::shared_ptr<Data> d)
}
void
}
void
-Image::accept_data ()
+Image::accept_data ()
{
/* must be executed in gui thread */
begin_change ();
_need_render = true;
end_change (); // notify canvas that we need redrawing
{
/* must be executed in gui thread */
begin_change ();
_need_render = true;
end_change (); // notify canvas that we need redrawing
-}
+}