sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Duplication Offset (Was: TODO list)


From: Bernhard Herzog
Subject: Duplication Offset (Was: TODO list)
Date: Tue, 16 Nov 2004 17:04:01 +0100
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Bernhard Reiter <address@hidden> writes:

> Giving an offset to duplication allowed a few nice tricks,
> so there should be a funcational replacement.
> When you were thinking of not readding it, 
> what kind of funcational replacement did you have in mind?

There are several aspects to consider, so a bit of background is useful
first.

The actual duplication is done by the DuplicateObjects method of
the EditableCompound class.  The higher level interface to this in the
document (0.6) or the editor 0.7 simply delegates the operation to the
parents of the selected objects.

The DuplicateObjects method used to take the offset as a parameter.
When I was reimplementing the method and was modifying the interface
anyway, I decided to remove that parameter.  The method returns a list
with all the newly created objects so any translation or other
modification can easily be done by the caller.  Having the tranlation in
the DuplicateObjects has only one advantage, namely that the undo
information for the translation can simply be discarded.  The
disadvantage is that the interface is more complication (two different
operations instead of only one) and the offset allows only one specific
kind of transformation.  So on the whole, the offset doesn't make sense
in the DuplicateObjects method.

The DuplicateSelected method of the editor is a bit different but in the
end I decided not to have the offset there either.  I can easily be
added later if we really want it there (adding a new optional parameter
is quite easy, removing one is more difficult) and not having it makes
the method simpler.

All of this is still quite independend of whether the Duplicate command
in the menu translates the objects.  The translation could easily be
done in the command implementation by having it call TranslateSelected
after DuplicateSelected.

That the command doesn't do the translation at the moment was
deliberately done so that we could discuss whether we need it.  I for
one practically never use it.  I always have the offset set to (0, 0).
What I would probably use is a transformation dialog that allows me to
apply precise transformations to the selected objects with the option to
duplicate the objects before the transformation.  That kind of feature
would obviously include the current duplication offset feature.  One
disadvantage of not moving the duplicated objects is that new users may
find the command confusing because the drawing looks the same afterwards.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Skencil                                           http://skencil.org/
Thuban                                  http://thuban.intevation.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]