Commit 2ad6d916b9d2423aa00580b84d6f3ac3aea7205d
1 parent
cfe8df50
Exists in
master
and in
100 other branches
Set DDClient lib dir in library path for login script
Fix a bug with title position
Showing
2 changed files
with
25 additions
and
6 deletions
Show diff stats
script/loginDD_Server.sh.in
src/ParamOutputImpl/Plot/PanelPlotOutput.cc
... | ... | @@ -157,12 +157,24 @@ void PanelPlotOutput::calculatePlotArea(Bounds& bounds_) { |
157 | 157 | // Next operand of addition is to set space as many as title is requested to be down. |
158 | 158 | // we add 0.5 because when using plmtex with disposition value of 0, |
159 | 159 | // text is drawn on edge. |
160 | - topSpace += panelTitleCharHeight * (-_panel->getTitlePositionUnits() - 0.5); | |
161 | - topSpace += (panelTitleCharHeight * ((1 + Panel::LINE_SPACE_TITLE) * splittedLegend->size())); | |
160 | + titleSpace += panelTitleCharHeight * (-_panel->getTitlePositionUnits() - 0.5); | |
161 | + titleSpace += (panelTitleCharHeight * ((1 + Panel::LINE_SPACE_TITLE) * splittedLegend->size())); | |
162 | 162 | // Set rest of full character height under title. |
163 | - topSpace += panelTitleCharHeight * (1 - Panel::LINE_SPACE_TITLE); | |
164 | - titleSpace = topSpace; | |
163 | + titleSpace += panelTitleCharHeight * (1 - Panel::LINE_SPACE_TITLE); | |
164 | + | |
165 | + switch (_panel->_titlePosition) | |
166 | + { | |
167 | + case PlotCommon::Position::POS_TOP : | |
168 | + topSpace += titleSpace; | |
169 | + break; | |
170 | + case PlotCommon::Position::POS_BOTTOM : | |
171 | + bottomSpace += titleSpace; | |
172 | + break; | |
173 | + default : | |
174 | + //Not possible - Nothing to do | |
175 | + titleSpace = 0; | |
165 | 176 | } |
177 | + } | |
166 | 178 | |
167 | 179 | // Get character size for panel. |
168 | 180 | double lFontFactorPanel = getPlFontScaleFactor(_panel->_font); |
... | ... | @@ -510,7 +522,10 @@ void PanelPlotOutput::calculatePlotArea(Bounds& bounds_) { |
510 | 522 | |
511 | 523 | case TextLegendPosition::POS_TOP : |
512 | 524 | if (topTextLegendFound == false) { |
513 | - textLegendProp->setOffset (topSpace - titleSpace); | |
525 | + if (_panel->_titlePosition == PlotCommon::Position::POS_TOP) | |
526 | + textLegendProp->setOffset (topSpace - titleSpace); | |
527 | + else | |
528 | + textLegendProp->setOffset (topSpace); | |
514 | 529 | topSpace += (1.5 * textLegendLinesNb + 0.5) * legendCharHeight; |
515 | 530 | topTextLegendFound = true; |
516 | 531 | } |
... | ... | @@ -518,7 +533,10 @@ void PanelPlotOutput::calculatePlotArea(Bounds& bounds_) { |
518 | 533 | |
519 | 534 | case TextLegendPosition::POS_BOTTOM : |
520 | 535 | if (bottomTextLegendFound == false) { |
521 | - textLegendProp->setOffset (bottomSpace); | |
536 | + if (_panel->_titlePosition == PlotCommon::Position::POS_BOTTOM) | |
537 | + textLegendProp->setOffset (bottomSpace - titleSpace); | |
538 | + else | |
539 | + textLegendProp->setOffset (bottomSpace); | |
522 | 540 | bottomSpace += (1.5 * textLegendLinesNb + 0.5) * legendCharHeight; |
523 | 541 | bottomTextLegendFound = true; |
524 | 542 | } | ... | ... |