lib/rsyntaxtree/tree_graph.rb
# Draw a line between child/parent elements
Draw a line between child/parent elements
Draw a line between child / parent elements
def line_to_parent(fromX, fromY, fromW, toX, toW)
    if (fromY == 0 )
      return
    end
    fromTop  = row2px(fromY)
    fromLeft = (fromX + fromW / 2 + @m[:b_side])
    toBot    = (row2px(fromY - 1 ) + @e_height)
    toLeft  = (toX + toW / 2 + @m[:b_side])
    @gc.fill("none")
    @gc.stroke @col_line
    @gc.stroke_width 1
    @gc.line(fromLeft.ceil, fromTop.ceil, toLeft.ceil, toBot.ceil)
  end
def line_to_parent ( fromX , fromY , fromW , toX , toW ) if ( fromY == 0 ) return end fromTop = row2px ( fromY ) fromLeft = ( fromX + fromW / 2 + @m [ :b_side ] ) toBot = ( row2px ( fromY - 1 ) + @e_height ) toLeft = ( toX + toW / 2 + @m [ :b_side ] ) @gc . fill ( "none" ) @gc . stroke @col_line @gc . stroke_width 1 @gc . line ( fromLeft . ceil , fromTop . ceil , toLeft . ceil , toBot . ceil ) end
Draw a line between child/parent elements
Draw a line between child / parent elements
fromX
<not_specific>
fromY
<not_specific>
fromW
<not_specific>
toX
<not_specific>
toW
<not_specific>