Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Krita
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tusooa Zhu
Krita
Commits
e67f3d94
Commit
e67f3d94
authored
Nov 23, 2007
by
Jan Hambrecht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix typo
svn path=/trunk/koffice/; revision=740694
parent
7b5f918d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
libs/flake/KoConnectionShape.cpp
libs/flake/KoConnectionShape.cpp
+2
-2
libs/flake/KoFlake.h
libs/flake/KoFlake.h
+1
-1
libs/flake/KoShape.cpp
libs/flake/KoShape.cpp
+1
-1
libs/flake/KoShape.h
libs/flake/KoShape.h
+2
-2
libs/flake/tests/TestPosition.cpp
libs/flake/tests/TestPosition.cpp
+1
-1
No files found.
libs/flake/KoConnectionShape.cpp
View file @
e67f3d94
...
...
@@ -332,9 +332,9 @@ QPointF KoConnectionShape::escapeDirection( int handleId ) const
QPointF
handlePoint
=
absoluteMatrix
.
map
(
m_handles
[
handleId
]
);
QPointF
centerPoint
;
if
(
handleId
==
0
)
centerPoint
=
d
->
shape1
->
absolutePosition
(
KoFlake
::
CenteredPositon
);
centerPoint
=
d
->
shape1
->
absolutePosition
(
KoFlake
::
CenteredPosit
i
on
);
else
centerPoint
=
d
->
shape2
->
absolutePosition
(
KoFlake
::
CenteredPositon
);
centerPoint
=
d
->
shape2
->
absolutePosition
(
KoFlake
::
CenteredPosit
i
on
);
double
angle
=
atan2
(
handlePoint
.
y
()
-
centerPoint
.
y
(),
handlePoint
.
x
()
-
centerPoint
.
x
()
);
if
(
angle
<
0.0
)
...
...
libs/flake/KoFlake.h
View file @
e67f3d94
...
...
@@ -60,7 +60,7 @@ public:
TopRightCorner
,
///< the top right corner
BottomLeftCorner
,
///< the bottom left corner
BottomRightCorner
,
///< the bottom right corner
CenteredPositon
///< the centred corner
CenteredPosit
i
on
///< the centred corner
};
...
...
libs/flake/KoShape.cpp
View file @
e67f3d94
...
...
@@ -375,7 +375,7 @@ QPointF KoShape::absolutePosition(KoFlake::Position anchor) const {
case
KoFlake
::
TopRightCorner
:
point
=
QPointF
(
size
().
width
(),
0.0
);
break
;
case
KoFlake
::
BottomLeftCorner
:
point
=
QPointF
(
0.0
,
size
().
height
());
break
;
case
KoFlake
::
BottomRightCorner
:
point
=
QPointF
(
size
().
width
(),
size
().
height
());
break
;
case
KoFlake
::
CenteredPositon
:
point
=
QPointF
(
size
().
width
()
/
2.0
,
size
().
height
()
/
2.0
);
break
;
case
KoFlake
::
CenteredPosit
i
on
:
point
=
QPointF
(
size
().
width
()
/
2.0
,
size
().
height
()
/
2.0
);
break
;
}
return
absoluteTransformation
(
0
).
map
(
point
);
}
...
...
libs/flake/KoShape.h
View file @
e67f3d94
...
...
@@ -459,7 +459,7 @@ public:
* @param anchor The place on the (unaltered) shape that you want the position of.
* @return the point that is the absolute, centered position of this shape.
*/
QPointF
absolutePosition
(
KoFlake
::
Position
anchor
=
KoFlake
::
CenteredPositon
)
const
;
QPointF
absolutePosition
(
KoFlake
::
Position
anchor
=
KoFlake
::
CenteredPosit
i
on
)
const
;
/**
* Move this shape to an absolute position where the end location will be the same
...
...
@@ -475,7 +475,7 @@ public:
* @param newPosition the new absolute center of the shape.
* @param anchor The place on the (unaltered) shape that you set the position of.
*/
void
setAbsolutePosition
(
QPointF
newPosition
,
KoFlake
::
Position
anchor
=
KoFlake
::
CenteredPositon
);
void
setAbsolutePosition
(
QPointF
newPosition
,
KoFlake
::
Position
anchor
=
KoFlake
::
CenteredPosit
i
on
);
/**
* Set a data object on the shape to be used by an application.
...
...
libs/flake/tests/TestPosition.cpp
View file @
e67f3d94
...
...
@@ -72,7 +72,7 @@ void TestPosition::testAbsolutePosition() {
shape1
->
setPosition
(
QPointF
(
10
,
10
));
QCOMPARE
(
shape1
->
absolutePosition
(),
QPointF
(
10
+
25
,
10
+
25
)
);
QCOMPARE
(
shape1
->
absolutePosition
(
KoFlake
::
CenteredPositon
),
QPointF
(
10
+
25
,
10
+
25
)
);
QCOMPARE
(
shape1
->
absolutePosition
(
KoFlake
::
CenteredPosit
i
on
),
QPointF
(
10
+
25
,
10
+
25
)
);
QCOMPARE
(
shape1
->
absolutePosition
(
KoFlake
::
TopLeftCorner
),
QPointF
(
10
+
50
,
10
)
);
QCOMPARE
(
shape1
->
absolutePosition
(
KoFlake
::
BottomRightCorner
),
QPointF
(
10
,
10
+
50
)
);
...
...
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