current TeX

minor code changes
This commit is contained in:
2017-05-06 17:32:40 +02:00
parent 2438080389
commit edd41293c1
12 changed files with 650 additions and 132 deletions

View File

@@ -58,6 +58,10 @@ public:
lineErr[idx].getStroke().setWidth(w);
}
K::GnuplotStroke& getStroke(const int idx) {
return lineErr[idx].getStroke();
}
K::Gnuplot& getGP() {
return gp;
}

View File

@@ -342,6 +342,29 @@ public:
splot.getObjects().add(poly);
}
K::GnuplotObjectPolygon* addStartIndicator(const Point3 pt, const std::string& color) {
// for (const Point3 p : points) {
// if (p.z < settings.minZ) {return nullptr;}
// if (p.z > settings.maxZ) {return nullptr;}
// }
const float s = 2.0;
K::GnuplotObjectPolygon* poly = new K::GnuplotObjectPolygon();
poly->setFill(K::GnuplotFill(K::GnuplotFillStyle::SOLID, K::GnuplotColor::fromHexStr(color)));
poly->setStroke(K::GnuplotStroke(K::GnuplotDashtype::SOLID, 1, K::GnuplotColor::fromRGB(0,0,0)));
//poly->setStroke(K::GnuplotStroke::NONE());
poly->add(K::GnuplotCoordinate3(pt.x-s, pt.y-s, pt.z, K::GnuplotCoordinateSystem::FIRST));
poly->add(K::GnuplotCoordinate3(pt.x+s, pt.y-s, pt.z, K::GnuplotCoordinateSystem::FIRST));
poly->add(K::GnuplotCoordinate3(pt.x+s, pt.y+s, pt.z, K::GnuplotCoordinateSystem::FIRST));
poly->add(K::GnuplotCoordinate3(pt.x-s, pt.y+s, pt.z, K::GnuplotCoordinateSystem::FIRST));
poly->close();
poly->setFront(true);
splot.getObjects().add(poly);
return poly;
}
K::GnuplotObjectPolygon* addPolygon(const std::vector<Point3>& points, const std::string& color, bool front = false, bool fill = true, const float alpha = 1) {
for (const Point3 p : points) {