paintops

Boudewijn Rempt boud at valdyas.org
Thu May 31 08:55:46 CEST 2007


On Wednesday 30 May 2007, Schleimer, Ben wrote:

<...>

> After looking at KisToolBrush in krita 1.6, it seems more reasonable for
> the tool to upcast the paintOp, set the static and dynamic paint options,
> set the paintOp inside the painter and then call the painter's drawLine,
> paintAt, etc methods without passing any paint info through the paint.
> Then the painter is only resposible for calling the paintop at the correct
> position.

That means the tool has to know about the various kinds of paintops there are, 
doesn't it? I'm not sure that that's a good idea. The goal is to have 
duplicate, for instance, not be a tool, but a paintop. Same with 
paint-with-filters.

The important problem I understand to be that sometimes paintops need to know 
something like the copy-from location for the clone paintop -- which is 
created through an alt-click. Wouldn't the best solution be to add the 
modifier keys to KisPaintInformation. Then we would have something like this:

KisPaintInformation. This class should contain the information the tool 
receives from the stylus: position, pressure, tilt, rotation -- maybe also 
angle to the previous direction. What we're also missing here are modifier 
keys: if those are passed through, then we can implement duplicate, for 
instance, entirely inside the paintop, which should make it possible to use 
duplicate in the other tools, for instance the line tool. 

KisPaintOpSettings and subclasses: these should contain all the settings for 
the paintop like clone-from location and what to do with pressure. The 
KisPaintopSettings object is persistent; there is one per input device per 
tool per paintop and the settings are filled through the paintop settings 
widget or through the paintop.

KisPainter -- this should know which paintdevice to paint on and several 
global resources, like fg color, bg color, pattern, gradient. (This falls 
down when we get more complex settings, such as the blended paint load the 
user will be able to pickup from the paint mixer. But there the user will 
drag his stylus through the mixer and the bidi-enabled paintop will pickup 
the complex color).

KisPaintop: persistent through the stroke, draws the brush from position a to 
position b in whatever way fits the bill. Is initialized with the cached 
KisPaintOpSettings object and for every stroke a KisPaintInformation object 
for start and end.
  
-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20070531/c44eeb8e/attachment.pgp 


More information about the kimageshop mailing list