Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
b3c753fd
Commit
b3c753fd
authored
May 29, 2019
by
Benedikt Kleinmeier
Browse files
Draw pedestrian ids in "TikzGenerator" if enabled.
parent
6c4a8c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereGui/src/org/vadere/gui/postvisualization/utils/TikzGenerator.java
View file @
b3c753fd
...
...
@@ -137,6 +137,8 @@ public class TikzGenerator {
Color
agentColor
=
model
.
getConfig
().
getPedestrianDefaultColor
();
colorDefinitions
+=
String
.
format
(
Locale
.
US
,
colorTextPattern
,
"AgentColor"
,
agentColor
.
getRed
(),
agentColor
.
getGreen
(),
agentColor
.
getBlue
());
colorDefinitions
+=
String
.
format
(
Locale
.
US
,
colorTextPattern
,
"AgentIdColor"
,
255
,
127
,
0
);
// This orange color is hard-coded in "DefaultRenderer".
colorDefinitions
+=
"\n"
;
return
colorDefinitions
;
...
...
@@ -262,9 +264,20 @@ public class TikzGenerator {
generatedCode
+=
"% Agents\n"
;
generatedCode
+=
drawAgents
(
config
);
}
else
{
generatedCode
=
"% Agents (not enabled in config)\n"
;
generatedCode
+
=
"% Agents (not enabled in config)\n"
;
}
if
(
config
.
isShowPedestrianIds
())
{
generatedCode
+=
"% Agent Ids\n"
;
for
(
Agent
agent
:
model
.
getAgents
())
{
generatedCode
+=
String
.
format
(
Locale
.
US
,
"\\node[text=AgentIdColor] (id%d) at (%f,%f) {\\textbf{%d}};\n"
,
agent
.
getId
(),
agent
.
getPosition
().
x
,
agent
.
getPosition
().
y
,
agent
.
getId
());
}
}
else
{
generatedCode
+=
"% Agent Ids (not enabled in config)\n"
;
}
return
generatedCode
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment