Module: UnicodePlot::BorderPrinter

Includes:
StyledPrinter
Included in:
Canvas, Renderer
Defined in:
lib/unicode_plot/renderer.rb

Constant Summary

Constants included from StyledPrinter

StyledPrinter::COLOR_DECODE, StyledPrinter::COLOR_ENCODE, StyledPrinter::DISABLE_TEXT_STYLE, StyledPrinter::TEXT_COLORS

Instance Method Summary collapse

Methods included from StyledPrinter

#color?, #print_color, #print_styled

Instance Method Details



40
41
42
43
44
# File 'lib/unicode_plot/renderer.rb', line 40

def print_border_bottom(out, padding, length, border=:solid, color: :light_black)
  return if border == :none
  b = BORDER_MAP[border]
  print_styled(out, padding, b[:bl], b[:b] * length, b[:br], color: color)
end


34
35
36
37
38
# File 'lib/unicode_plot/renderer.rb', line 34

def print_border_top(out, padding, length, border=:solid, color: :light_black)
  return if border == :none
  b = BORDER_MAP[border]
  print_styled(out, padding, b[:tl], b[:t] * length, b[:tr], color: color)
end