Better debugging to fix this travis issue
parent
44a6334b26
commit
b123a132ef
|
|
@ -22,7 +22,7 @@ module Squib
|
||||||
:show_pango_layout, :rounded_rectangle, :set_line_width, :stroke, :fill,
|
:show_pango_layout, :rounded_rectangle, :set_line_width, :stroke, :fill,
|
||||||
:set_source, :scale, :render_rsvg_handle, :circle, :triangle, :line_to,
|
:set_source, :scale, :render_rsvg_handle, :circle, :triangle, :line_to,
|
||||||
:operator=, :show_page, :clip, :transform, :mask, :create_pango_layout,
|
:operator=, :show_page, :clip, :transform, :mask, :create_pango_layout,
|
||||||
:antialias=, :curve_to, :get_matrix
|
:antialias=, :curve_to, :matrix
|
||||||
|
|
||||||
# :nodoc:
|
# :nodoc:
|
||||||
# @api private
|
# @api private
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,7 @@ module Squib
|
||||||
cc.translate(x,y)
|
cc.translate(x,y)
|
||||||
cc.rotate(angle)
|
cc.rotate(angle)
|
||||||
cc.move_to(0, 0)
|
cc.move_to(0, 0)
|
||||||
|
initial_matrix = cc.matrix.to_a
|
||||||
|
|
||||||
font_desc = Pango::FontDescription.new(font)
|
font_desc = Pango::FontDescription.new(font)
|
||||||
font_desc.size = font_size * Pango::SCALE unless font_size.nil?
|
font_desc.size = font_size * Pango::SCALE unless font_size.nil?
|
||||||
|
|
@ -161,12 +162,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)
|
||||||
|
before_show = cc.matrix.to_a
|
||||||
cc.show_pango_layout(layout)
|
cc.show_pango_layout(layout)
|
||||||
begin
|
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
|
rescue Exception => e
|
||||||
puts "====EXCEPTION!===="
|
puts "====EXCEPTION!===="
|
||||||
puts "Cairo matrix: #{cc.get_matrix}"
|
puts "Initial matrix: #{initial_matrix}"
|
||||||
|
puts "Before show matrix: #{before_show}"
|
||||||
|
puts "Current matrix: #{cc.matrix.to_a}"
|
||||||
puts e
|
puts e
|
||||||
puts "=================="
|
puts "=================="
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue