Skip to content

Commit

Permalink
Opencharts-CAMS: improve background layout for EpsGrah
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvielamythepaut committed Oct 20, 2023
1 parent d7e0a0d commit 8070f67
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions src/visualisers/EpsGraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,8 @@ void EpsPlume::background(BasicGraphicsObjectContainer& visitor) {


}
double shift =(transformation.getMaxY() - transformation.getMinY())*0.02;

if ( label != background_label_list_.end() ) {

Text* text = new Text();
Expand All @@ -2785,10 +2787,11 @@ void EpsPlume::background(BasicGraphicsObjectContainer& visitor) {
font.colour(*background_label_font_colour_);
text->setFont(font);
double x = transformation.getMinX() + (transformation.getMaxX() - transformation.getMinX())*0.01;
double y = from + (to-from)*0.1;

text->push_back(PaperPoint(x, y));
visitor.push_back(text);

double y = from + shift;
if ( y < transformation.getMaxY() )
text->push_back(PaperPoint(x, y));
visitor.push_back(text);
++label;
}
from = *level;
Expand All @@ -2797,20 +2800,6 @@ void EpsPlume::background(BasicGraphicsObjectContainer& visitor) {
}


// if ( from < transformation.getMaxY() ) {
// Polyline* area = new Polyline();
// area->setColour(Colour(*colour));
// area->setFilled(true);
// area->setShading(new FillShadingProperties());
// area->setFillColour(Colour(*colour));
// visitor.push_back(area);
// area->push_back(PaperPoint(transformation.getMinX(), from));
// area->push_back(PaperPoint(transformation.getMinX(), transformation.getMaxY()));
// area->push_back(PaperPoint(transformation.getMaxX(), transformation.getMaxY()));
// area->push_back(PaperPoint(transformation.getMaxX(), from));
// area->push_back(PaperPoint(transformation.getMinX(), from));
// }

}

void EpsPlume::operator()(Data& data, BasicGraphicsObjectContainer& visitor) {
Expand Down

0 comments on commit 8070f67

Please sign in to comment.