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
Model registry
Operate
Environments
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
sfwatergit
Flatland
Commits
39c57a26
Commit
39c57a26
authored
5 years ago
by
hagrid67
Browse files
Options
Downloads
Patches
Plain Diff
fix lint errors from merge
parent
743e2e37
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
+1
-11
1 addition, 11 deletions
flatland/utils/graphics_pil.py
with
1 addition
and
11 deletions
flatland/utils/graphics_pil.py
+
1
−
11
View file @
39c57a26
from
flatland.utils.graphics_layer
import
GraphicsLayer
from
flatland.utils.graphics_layer
import
GraphicsLayer
from
PIL
import
Image
,
ImageDraw
,
ImageTk
# , ImageFont
from
PIL
import
Image
,
ImageDraw
,
ImageTk
# , ImageFont
import
tkinter
as
tk
import
tkinter
as
tk
...
@@ -37,11 +36,8 @@ class PILGL(GraphicsLayer):
...
@@ -37,11 +36,8 @@ class PILGL(GraphicsLayer):
self
.
window_open
=
False
self
.
window_open
=
False
# self.bShow = show
# self.bShow = show
self
.
firstFrame
=
True
self
.
firstFrame
=
True
<<<<<<<
HEAD
self
.
create_layers
()
self
.
create_layers
()
=======
# self.beginFrame()
>>>>>>>
8062e72
b7eec9bab1e71f4c0beb4d9ec9cd67026
self
.
beginFrame
()
def
plot
(
self
,
gX
,
gY
,
color
=
None
,
linewidth
=
3
,
layer
=
0
,
opacity
=
255
,
**
kwargs
):
def
plot
(
self
,
gX
,
gY
,
color
=
None
,
linewidth
=
3
,
layer
=
0
,
opacity
=
255
,
**
kwargs
):
color
=
self
.
adaptColor
(
color
)
color
=
self
.
adaptColor
(
color
)
...
@@ -60,7 +56,6 @@ class PILGL(GraphicsLayer):
...
@@ -60,7 +56,6 @@ class PILGL(GraphicsLayer):
for
x
,
y
in
gPoints
:
for
x
,
y
in
gPoints
:
self
.
draws
[
layer
].
rectangle
([(
x
-
r
,
y
-
r
),
(
x
+
r
,
y
+
r
)],
fill
=
color
,
outline
=
color
)
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
):
def
drawImageXY
(
self
,
pil_img
,
xyPixLeftTop
,
layer
=
0
):
# self.layers[layer].alpha_composite(pil_img, offset=xyPixLeftTop)
# self.layers[layer].alpha_composite(pil_img, offset=xyPixLeftTop)
if
(
pil_img
.
mode
==
"
RGBA
"
):
if
(
pil_img
.
mode
==
"
RGBA
"
):
...
@@ -75,8 +70,6 @@ class PILGL(GraphicsLayer):
...
@@ -75,8 +70,6 @@ class PILGL(GraphicsLayer):
xyPixLeftTop
=
tuple
((
array
(
rcTopLeft
)
*
self
.
nPixCell
)[[
1
,
0
]])
xyPixLeftTop
=
tuple
((
array
(
rcTopLeft
)
*
self
.
nPixCell
)[[
1
,
0
]])
self
.
drawImageXY
(
pil_img
,
xyPixLeftTop
,
layer
=
layer
)
self
.
drawImageXY
(
pil_img
,
xyPixLeftTop
,
layer
=
layer
)
=======
>>>>>>>
8062e72
b7eec9bab1e71f4c0beb4d9ec9cd67026
def
open_window
(
self
):
def
open_window
(
self
):
assert
self
.
window_open
is
False
,
"
Window is already open!
"
assert
self
.
window_open
is
False
,
"
Window is already open!
"
self
.
window
=
tk
.
Tk
()
self
.
window
=
tk
.
Tk
()
...
@@ -106,10 +99,7 @@ class PILGL(GraphicsLayer):
...
@@ -106,10 +99,7 @@ class PILGL(GraphicsLayer):
tkimg
=
ImageTk
.
PhotoImage
(
img
)
tkimg
=
ImageTk
.
PhotoImage
(
img
)
if
self
.
firstFrame
:
if
self
.
firstFrame
:
<<<<<<<
HEAD
# Do TK actions for a new panel (not sure what they really do)
# 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
=
tk
.
Label
(
self
.
window
,
image
=
tkimg
)
self
.
panel
.
pack
(
side
=
"
bottom
"
,
fill
=
"
both
"
,
expand
=
"
yes
"
)
self
.
panel
.
pack
(
side
=
"
bottom
"
,
fill
=
"
both
"
,
expand
=
"
yes
"
)
else
:
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