Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Flatland
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elrichgro
Flatland
Commits
743e2e37
Commit
743e2e37
authored
5 years ago
by
hagrid67
Browse files
Options
Downloads
Plain Diff
Merge branch '38-jw-SBB-graphics' of gitlab.aicrowd.com:flatland/flatland into 38-jw-SBB-graphics
parents
5ef9fd42
8062e72b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
flatland/utils/graphics_pil.py
+9
-0
9 additions, 0 deletions
flatland/utils/graphics_pil.py
with
9 additions
and
0 deletions
flatland/utils/graphics_pil.py
+
9
−
0
View file @
743e2e37
...
...
@@ -37,7 +37,10 @@ class PILGL(GraphicsLayer):
self
.
window_open
=
False
# self.bShow = show
self
.
firstFrame
=
True
<<<<<<<
HEAD
self
.
create_layers
()
=======
>>>>>>>
8062e72
b7eec9bab1e71f4c0beb4d9ec9cd67026
self
.
beginFrame
()
def
plot
(
self
,
gX
,
gY
,
color
=
None
,
linewidth
=
3
,
layer
=
0
,
opacity
=
255
,
**
kwargs
):
...
...
@@ -57,6 +60,7 @@ class PILGL(GraphicsLayer):
for
x
,
y
in
gPoints
:
self
.
draws
[
layer
].
rectangle
([(
x
-
r
,
y
-
r
),
(
x
+
r
,
y
+
r
)],
fill
=
color
,
outline
=
color
)
<<<<<<<
HEAD
def
drawImageXY
(
self
,
pil_img
,
xyPixLeftTop
,
layer
=
0
):
# self.layers[layer].alpha_composite(pil_img, offset=xyPixLeftTop)
if
(
pil_img
.
mode
==
"
RGBA
"
):
...
...
@@ -71,6 +75,8 @@ class PILGL(GraphicsLayer):
xyPixLeftTop
=
tuple
((
array
(
rcTopLeft
)
*
self
.
nPixCell
)[[
1
,
0
]])
self
.
drawImageXY
(
pil_img
,
xyPixLeftTop
,
layer
=
layer
)
=======
>>>>>>>
8062e72
b7eec9bab1e71f4c0beb4d9ec9cd67026
def
open_window
(
self
):
assert
self
.
window_open
is
False
,
"
Window is already open!
"
self
.
window
=
tk
.
Tk
()
...
...
@@ -100,7 +106,10 @@ class PILGL(GraphicsLayer):
tkimg
=
ImageTk
.
PhotoImage
(
img
)
if
self
.
firstFrame
:
<<<<<<<
HEAD
# Do TK actions for a new panel (not sure what they really do)
=======
>>>>>>>
8062e72
b7eec9bab1e71f4c0beb4d9ec9cd67026
self
.
panel
=
tk
.
Label
(
self
.
window
,
image
=
tkimg
)
self
.
panel
.
pack
(
side
=
"
bottom
"
,
fill
=
"
both
"
,
expand
=
"
yes
"
)
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment