|
Important words about drawers
There is the only important thing you have to remember - store all the data in TImageEditor. TImageEditor has two special properties: integer DrawerData for storing states, flags and other current simple information, and DrawerObject (TObject type) for storing any complex data. TImageEditor knows nothing about these properties because both of them used only by drawers. Be careful with these properties and remember that other drawers can modify them too. Our standard drawers stores only temporary data and release objects when tool is changed, but you can create your own class for DrawerObject and store data for all used drawers at the same time (for instance by two level list with drawers in the first level and drawers' data in the second one), you can even use DrawerObjects for storing the vector objects which can be drawn on TImageEditor with easy by AfterPaintEditor method or appropriate event. You choose, but be careful.
|