プロジェクト

全般

プロフィール

機能 #1164 » 1164-score.patch

cob odo, 2018-04-17 02:54

差分を表示:

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
(1-1/3)