Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
John Zhang
Okular
Commits
536b6325
Commit
536b6325
authored
Jul 17, 2007
by
Pino Toscano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly translate the ink annotations now.
svn path=/trunk/KDE/kdegraphics/okular/; revision=689204
parent
668dcad8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
core/annotations.cpp
core/annotations.cpp
+17
-0
ui/annotationguiutils.cpp
ui/annotationguiutils.cpp
+1
-0
No files found.
core/annotations.cpp
View file @
536b6325
...
...
@@ -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
;
}
}
}
ui/annotationguiutils.cpp
View file @
536b6325
...
...
@@ -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:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment