Values returned by a Pango::Layout or set in a Pango::Layout are always multiple of Pango::SCALE. Those are convenience methods to deal with that.
Values returned by a Pango::Layout or set in a Pango::Layout are always multiple of Pango::SCALE. Those are convenience methods to deal with that.
# File gtk2/sample/misc/print.rb, line 25 def height_in_points self.size[1] / Pango::SCALE end
# File gtk2/sample/misc/print.rb, line 17 def size_in_points self.size.collect { |v| v / Pango::SCALE } end
# File gtk2/sample/misc/print.rb, line 21 def width_in_points self.size[0] / Pango::SCALE end
# File gtk2/sample/misc/print.rb, line 29 def width_in_points=(width) self.width = width * Pango::SCALE end