Commit 536b6325 authored by Pino Toscano's avatar Pino Toscano

Correctly translate the ink annotations now.

svn path=/trunk/KDE/kdegraphics/okular/; revision=689204
parent 668dcad8
......@@ -1788,6 +1788,7 @@ class Okular::InkAnnotationPrivate : public Okular::AnnotationPrivate
}
virtual void transform( const QMatrix &matrix );
virtual void translate( const NormalizedPoint &coord );
QList< QLinkedList<NormalizedPoint> > m_inkPaths;
QList< QLinkedList<NormalizedPoint> > m_transformedInkPaths;
......@@ -1922,3 +1923,19 @@ void InkAnnotationPrivate::transform( const QMatrix &matrix )
it.next().transform( matrix );
}
}
void InkAnnotationPrivate::translate( const NormalizedPoint &coord )
{
AnnotationPrivate::translate( coord );
for ( int i = 0; i < m_inkPaths.count(); ++i )
{
QMutableLinkedListIterator<NormalizedPoint> it( m_inkPaths[ i ] );
while ( it.hasNext() )
{
NormalizedPoint& p = it.next();
p.x = p.x + coord.x;
p.y = p.y + coord.y;
}
}
}
......@@ -92,6 +92,7 @@ bool AnnotationGuiUtils::canBeMoved( Okular::Annotation * ann )
case Okular::Annotation::ALine:
case Okular::Annotation::AStamp:
case Okular::Annotation::AGeom:
case Okular::Annotation::AInk:
return true;
break;
default:
......
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