Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
42faaa8b
Commit
42faaa8b
authored
Sep 10, 2013
by
John Stowers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mouse handling in python demos
parent
c0c575d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
common.py
samples/python2/common.py
+3
-2
No files found.
samples/python2/common.py
View file @
42faaa8b
...
...
@@ -91,14 +91,15 @@ class Sketcher:
pt
=
(
x
,
y
)
if
event
==
cv2
.
EVENT_LBUTTONDOWN
:
self
.
prev_pt
=
pt
elif
event
==
cv2
.
EVENT_LBUTTONUP
:
self
.
prev_pt
=
None
if
self
.
prev_pt
and
flags
&
cv2
.
EVENT_FLAG_LBUTTON
:
for
dst
,
color
in
zip
(
self
.
dests
,
self
.
colors_func
()):
cv2
.
line
(
dst
,
self
.
prev_pt
,
pt
,
color
,
5
)
self
.
dirty
=
True
self
.
prev_pt
=
pt
self
.
show
()
else
:
self
.
prev_pt
=
None
# palette data from matplotlib/_cm.py
...
...
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