機能 #1164 » 1164-score.patch
core/mui/cairo_miracle_painter.rb | ||
---|---|---|
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
|