@@ -19,6 +19,7 @@ public:
|
||||
// Animations
|
||||
bool needsAnimation() const;
|
||||
void updateAnimations();
|
||||
void cancelAnimations();
|
||||
|
||||
// Relative changes
|
||||
void moveBy(double dx, double dy);
|
||||
|
||||
@@ -28,6 +28,10 @@ void Transform::updateAnimations() {
|
||||
});
|
||||
}
|
||||
|
||||
void Transform::cancelAnimations() {
|
||||
animations.clear();
|
||||
}
|
||||
|
||||
void Transform::moveBy(double dx, double dy) {
|
||||
x += cos(angle) * dx + sin(angle) * dy;
|
||||
y += cos(angle) * dy + sin(-angle) * dx;
|
||||
|
||||
Reference in New Issue
Block a user