Class: Ea::Svg::EaEmitter::Element::ShapeRenderer
- Inherits:
-
Object
- Object
- Ea::Svg::EaEmitter::Element::ShapeRenderer
- Defined in:
- lib/ea/svg/ea_emitter/element/shape_renderer.rb
Overview
Emits the shape <g> containing a filled, stroked rect
for one diagram element box.
Class Method Summary collapse
Class Method Details
.render(bounds, fill:, stroke:, stroke_width:) ⇒ Object
10 11 12 |
# File 'lib/ea/svg/ea_emitter/element/shape_renderer.rb', line 10 def self.render(bounds, fill:, stroke:, stroke_width:) %(<g style="stroke-width:#{stroke_width};stroke-linecap:round;stroke-linejoin:bevel; fill:#{fill};fill-opacity:1.00; stroke:#{stroke}; stroke-opacity:1.00">\n <rect x="#{Canvas.coord(bounds.x)}" y="#{Canvas.coord(bounds.y)}" width="#{Canvas.coord(bounds.width)}" height="#{Canvas.coord(bounds.height)}" rx="0.00" shape-rendering="auto" />\n</g>) end |