Class: Asciidoctor::PDF::FormattedText::FragmentPositionRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bottomObject (readonly)

Returns the value of attribute bottom.



7
8
9
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 7

def bottom
  @bottom
end

#leftObject (readonly)

Returns the value of attribute left.



8
9
10
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 8

def left
  @left
end

#page_numberObject (readonly)

Returns the value of attribute page_number.



9
10
11
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 9

def page_number
  @page_number
end

#rightObject (readonly)

Returns the value of attribute right.



6
7
8
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 6

def right
  @right
end

#topObject (readonly)

Returns the value of attribute top.



5
6
7
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 5

def top
  @top
end

Instance Method Details

#render_behind(fragment) ⇒ Object



11
12
13
14
15
16
# File 'lib/asciidoctor/pdf/formatted_text/fragment_position_renderer.rb', line 11

def render_behind fragment
  @top = fragment.top
  @right = (@left = fragment.left) + fragment.width
  @bottom = fragment.bottom
  @page_number = fragment.document.page_number
end