Class: HexaPDF::Layout::TextLayouter::DummyLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/hexapdf/layout/text_layouter.rb

Overview

A dummy line class for use with variable width wrapping, and Style#line_spacing methods in case a line actually consists of multiple line fragments.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#y_maxObject

Returns the value of attribute y_max

Returns:

  • (Object)

    the current value of y_max



294
295
296
# File 'lib/hexapdf/layout/text_layouter.rb', line 294

def y_max
  @y_max
end

#y_minObject

Returns the value of attribute y_min

Returns:

  • (Object)

    the current value of y_min



294
295
296
# File 'lib/hexapdf/layout/text_layouter.rb', line 294

def y_min
  @y_min
end

Instance Method Details

#heightObject



300
301
302
# File 'lib/hexapdf/layout/text_layouter.rb', line 300

def height
  y_max - y_min
end

#update(y_min, y_max) ⇒ Object



295
296
297
298
# File 'lib/hexapdf/layout/text_layouter.rb', line 295

def update(y_min, y_max)
  self.y_min = y_min
  self.y_max = y_max
end