38 namespace population {
46 using namespace utils;
49 switch( text_position_ ) {
51 document_ << SvgText( label, SvgPoint{ 0.0, current_y_ });
52 current_y_ += text_template_.font.size + 5.0;
56 document_ << SvgText( label, SvgPoint{ -100.0, current_y_ });
60 auto const r =
static_cast<double>( heatmap.
cols() ) * h_scaling_;
61 document_ << SvgText( label, SvgPoint{ r + 10.0, current_y_ });
74 std::string matrix_bmp;
78 SvgPoint{ 0.0, current_y_ },
80 static_cast<double>( heatmap.
cols() ) * h_scaling_,
81 static_cast<double>( heatmap.
rows() ) * v_scaling_
84 img.rendering = SvgImage::ImageRendering::kPixelated;
85 document_ << std::move( img );
88 current_y_ +=
static_cast<double>( heatmap.
rows() ) * v_scaling_;
89 switch( text_position_ ) {
91 auto txt = text_template_;
93 current_y_ += text_template_.font.size + 5.0;
94 txt.position = SvgPoint{ 0.0, current_y_ };
108 document_.
write( target->ostream() );