Browse Source

Catching the error and printing the current cairo matrix

dev
Andy Meneely 11 years ago
parent
commit
d4cd7897ab
  1. 9
      lib/squib/graphics/text.rb

9
lib/squib/graphics/text.rb

@ -161,10 +161,15 @@ module Squib
cc.move_to(0, vertical_start)
cc.update_pango_layout(layout)
cc.save
cc.show_pango_layout(layout)
cc.restore
begin
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)
extents = { width: layout.extents[1].width / Pango::SCALE,
height: layout.extents[1].height / Pango::SCALE }

Loading…
Cancel
Save