Simplify code
fSkewA is always 0.0 now, and fSkewB is always set to fSkew. Change-Id: I57e8a4a5cdde59cb78a7034bfc0d693740b1f672 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202513 Reviewed-by: Khaled Hosny <khaled@libreoffice.org> Tested-by: Jenkins
This commit is contained in:
committed by
Khaled Hosny
parent
e0575ba229
commit
b77068aac3
@@ -5696,22 +5696,12 @@ void PDFWriterImpl::drawVerticalGlyphs(
|
||||
double fYScale = 1.0;
|
||||
double fTempXScale = fXScale;
|
||||
|
||||
// perform artificial italics if necessary
|
||||
double fSkew = 0.0;
|
||||
if (rGlyphs[i].m_pFont->NeedsArtificialItalic())
|
||||
fSkew = ARTIFICIAL_ITALIC_SKEW;
|
||||
|
||||
double fSkewB = fSkew;
|
||||
double fSkewA = 0.0;
|
||||
|
||||
Point aDeltaPos;
|
||||
if (rGlyphs[i].m_pGlyph->IsVertical())
|
||||
{
|
||||
fDeltaAngle = M_PI/2.0;
|
||||
fYScale = fXScale;
|
||||
fTempXScale = 1.0;
|
||||
fSkewA = 0.0;
|
||||
fSkewB = fSkew;
|
||||
}
|
||||
aDeltaPos += SubPixelToLogic(basegfx::B2DPoint(nXOffset / fXScale, 0)) - SubPixelToLogic(basegfx::B2DPoint());
|
||||
if( i < rGlyphs.size()-1 )
|
||||
@@ -5727,8 +5717,9 @@ void PDFWriterImpl::drawVerticalGlyphs(
|
||||
aDeltaPos = rRotScale.transform( aDeltaPos );
|
||||
|
||||
Matrix3 aMat;
|
||||
if( fSkewB != 0.0 || fSkewA != 0.0 )
|
||||
aMat.skew( fSkewA, fSkewB );
|
||||
// perform artificial italics if necessary
|
||||
if (rGlyphs[i].m_pFont->NeedsArtificialItalic())
|
||||
aMat.skew(0.0, ARTIFICIAL_ITALIC_SKEW);
|
||||
aMat.scale( fTempXScale, fYScale );
|
||||
aMat.rotate( fAngle+fDeltaAngle );
|
||||
aMat.translate( aCurPos.X()+aDeltaPos.X(), aCurPos.Y()+aDeltaPos.Y() );
|
||||
|
||||
Reference in New Issue
Block a user