SVG --space-name-transform

This commit is contained in:
Thomas Krijnen
2021-03-28 22:16:58 +02:00
parent f1d7cf1dfb
commit 08ec3fc73f
3 changed files with 14 additions and 1 deletions
+5 -1
View File
@@ -1345,7 +1345,11 @@ void SvgSerializer::write(const geometry_data& data) {
xcoords.push_back(path.add(center_point->X()));
path.add("\" y=\"");
ycoords.push_back(path.add(center_point->Y()));
path.add("\">");
path.add("\"");
if (space_name_transform_) {
path.add(" transform=\"" + *space_name_transform_ + "\"");
}
path.add(">");
for (auto lit = labels.begin(); lit != labels.end(); ++lit) {
const auto& l = *lit;
double dy = labels.begin() == lit
+2
View File
@@ -139,6 +139,7 @@ protected:
boost::optional<double> scale_, calculated_scale_, center_x_, center_y_, scale_backup_;
boost::optional<double> storey_height_line_length_;
boost::optional<std::pair<double, double>> size_, size_backup_;
boost::optional<std::string> space_name_transform_;
bool with_section_heights_from_storey_, print_space_names_, print_space_areas_;
storey_height_display_types storey_height_display_;
@@ -218,6 +219,7 @@ public:
void setDrawStoreyHeights(storey_height_display_types sh) { storey_height_display_ = sh; }
void setDrawDoorArcs(bool b) { draw_door_arcs_ = b; }
void setStoreyHeightLineLength(double d) { storey_height_line_length_ = d; }
void setSpaceNameTransform(const std::string& v) { space_name_transform_ = v; }
std::array<std::array<double, 3>, 3> resize();
void resetScale();