Table of Contents

Method OnDrawComplete

Namespace
Terminal.Gui.ViewBase
Assembly
Terminal.Gui.dll

OnDrawComplete(DrawContext?)

Called when the View has completed drawing and is about to update the clip region.

protected virtual void OnDrawComplete(DrawContext? context)

Parameters

context DrawContext

The DrawContext containing the regions that were drawn by this view and its subviews. May be null if not tracking drawn regions.

Remarks

This method is called at the very end of Draw(DrawContext?), after all drawing (adornments, content, text, subviews, line canvas) has completed but before the view's area is excluded from Clip.

Use this method to:

  • Perform any final drawing operations that need to happen after SubViews are drawn
  • Inspect what was drawn via the context parameter
  • Add additional regions to the context if needed

Important: At this point, Clip has been restored to the state it was in when Draw(DrawContext?) began. After this method returns, the view's area will be excluded from the clip (see DoDrawComplete(DrawContext) for details).

Transparency Support: If ViewportSettings includes Transparent, the context parameter contains the actual regions that were drawn. You can inspect this to see what areas will be excluded from the clip, and optionally add more regions if needed.

See Also