class CooCoo::DataSources::Xournal::Text
Attributes
color[RW]
font[RW]
size[RW]
text[RW]
x[RW]
y[RW]
Public Class Methods
new(text, x, y, size = 12, color = 'black', font = 'Sans')
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 282 def initialize(text, x, y, size = 12, color = 'black', font = 'Sans') @text = text @x = x @y = y @size = size @color = color @font = font end
Public Instance Methods
bottom()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 308 def bottom y + height end
height()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 312 def height @size * @text.count("\n") end
left()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 291 def left x end
right()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 299 def right x + width end
top()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 295 def top y end
width()
click to toggle source
# File lib/coo-coo/data_sources/xournal/document.rb, line 303 def width # TODO but how? @text.length * @size end