Method: HDLRuby::Viz::Node#terminal_svg
- Defined in:
- lib/HDLRuby/hruby_viz.rb
#terminal_svg(n) ⇒ Object
Generate a terminal description SVG for node +n+
3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 |
# File 'lib/HDLRuby/hruby_viz.rb', line 3614 def terminal_svg(n) ICIICI res = "<rect fill=\"#ddd\" stroke=\"#000\" " + "stroke-width=\"#{@scale/32.0}\" " + "x=\"#{(ic.xpos-1/16.0)*@scale}\" y=\"#{(ic.ypos-1/16.0)*@scale}\" " + "rx=\"#{(1+1/16.0)*@scale}\" " + "width=\"#{(ic.width+1/8.0)*@scale}\" "+ "height=\"#{(ic.height+1/8.0)*@scale}\"/>\n" res += "<rect fill=\"#ddd\" stroke=\"#000\" " + "stroke-width=\"#{@scale/32.0}\" " + "x=\"#{ic.xpos*@scale}\" y=\"#{ic.ypos*@scale}\" " + "rx=\"#{@scale}\" " + "width=\"#{ic.width*@scale}\" "+ "height=\"#{ic.height*@scale}\"/>\n" # Its name. res += "<text class=\"medium#{self.idC}\" " + "style=\"inline-size=#{ic.width*@scale}px; text-anchor: middle; " + "dominant-baseline: middle;\" " + "x=\"#{(ic.xpos + ic.width/2.0)*@scale}\" "+ "y=\"#{(ic.ypos + ic.height/2.0)*@scale}\">" + ic.name + "</text>\n" return res end |