Hinting is set to off, not nil. Some more tests

This commit is contained in:
Andy Meneely
2014-08-13 17:08:16 -04:00
parent 66ce4a2413
commit a643cf8025
8 changed files with 42 additions and 17 deletions
+1
View File
@@ -27,6 +27,7 @@ module Squib
# :nodoc:
# @api private
def svg(file, id, x, y, width, height, alpha, blend)
Squib.logger.debug {"Rendering: #{file}, #{id} #{x}, #{y}, #{width}, #{height}, #{alpha}, #{blend}"}
return if file.nil? or file.eql? ''
svg = RSVG::Handle.new_from_file(file)
width = svg.width if width == :native
+1 -1
View File
@@ -6,8 +6,8 @@ module Squib
# :nodoc:
# @api private
def draw_text_hint(x,y,layout, color)
return if color.nil? && @deck.text_hint.nil?
color ||= @deck.text_hint
return if color.to_s.eql? 'off'
# when w,h < 0, it was never set. extents[1] are ink extents
w = layout.width / Pango::SCALE
w = layout.extents[1].width / Pango::SCALE if w < 0