|
How to use TImageEditor?
Nothing special. All you need is to drop control onto the form and link it with any drawer component using Drawers property. TImageEditor has several properties which interprets by drawers: Tool, Mode, Option and Value. For instance, TStandardDrawer defines toolRectangle constant for Tool property. If the Tool is toolRectangle, TStandardDrawer draws rectangle. In this case Mode interprets as a fill mode and Value interprets as a pen width.
TImageEditor receives all keyboard and mouse events and translates them into drawers' methods calls. For instance, when user presses mouse button, TImageEditor calls StartDraw method, when user moves the mouse with pressed mouse button, TImageEditor calls Draw method for each new mouse position and when user releases button, TImageEditor calls StopDraw method.
TImageEditor iterates all the drawer components included into Drawers collection till some drawer's method returns False. If some drawer returns True in its method, iteration is stopped. This allows to combine functionality of several drawers.
See more detailed information about Image Editor Suite Acritecture.
|