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



291
292
293
# File 'lib/hexapdf/layout/text_layouter.rb', line 291

def y_max
  @y_max
end

#y_minObject

Returns the value of attribute y_min

Returns:

  • (Object)

    the current value of y_min



291
292
293
# File 'lib/hexapdf/layout/text_layouter.rb', line 291

def y_min
  @y_min
end

Instance Method Details

#heightObject



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

def height
  y_max - y_min
end

#update(y_min, y_max) ⇒ Object



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

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