Click or drag to resize

ImageViewOnAfterZoneCustomDrawing Event

This event is fired when EnableCustomDrawing and ZonesVisible properties are True, and the control is about to finish painting one of the zones.

Namespace:  Kofax.OmniPageCSDK.ToolBoxes
Assembly:  Kofax.OmniPageCSDK.ToolBoxes (in Kofax.OmniPageCSDK.ToolBoxes.dll) Version: 1.0.0.0
Syntax
public event ImageViewAfterZoneCustomDrawingHandler OnAfterZoneCustomDrawing

Value

Type: Kofax.OmniPageCSDK.ToolBoxesImageViewAfterZoneCustomDrawingHandler
Remarks

This event allows you to override or modify the default zone drawing implementation. ZoneIndex identifies the zone being drawn according to the current IproPlus UserZones collection position. The Rects parameter holds an array of IPRORECT structures defining the layout of the currently drawn zone. For simple, rectangular zones this array has only a single item containing the bounding rectangle. For more complicated, irregular zones the array has a number of non-intersecting rectangles whose union covers the zone surface being painted. If the Active parameter is true, the zone being painted is the active one. If Selected is True, then the zone being painted is one of the selected zones. DC contains the memory HDC which you can use to perform painting.

The items in the Rects array hold View coordinates. Because the DC parameter is also assigned to the View coordinate system, the IPRORECT structures are already mapped and scaled accordingly. You do not need to perform any coordinate transformation prior to calling the GDI functions you use for custom painting. To learn more about the ImageView coordinate systems and the usage of this event, refer to the Coordinate Systems chapter in the documentation.

Use this event if you need to extend the default ImageView zone drawing capabilities with some custom additions. In this case ensure that the BeforeZoneCustomDrawing event returns True, so the default control drawing code will paint the zone as usual. Once the default painting is done, the AfterZoneCustomDrawing event is raised to provide a final opportunity to add custom drawing over the default rendering.

See Also