comparison Framework/Radiography/RadiographySceneWriter.cpp @ 1220:9ee6b28f53e8

RadiographyTextLayer: support multiple fonts
author Alain Mazy <alain@mazy.be>
date Sat, 07 Dec 2019 17:47:23 +0100
parents a34ba19d2060
children 1c7ae79c426d
comparison
equal deleted inserted replaced
1219:f8bff27f1314 1220:9ee6b28f53e8
60 60
61 void RadiographySceneWriter::WriteLayer(Json::Value& output, const RadiographyTextLayer& layer) 61 void RadiographySceneWriter::WriteLayer(Json::Value& output, const RadiographyTextLayer& layer)
62 { 62 {
63 output["type"] = "text"; 63 output["type"] = "text";
64 output["text"] = layer.GetText(); 64 output["text"] = layer.GetText();
65 output["fontSize"] = static_cast<unsigned int>(layer.GetFontSize()); 65 output["font"] = layer.GetFont();
66 output["foreground"] = layer.GetForeground(); 66 output["fontSize"] = layer.GetFontSize();
67 output["foreground"] = layer.GetForegroundGreyLevel();
67 } 68 }
68 69
69 void RadiographySceneWriter::WriteLayer(Json::Value& output, const RadiographyMaskLayer& layer) 70 void RadiographySceneWriter::WriteLayer(Json::Value& output, const RadiographyMaskLayer& layer)
70 { 71 {
71 output["type"] = "mask"; 72 output["type"] = "mask";