Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
vadere
vadere
Commits
b3c753fd
Commit
b3c753fd
authored
May 29, 2019
by
Benedikt Kleinmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Draw pedestrian ids in "TikzGenerator" if enabled.
parent
6c4a8c5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
VadereGui/src/org/vadere/gui/postvisualization/utils/TikzGenerator.java
...org/vadere/gui/postvisualization/utils/TikzGenerator.java
+14
-1
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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