Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
256
Issues
256
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
b8e722b4
Commit
b8e722b4
authored
Jan 08, 2020
by
Jean-Baptiste Mardelle
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow editing rotoscoping points before closing the shape.
Fixes
#120
parent
641ac897
Pipeline
#12958
passed with stage
in 14 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
+18
-8
src/monitor/view/kdenlivemonitorrotoscene.qml
src/monitor/view/kdenlivemonitorrotoscene.qml
+18
-8
No files found.
src/monitor/view/kdenlivemonitorrotoscene.qml
View file @
b8e722b4
...
...
@@ -107,7 +107,13 @@ Item {
for
(
var
i
=
1
;
i
<
root
.
centerPoints
.
length
;
i
++
)
{
p1
=
convertPoint
(
root
.
centerPoints
[
i
])
ctx
.
lineTo
(
p1
.
x
,
p1
.
y
);
ctx
.
fillRect
(
p1
.
x
-
handleSize
,
p1
.
y
-
handleSize
,
2
*
handleSize
,
2
*
handleSize
);
if
(
i
==
root
.
requestedKeyFrame
)
{
ctx
.
fillStyle
=
Qt
.
rgba
(
1
,
1
,
0
,
0.8
)
ctx
.
fillRect
(
p1
.
x
-
handleSize
,
p1
.
y
-
handleSize
,
2
*
handleSize
,
2
*
handleSize
);
ctx
.
fillStyle
=
Qt
.
rgba
(
1
,
0
,
0
,
0.5
)
}
else
{
ctx
.
fillRect
(
p1
.
x
-
handleSize
,
p1
.
y
-
handleSize
,
2
*
handleSize
,
2
*
handleSize
);
}
}
}
else
{
var
c1
;
var
c2
...
...
@@ -259,7 +265,7 @@ Item {
root
.
isDefined
=
true
;
root
.
effectPolygonChanged
()
canvas
.
requestPaint
()
}
else
{
}
else
if
(
root
.
requestedKeyFrame
<
0
)
{
var
newPoint
=
Qt
.
point
((
mouseX
-
frame
.
x
)
/
root
.
scalex
,
(
mouseY
-
frame
.
y
)
/
root
.
scaley
);
root
.
centerPoints
.
push
(
newPoint
)
canvas
.
requestPaint
()
...
...
@@ -273,7 +279,7 @@ Item {
onPositionChanged
:
{
if
(
root
.
iskeyframe
==
false
)
return
;
if
(
isDefined
&&
pressed
)
{
if
(
pressed
)
{
if
(
centerContainsMouse
)
{
var
xDiff
=
(
mouseX
-
centerCross
.
x
)
/
root
.
scalex
var
yDiff
=
(
mouseY
-
centerCross
.
y
)
/
root
.
scaley
...
...
@@ -294,12 +300,16 @@ Item {
var
yDiff
=
(
mouseY
-
frame
.
y
)
/
root
.
scaley
-
root
.
centerPoints
[
root
.
requestedKeyFrame
].
y
root
.
centerPoints
[
root
.
requestedKeyFrame
].
x
+=
xDiff
root
.
centerPoints
[
root
.
requestedKeyFrame
].
y
+=
yDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
].
x
+=
xDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
].
y
+=
yDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
+
1
].
x
+=
xDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
+
1
].
y
+=
yDiff
if
(
root
.
centerPointsTypes
.
length
>
root
.
requestedKeyFrame
*
2
+
1
)
{
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
].
x
+=
xDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
].
y
+=
yDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
+
1
].
x
+=
xDiff
root
.
centerPointsTypes
[
root
.
requestedKeyFrame
*
2
+
1
].
y
+=
yDiff
}
canvas
.
requestPaint
()
root
.
effectPolygonChanged
()
if
(
root
.
isDefined
)
{
root
.
effectPolygonChanged
()
}
}
else
if
(
root
.
requestedSubKeyFrame
>=
0
)
{
root
.
centerPointsTypes
[
root
.
requestedSubKeyFrame
].
x
=
(
mouseX
-
frame
.
x
)
/
root
.
scalex
root
.
centerPointsTypes
[
root
.
requestedSubKeyFrame
].
y
=
(
mouseY
-
frame
.
y
)
/
root
.
scaley
...
...
Bruno Santos
@bsantos
·
Jan 08, 2020
Reporter
Yeah!
Yeah!
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