diff --git a/core/mui/cairo_miracle_painter.rb b/core/mui/cairo_miracle_painter.rb index 08c4527..5d4a0de 100644 --- a/core/mui/cairo_miracle_painter.rb +++ b/core/mui/cairo_miracle_painter.rb @@ -306,9 +306,14 @@ class Gdk::MiraclePainter < Gtk::Object if photo width, height = shape.ink_rect.width/Pango::SCALE, shape.ink_rect.height/Pango::SCALE pixbuf = photo.load_pixbuf(width: width, height: height){ on_modify } + c.save { + x = layout.index_to_pos(shape.start_index).x / Pango::SCALE + y = layout.index_to_pos(shape.start_index).y / Pango::SCALE + c.translate(x, y) c.set_source_pixbuf(pixbuf) c.rectangle(0, 0, width, height) c.fill + } end end layout end