Where to store data between strokes

LukasT.dev@gmail.com lukast.dev at gmail.com
Mon Jun 28 23:37:52 CEST 2010


I would like to ask you for advice and your opinion about where to store data 
related to strokes so that paintOps can access them.

E.g. harmony brush engine stores list of nodes between strokes so that new 
stroke can be connected with old stroke. I need to store QVector<QPointF> 
somewhere and I need to be able to add and read points from it.Not just per 
stroke in paintop but for some longer moment as in Harmony e.g. til the user 
changes the tool or paintop - KisPaintOpSettings::activate() method ;)

One problem for this solution is undo. If the user do undo, the data, should 
be undone too. But let's say this is nice to have feature. First we need to be 
able to store data somewhere.

Also Pentalis needs to store some bitmap between strokes to avoid its 
recreation for scratch off algorithm.

I was thinking about using KisPaintOpSettings but we pass it as const object.

1. Can we change the API and make it writable? or 
2 We create new API with one other object which would be used to store between 
strokes data?
3. Do you think that tool could be responsible for this? If so, how?

More information about the kimageshop mailing list