Bug 364584 - Title clips: Shadow offset is not centered at x/y 0,0
Summary: Title clips: Shadow offset is not centered at x/y 0,0
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: 16.04.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-21 09:03 UTC by Larsen
Modified: 2016-06-26 09:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Offset=0 (189.14 KB, image/jpeg)
2016-06-21 09:03 UTC, Larsen
Details
Offset=9 (190.10 KB, image/jpeg)
2016-06-21 09:04 UTC, Larsen
Details
Example of a title with text and offset (666 bytes, text/plain)
2016-06-24 07:25 UTC, Larsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larsen 2016-06-21 09:03:24 UTC
I have to set the shadow offset to y=9 to get it right below the original text.
See attached screenshots.


Reproducible: Always

Steps to Reproduce:
1. Add a title clip
2. Add text
3. Create a shadow
4. Set the offset to 0,0

Actual Results:  
Shadow is positioned slightly on top of the text.

Expected Results:  
Shadow should be right behind the text.

Kdenlive 16.04.1
Comment 1 Larsen 2016-06-21 09:03:49 UTC
Created attachment 99640 [details]
Offset=0
Comment 2 Larsen 2016-06-21 09:04:14 UTC
Created attachment 99641 [details]
Offset=9
Comment 3 Jean-Baptiste Mardelle 2016-06-21 19:30:46 UTC
Git commit c9fbd3f56709ae578e2fb80a1948f4f892129334 by Jean-Baptiste Mardelle.
Committed on 21/06/2016 at 19:30.
Pushed by mardelle into branch 'Applications/16.04'.

Fix shadow offset in title editor

M  +2    -4    src/effectstack/graphicsscenerectmove.cpp

http://commits.kde.org/kdenlive/c9fbd3f56709ae578e2fb80a1948f4f892129334
Comment 4 Jean-Baptiste Mardelle 2016-06-21 19:31:26 UTC
Git commit 3e4c0cfb7f8c8379a598dc86998e1a50ef147b28 by Jean-Baptiste Mardelle.
Committed on 21/06/2016 at 19:31.
Pushed by mardelle into branch 'master'.

Fix shadow offset in title editor

M  +2    -4    src/effectstack/graphicsscenerectmove.cpp

http://commits.kde.org/kdenlive/3e4c0cfb7f8c8379a598dc86998e1a50ef147b28
Comment 5 Larsen 2016-06-24 07:24:33 UTC
Tested with 16.07.70+git20160623 the problem still exists. I now also noticed that this depends on the font size: For a font size of 250, I had to use an offset of 20.
Comment 6 Larsen 2016-06-24 07:25:17 UTC
Created attachment 99674 [details]
Example of a title with text and offset
Comment 7 Jean-Baptiste Mardelle 2016-06-24 18:25:51 UTC
I cannot reproduce on git master. Your title clip correctly displays the shadow with a 20px vertical offset for me. Are you using our master PPA when you say that you reproduce on git master? It can sometimes take 1-2 days before a git commit reaches that PPA, so could you try again if that is the case?
Comment 8 Larsen 2016-06-24 21:40:08 UTC
I am using http://ppa.launchpad.net/kdenlive/kdenlive-master/ubuntu with the current version 16.07.70+git20160623.

Will try again the following days.
Comment 9 Larsen 2016-06-25 05:58:24 UTC
Tested with 16.07.70+git20160624.
While bug 349450 is fixed (which has been pushed to git later than this fix), I still need to use an offset to get the texts to align.

Though, I now noticed that there is a difference when I use another font. "Sawasdee" as used in the example now needs an offset of 23. For "DejaVu Sans" on the other hand, there is no offset needed (works as expected).
Comment 10 Jean-Baptiste Mardelle 2016-06-25 07:05:16 UTC
Right, I see it now. The bug only happens on some fonts.
Comment 11 Jean-Baptiste Mardelle 2016-06-25 13:33:59 UTC
Git commit 138ac40d900a146a035b37ce59f1a02f8921c275 by Jean-Baptiste Mardelle.
Committed on 25/06/2016 at 13:33.
Pushed by mardelle into branch 'master'.

Fix shadow offset by doing custom paint of text items when not editing. As a side effects, on some fonts there is a vertical offset when editing, but it's only when editing.
There is still a 2 pixel vertical offset between Title Widget and real render that will be fixed by an upcoming patch in MLT
Also fixes a bug where creating a rect over a title moved the title

M  +69   -24   src/effectstack/graphicsscenerectmove.cpp
M  +2    -0    src/effectstack/graphicsscenerectmove.h

http://commits.kde.org/kdenlive/138ac40d900a146a035b37ce59f1a02f8921c275
Comment 12 Larsen 2016-06-26 09:41:05 UTC
Fixed in 16.07.70+git20160625.

Thx!