This commit is contained in:
Andy Meneely
2014-08-01 15:32:13 -04:00
parent 82ff08041e
commit 9cde048c00
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -86,6 +86,7 @@ module Squib
# :nodoc:
# @api private
def text(str, font, x, y, color, options)
Squib.logger.debug {"Placing '#{str}'' with font '#{font}' @ #{x}, #{y}, color: #{color}, and options: #{options}"}
cc = cairo_context
cc.set_source_color(color)
cc.move_to(x,y)
@@ -98,6 +99,7 @@ module Squib
layout = ellipsize(layout, options)
layout = align(layout, options)
layout.justify = options[:justify] unless options[:justify].nil?
layout.spacing = options[:spacing] * Pango::SCALE unless options[:spacing].nil?
cc.update_pango_layout(layout)
valign(cc, layout, x,y, options[:valign])
cc.update_pango_layout(layout) ; cc.show_pango_layout(layout)