summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/spray-tool.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-02-27 23:00:40 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-02-27 23:00:40 +0000
commita06efaf2a7e31b8ed38efead9259fd02560c5299 (patch)
tree3d71752e8694917c4190f2326985ed735e19cf53 /src/ui/tools/spray-tool.cpp
parentswatches dialog: remove unused code part. cleanup some code (diff)
downloadinkscape-a06efaf2a7e31b8ed38efead9259fd02560c5299.tar.gz
inkscape-a06efaf2a7e31b8ed38efead9259fd02560c5299.zip
remove some unnecessary copying/casting
(bzr r13070)
Diffstat (limited to 'src/ui/tools/spray-tool.cpp')
-rw-r--r--src/ui/tools/spray-tool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp
index 2fc3f1c91..c9f9c8e91 100644
--- a/src/ui/tools/spray-tool.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -114,9 +114,9 @@ inline double NormalDistribution(double mu, double sigma)
static void sp_spray_rotate_rel(Geom::Point c, SPDesktop */*desktop*/, SPItem *item, Geom::Rotate const &rotation)
{
Geom::Translate const s(c);
- Geom::Affine affine = Geom::Affine(s).inverse() * Geom::Affine(rotation) * Geom::Affine(s);
+ Geom::Affine affine = s.inverse() * rotation * s;
// Rotate item.
- item->set_i2d_affine(item->i2dt_affine() * (Geom::Affine)affine);
+ item->set_i2d_affine(item->i2dt_affine() * affine);
// Use each item's own transform writer, consistent with sp_selection_apply_affine()
item->doWriteTransform(item->getRepr(), item->transform);
// Restore the center position (it's changed because the bbox center changed)
@@ -516,8 +516,8 @@ static bool sp_spray_recursive(SPDesktop *desktop,
static bool sp_spray_dilate(SprayTool *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
{
- Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(tc)->desktop);
- SPDesktop *desktop = SP_EVENT_CONTEXT(tc)->desktop;
+ SPDesktop *desktop = tc->desktop;
+ Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
return false;