RULER_ITEM: fix incorrect position of the shadow text shape (round 3).
Depending on the text orientation, the shadow shape position was incorrect.
This commit is contained in:
parent
1698fb6608
commit
965aaa217c
|
@ -198,13 +198,19 @@ void drawTicksAlongLine( KIGFX::VIEW* aView, const VECTOR2D& aOrigin, const VECT
|
|||
{
|
||||
labelAttrs.m_Halign = GR_TEXT_H_ALIGN_LEFT;
|
||||
labelAttrs.m_Angle = labelAngle;
|
||||
labelOffset.x -= shadowXoffset;
|
||||
|
||||
// Adjust the text position of the shadow shape:
|
||||
labelOffset.x -= shadowXoffset * labelAttrs.m_Angle.Cos();;
|
||||
labelOffset.y += shadowXoffset * labelAttrs.m_Angle.Sin();;
|
||||
}
|
||||
else
|
||||
{
|
||||
labelAttrs.m_Halign = GR_TEXT_H_ALIGN_RIGHT;
|
||||
labelAttrs.m_Angle = labelAngle + ANGLE_180;
|
||||
labelOffset.x += shadowXoffset;
|
||||
|
||||
// Adjust the text position of the shadow shape:
|
||||
labelOffset.x += shadowXoffset * labelAttrs.m_Angle.Cos();;
|
||||
labelOffset.y -= shadowXoffset * labelAttrs.m_Angle.Sin();;
|
||||
}
|
||||
|
||||
BOX2D viewportD = aView->GetViewport();
|
||||
|
|
Loading…
Reference in New Issue