-
- Rect self = item_to_window (Rect (0, 0, min (_clamped_width, _width), _height));
-
- context->rectangle (self.x0, self.y0, self.width(), self.height());
+
+ Rect intersection (i.get());
+
+ context->rectangle (intersection.x0, intersection.y0, intersection.width(), intersection.height());
+#ifdef __APPLE__
+ /* Below, the rendering scaling is set to support retina display
+ */
+ Cairo::Matrix original_matrix = context->get_matrix();
+ context->scale (0.5, 0.5);
+ context->set_source (_image, self.x0 * 2, self.y0 * 2);
+ context->fill ();
+ context->set_matrix (original_matrix);
+#else