Resource loading

Sven Langkamp longamp at reallygood.de
Mon Aug 23 16:37:21 CEST 2004


Boudewijn Rempt wrote:

>On Monday 23 August 2004 14:54, Sven Langkamp wrote:
>  
>
>>I think it would be better to load the resouces inside the resouce
>>mediator and use e.g KisResourceServer::brushes() to make sure that they
>>are loaded more than once.
>>    
>>
>
>"Not" -- I guess you mean. Yes, something like that, analogous to the tile 
>mediator. But is there need for the view to posses its own brushes? There are 
>per-brush settings, and perhaps we don't want those (e.g., use as mask) to 
>propagate to all other views, or perhaps we do... I'm not sure. It sure 
>_sounds_ logical to assume that a brush is a brush and a tool is a tool, and 
>that the current settings for a tool are the same from view to view. After 
>all, when I pick up a brush in real life and I dip it in green paint, then 
>I've still got green paint on the brush in my hand even if I turn around to 
>another easel.
>  
>
I think you misunderstood me. I mean resouces should be loaded once. But 
the current selected brush, pattern etc. can be different in each view.

>On the other hand, currently Krita is set so that everything that contains 
>visible state data is unique to each view, making it possible to have 
>different opacity settings and so on for different tools and brushes in 
>different views. That appears to be how we designed it. It also follows 
>somewhat logically from the fact that our dockers are closely linked to the 
>view (which contrasts with the Gimp, which doesn't open a new colour palette 
>for every open image.)
>
>To keep things consistent, it would be best to load the resources once, and 
>create new instances of each resource for each new view, a bit like what I 
>intend to do to make the tools into kparts.
>
Maybe I should make a patch to make clear what I mean.


More information about the kimageshop mailing list