paintops

Boudewijn Rempt boud at valdyas.org
Tue May 29 21:36:43 CEST 2007


Hi,

Thanks to Hulmanen's patience we've uncovered a design flaw in our paintops.
When I designed paintops way back in the old days, I didn't realize that when 
you have pressure settings the spacing of the brush footprints would change. 
Or rather, when you have pressure but don't change the size of the brush 
footprint, the spacing should not change. This is a problem, because the 
spacing of the brush footprints is not under control of KisPaintop but of 
KisPainter::paintLine.

For 2.0, we have to do better. There are other types of paintops (bristle 
simulating brushes spring to mind) where the paintop needs to have control 
over the line that needs to be painted between two mouse/tablet events (note 
that mouse/tablet events never occur at the right spacing: we always have to 
either in-between, hence paintLine, or skip a few, if the brush is too 
large).

paintLine is the only (?) method in KisPainter that is called when doing 
freehand work that involves tablet settings. 

The rect, star etc. tools don't do pressure, I believe. So the 
KisPainter::paintLine in-betweening code is fine for those.

I've got the following design proposal, but I don't claim it's the best:

add a KisPaintop::paintLine(QPointF pos1, QpointF pos2, const 
KisPaintInformation& info)

This method _can_ call KisPainter::paintLine, which calls the paintops's 
paintAt method repeatedly. Or it can do something new and wondrous to 
in-between.

The freehand tools then call KisPaintop::paintLine instead.

Any better ideas?

-- 
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/20070529/d45b82c8/attachment.pgp 


More information about the kimageshop mailing list