Kaydet (Commit) 0aabf27c authored tarafından Bartosz Kosiorek's avatar Bartosz Kosiorek

tdf#121648 EMF+ Fix displaying DrawDriverString record

With introduing String rotation support
I made mistake by not removing Maping from DX-Array.
With this commit I'm fixing that issue.
Now drawing with DrawDriverString record,
and rotation is working perfectly.

Reviewed-on: https://gerrit.libreoffice.org/64079
Tested-by: Jenkins
Reviewed-by: 's avatarPatrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: 's avatarBartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit f54c76e1)

Change-Id: I7ae051b3791d9d2d8e2143ed33d21b7bfbc551c6
Reviewed-on: https://gerrit.libreoffice.org/64105
Tested-by: Jenkins
Reviewed-by: 's avatarBartosz Kosiorek <gang65@poczta.onet.pl>
üst c5000631
......@@ -1793,17 +1793,16 @@ namespace emfplushelper
sal_uInt32 pos = 0;
while (pos < glyphsCount)
{
//determine the current length
// determine length with the same charsPosY values
sal_uInt32 aLength = 1;
while (pos + aLength < glyphsCount && std::abs( charsPosY[pos + aLength] - charsPosY[pos] ) < std::numeric_limits< float >::epsilon())
aLength++;
// generate the DX-Array
aDXArray.clear();
double mappedPosX = Map(charsPosX[pos], charsPosY[pos]).getX();
for (size_t i = 0; i < aLength-1; i++)
for (size_t i = 0; i < aLength - 1; i++)
{
aDXArray.push_back(Map(charsPosX[pos + i + 1], charsPosY[pos + i + 1]).getX() - mappedPosX);
aDXArray.push_back(charsPosX[pos + i + 1] - charsPosX[pos]);
}
// last entry
aDXArray.push_back(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment