Catching the error and printing the current cairo matrix
parent
acdb56d894
commit
d4cd7897ab
|
|
@ -161,10 +161,15 @@ module Squib
|
||||||
cc.move_to(0, vertical_start)
|
cc.move_to(0, vertical_start)
|
||||||
|
|
||||||
cc.update_pango_layout(layout)
|
cc.update_pango_layout(layout)
|
||||||
cc.save
|
|
||||||
cc.show_pango_layout(layout)
|
cc.show_pango_layout(layout)
|
||||||
cc.restore
|
begin
|
||||||
embed_draws.each { |ed| ed[:draw].call(self, ed[:x], ed[:y] + vertical_start) }
|
embed_draws.each { |ed| ed[:draw].call(self, ed[:x], ed[:y] + vertical_start) }
|
||||||
|
rescue Exception => e
|
||||||
|
puts "====EXCEPTION!===="
|
||||||
|
puts "Cairo matrix: #{cc.get_matrix}"
|
||||||
|
puts e
|
||||||
|
puts "=================="
|
||||||
|
end
|
||||||
draw_text_hint(cc, x, y, layout, hint, angle)
|
draw_text_hint(cc, x, y, layout, hint, angle)
|
||||||
extents = { width: layout.extents[1].width / Pango::SCALE,
|
extents = { width: layout.extents[1].width / Pango::SCALE,
|
||||||
height: layout.extents[1].height / Pango::SCALE }
|
height: layout.extents[1].height / Pango::SCALE }
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue