brushes and brush engines
emanuele at valinor.it
emanuele at valinor.it
Thu Mar 20 12:32:51 CET 2008
I'd say:
- KisBrush -> KisBrushStamp or KisBrushTip
- KisPaintOp -> I see no reason to change this, I'd suggest
KisPaintOperation. It can even be *not* related to brushes at all, so
why call it KisBrushEngine or KisBrushOperation? It can represent a
pen, a pencil, an airbrush, a china... So I'd leave it as
KisPaintOperation, meaning that it is called from the Paint Tool to do
a "single" operation in the "overall operation" that the tool is doing
for the user.
- KisPaintopSettings -> KisOperationState. This class stores the state
that the PaintOperation will use to operate, so it's an operation
state :) I have some doubt on how and what should pass this class to
the paint operation though... I think it's done by the paint tool.
Another problem I see in this class is that something in it is
serializable, some other thing is not. For example: this class stores
the actual position of the mouse, and there is no meaning in serialize
it. But it contains the operation settings too, and those need to be
stored... why not split this in two classes then?
- KisPaintopSettings -> KisOperationSettings, containing the
serializable bits.
This class could even be loaded from the
paintop without
being passed from the tool, it could read the settings
from a registry or something
-> KisOperationState. This is the information that only
has a sense inside the overall operation the user is
doing right now, and has no meaning outside it, so it
shouldn't be serialized. It contains the
pointer state,
and some other things needed by the tool or by the
paintop. It preserves the information between two
paintop creations.
Emanuele
More information about the kimageshop
mailing list