VintaSoft Imaging .NET SDK v8.7
In This Topic
    CompositeVisualTool class
    In This Topic

    CompositeVisualTool is used for creation a composition of several visual tools, which can be of different type. The main feature of this visual tool is protected CompositeVisualTool.VisualTools property that is an array of CompositeVisualTool type elements.

    The visual tool logic of work is rather simple and is divided into following stages:


    The drawing of visual tools is performed in reverse order to the order they are stored in CompositeVisualTool.VisualTools array. Thus the first visual tool will be drawn over others.

    The event transfer from input devices to visual tools is performed in the same order they are stored in CompositeVisualTool.VisualTools array. The transfer of event is performed until the next in turn visual tool sets e.Handled flag of event arguments to True - the sign that the event from input device was processed by visual tool.

    The event transfer from base tool VisualTool (such as OnActivate, OnDeactivate) to visual tools is performed in the same order they are stored in CompositeVisualTool.VisualTools array.

    The important feature of CompositeVisualTool is CompositeVisualTool.ActiveTool property of VisualTool type. When the value of CompositeVisualTool.ActiveTool is set the events from input devices will be transferred only to the visual tool defined by CompositeVisualTool.ActiveTool property. The drawing of CompositeVisualTool.ActiveTool visual tool will be performed last of all to ensure its position (Z order) above other visual tools. This property basically is used to organize the logic of temporary capturing of input device by some visual tool which is a part of CompositeVisualTool.

    The composite visual tools can be commonly enough met in VintaSoft Imaging .NET SDK, e.g.: