Class: Ea::Svg::EaEmitter::Element::DividerRenderer

Inherits:
Object
  • Object
show all
Defined in:
lib/ea/svg/ea_emitter/element/divider_renderer.rb

Overview

Emits the horizontal divider path between header and attribute compartments.

Class Method Summary collapse

Class Method Details

.render(bounds, y:, stroke:, stroke_width:) ⇒ Object



10
11
12
# File 'lib/ea/svg/ea_emitter/element/divider_renderer.rb', line 10

def self.render(bounds, y:, stroke:, stroke_width:)
  %(<g style="stroke-width:#{stroke_width};stroke-linecap:round;stroke-linejoin:bevel; fill:#000000;fill-opacity:0.00; stroke:#{stroke}; stroke-opacity:1.00">\n  <path d="M #{Canvas.coord(bounds.x)} #{Canvas.coord(y)} L #{Canvas.coord(bounds.x + bounds.width)} #{Canvas.coord(y)}" shape-rendering="auto"/>\n</g>)
end