Thursday 3 June 2010

Tool refactored

Refactored CTool (renamed Drawing_Tool) and it's now the owner of brushes. Before that I placed brushes into editor window class. The problem was that Drawing_Tool had double data for such things as brush shape. Now when shape is in the Brush class itself and brush objects are inside the Drawing_Tool the double/copy data went away.

The dummy or shadow mouse of editor window is now also working, but it's still flickering which could be easy to fix. Actual drawing operations went to Drawing_Tool class as well. It added passing of some variables, but it's cleaner that way, because brush objects now contained in Drawing_Tool.

To restore the previous version's operations I only need to add brush size commands. I think icons could be better than using 1-6 keys for shortcut, but they could be both there.

No comments: