Module: Ea::Svg::EaEmitter::Compartment::Constraints
- Defined in:
- lib/ea/svg/ea_emitter/compartment/constraints.rb
Overview
Constraints compartment. Skipped when the classifier has no constraints. Renders an italic "constraints" header and one "name" line per constraint.
Constant Summary collapse
- DEFAULT_TEXT_COLOR =
"#000000"
Class Method Summary collapse
Class Method Details
.render(context) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ea/svg/ea_emitter/compartment/constraints.rb', line 15 def render(context) return nil unless context.constraints&.any? Element::ConstraintRenderer.render( context.constraints, bounds: context.bounds, first_y: context.geometry.tagged_value_first_y, family: context.family, size: context.size, fill: DEFAULT_TEXT_COLOR ) end |