Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 0c20647f authored by Benedikt Kleinmeier's avatar Benedikt Kleinmeier
Browse files

In "TikzGenerator.java", highlight currently selected agent with colored border.

In "PostvisualizationWindow.java", added button to generate TikZ image.
parent 15699d73
Pipeline #59686 passed with stage
in 51 seconds
...@@ -220,7 +220,7 @@ PostVis.chbShowStairs.text=Treppen anzeigen ...@@ -220,7 +220,7 @@ PostVis.chbShowStairs.text=Treppen anzeigen
PostVis.btnSnapshot.tooltip=Snapshot PostVis.btnSnapshot.tooltip=Snapshot
PostVis.btnPNGSnapshot.tooltip=PNG-Snapshot PostVis.btnPNGSnapshot.tooltip=PNG-Snapshot
PostVis.btnSVGSnapshot.tooltip=SVG-Snapshot PostVis.btnSVGSnapshot.tooltip=SVG-Snapshot
PostVis.btnTikZSnapshot.tooltip=TikZ Snapshot PostVis.btnTikZSnapshot.tooltip=TikZ-Snapshot
PostVis.menuFile.title=Datei PostVis.menuFile.title=Datei
PostVis.menuSettings.title=Einstellungen PostVis.menuSettings.title=Einstellungen
PostVis.menuRecentFiles.title=K\u00FCrzlich verwendete Dateien PostVis.menuRecentFiles.title=K\u00FCrzlich verwendete Dateien
......
...@@ -150,20 +150,20 @@ public class OnlineVisualisationWindow extends JPanel implements Observer { ...@@ -150,20 +150,20 @@ public class OnlineVisualisationWindow extends JPanel implements Observer {
}; };
ActionGeneratePNG generatePNG = new ActionGeneratePNG( ActionGeneratePNG generatePNG = new ActionGeneratePNG(
"generatePNG", Messages.getString("PostVis.btnPNGSnapshot.tooltip"),
resources.getIcon("camera_png.png", iconWidth, iconHeight), resources.getIcon("camera_png.png", iconWidth, iconHeight),
new OnlinevisualizationRenderer(model), new OnlinevisualizationRenderer(model),
model); model);
ActionGenerateSVG generateSVG = new ActionGenerateSVG( ActionGenerateSVG generateSVG = new ActionGenerateSVG(
"generateSVG", Messages.getString("PostVis.btnSVGSnapshot.tooltip"),
resources.getIcon("camera_svg.png", iconWidth, iconHeight), resources.getIcon("camera_svg.png", iconWidth, iconHeight),
new OnlinevisualizationRenderer(model), new OnlinevisualizationRenderer(model),
model); model);
ActionGenerateTikz generateTikz = new ActionGenerateTikz( ActionGenerateTikz generateTikz = new ActionGenerateTikz(
"generateTikz", Messages.getString("PostVis.btnTikZSnapshot.tooltip"),
resources.getIcon("camera_tikz.png", iconWidth, iconHeight), resources.getIcon("camera_tikz.png", iconWidth, iconHeight),
new OnlinevisualizationRenderer(model), new OnlinevisualizationRenderer(model),
model); model);
......
...@@ -166,7 +166,12 @@ public class TikzGenerator { ...@@ -166,7 +166,12 @@ public class TikzGenerator {
if (config.isShowPedestrians()) { if (config.isShowPedestrians()) {
generatedCode += "% Agents\n"; generatedCode += "% Agents\n";
for (Agent agent : model.getAgents()) { for (Agent agent : model.getAgents()) {
String agentTextPattern = "\\fill[AgentColor] (%f,%f) circle [radius=%fcm];\n"; String agentTextPattern = "\\fill[AgentColor] (%f,%f) circle [radius=%fcm];\n";
if (model.isElementSelected() && model.getSelectedElement().equals(agent)) {
agentTextPattern = "\\fill[draw=magenta,fill=AgentColor] (%f,%f) circle [radius=%fcm];\n";
}
generatedCode += String.format(agentTextPattern, agent.getPosition().x, agent.getPosition().y, agent.getRadius()); generatedCode += String.format(agentTextPattern, agent.getPosition().x, agent.getPosition().y, agent.getRadius());
// Do not draw agents as path for performance reasons. Usually, agents have a circular shape. // Do not draw agents as path for performance reasons. Usually, agents have a circular shape.
// generatedCode += String.format("\\fill[AgentColor] %s\n", generatePathForScenarioElement(agent)); // generatedCode += String.format("\\fill[AgentColor] %s\n", generatePathForScenarioElement(agent));
......
...@@ -253,12 +253,13 @@ public class PostvisualizationWindow extends JPanel implements Observer { ...@@ -253,12 +253,13 @@ public class PostvisualizationWindow extends JPanel implements Observer {
renderer); renderer);
ActionVisualization svgImg = new ActionGenerateSVG(Messages.getString("PostVis.btnSVGSnapshot.tooltip"), resources.getIcon("camera_svg.png", iconWidth, iconHeight), ActionVisualization svgImg = new ActionGenerateSVG(Messages.getString("PostVis.btnSVGSnapshot.tooltip"), resources.getIcon("camera_svg.png", iconWidth, iconHeight),
renderer); renderer);
ActionVisualization tikzImg = new ActionGenerateTikz("tikz_snapshot", resources.getIcon("camera_tikz.png", iconWidth, iconHeight), ActionVisualization tikzImg = new ActionGenerateTikz(Messages.getString("PostVis.btnTikZSnapshot.tooltip"), resources.getIcon("camera_tikz.png", iconWidth, iconHeight),
renderer); renderer);
// add new ImageGenerator Action ... // add new ImageGenerator Action ...
imgOptions.add(pngImg); imgOptions.add(pngImg);
imgOptions.add(svgImg); imgOptions.add(svgImg);
imgOptions.add(tikzImg);
// add Action to List .... // add Action to List ....
ActionVisualizationMenu imgDialog = new ActionVisualizationMenu( ActionVisualizationMenu imgDialog = new ActionVisualizationMenu(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment