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
Tusooa Zhu
Krita
Commits
71e9a679
Commit
71e9a679
authored
Jun 01, 2006
by
Thomas Zander
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups + API docs
svn path=/trunk/koffice/; revision=547325
parent
fff5e29c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
12 deletions
+34
-12
libs/flake/KoShape.cpp
libs/flake/KoShape.cpp
+3
-8
libs/flake/KoShape.h
libs/flake/KoShape.h
+31
-4
No files found.
libs/flake/KoShape.cpp
View file @
71e9a679
...
@@ -296,14 +296,9 @@ void KoShape::copySettings(const KoShape *shape) {
...
@@ -296,14 +296,9 @@ void KoShape::copySettings(const KoShape *shape) {
m_keepAspect
=
shape
->
keepAspectRatio
();
m_keepAspect
=
shape
->
keepAspectRatio
();
}
}
void
KoShape
::
moveLeft
(
double
distance
)
{
void
KoShape
::
moveBy
(
double
distanceX
,
double
distanceY
)
{
m_pos
.
setX
(
m_pos
.
x
()
+
distance
);
QPointF
p
=
absolutePosition
();
recalcMatrix
();
setAbsolutePosition
(
QPointF
(
p
.
x
()
+
distanceX
,
p
.
y
()
+
distanceY
));
}
void
KoShape
::
moveTop
(
double
distance
)
{
m_pos
.
setY
(
m_pos
.
y
()
+
distance
);
recalcMatrix
();
}
}
// static
// static
...
...
libs/flake/KoShape.h
View file @
71e9a679
...
@@ -135,9 +135,17 @@ public:
...
@@ -135,9 +135,17 @@ public:
*/
*/
void
shear
(
double
sx
,
double
sy
);
void
shear
(
double
sx
,
double
sy
);
/**
* Return the current horizontal shearing angle for this shape.
* @return the current horizontal shearing angle for this shape.
*/
double
shearX
()
const
{
return
m_shearX
;
}
double
shearX
()
const
{
return
m_shearX
;
}
double
shearY
()
const
{
return
m_shearY
;
}
/**
* Return the current vertical shearing angle for this shape.
* @return the current vertical shearing angle for this shape.
*/
double
shearY
()
const
{
return
m_shearY
;
}
/**
/**
* @brief Resize the shape
* @brief Resize the shape
...
@@ -199,6 +207,12 @@ public:
...
@@ -199,6 +207,12 @@ public:
*/
*/
void
addConnectionPoint
(
const
QPointF
&
point
)
{
m_connectors
.
append
(
point
);
}
void
addConnectionPoint
(
const
QPointF
&
point
)
{
m_connectors
.
append
(
point
);
}
/**
* Return a list of the connectors that have been added to this shape.
* Note that altering the list or the points in there will not have any
* effect on the shape.
* @return a list of the connectors that have been added to this shape.
*/
QList
<
QPointF
>
connectors
()
const
{
return
m_connectors
.
toList
();
}
QList
<
QPointF
>
connectors
()
const
{
return
m_connectors
.
toList
();
}
/**
/**
...
@@ -392,8 +406,15 @@ public:
...
@@ -392,8 +406,15 @@ public:
*/
*/
void
setAbsolutePosition
(
QPointF
newPosition
);
void
setAbsolutePosition
(
QPointF
newPosition
);
void
moveLeft
(
double
distance
);
/**
void
moveTop
(
double
distance
);
* Move this shape from its current (absolute) position over a specified distance.
* This takes the position of the shape, and moves it in the normal plain. This takes
* into account the rotation of the object so distanceX really will be the resulting
* horizontal distance.
* @param distanceX the horizontal distance to move
* @param distanceX the vertical distance to move
*/
void
moveBy
(
double
distanceX
,
double
distanceY
);
protected:
protected:
QMatrix
m_invMatrix
;
QMatrix
m_invMatrix
;
...
@@ -409,7 +430,13 @@ protected:
...
@@ -409,7 +430,13 @@ protected:
*/
*/
static
void
applyConversion
(
QPainter
&
painter
,
const
KoViewConverter
&
converter
);
static
void
applyConversion
(
QPainter
&
painter
,
const
KoViewConverter
&
converter
);
void
copySettings
(
const
KoShape
*
shape
);
/**
* Copy all the settings from the parameter shape and apply them to this shape.
* Settings like the position and rotation to visible and locked. The parent
* is a notable exclusion.
* @param shape the shape to use as original
*/
virtual
void
copySettings
(
const
KoShape
*
shape
);
private:
private:
double
m_scaleX
;
double
m_scaleX
;
...
...
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