New paste Repaste Download
diff --git a/dgl/NanoVG.hpp b/dgl/NanoVG.hpp
index f9c5eb7d..977946f7 100644
--- a/dgl/NanoVG.hpp
+++ b/dgl/NanoVG.hpp
@@ -962,6 +962,7 @@ protected:
      @see onDisplay
    */
    virtual void onNanoDisplay() = 0;
+    virtual void onNanoDisplayAfter() {}
private:
   /**
diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp
index 56546d76..3c88f54c 100644
--- a/dgl/src/NanoVG.cpp
+++ b/dgl/src/NanoVG.cpp
@@ -1135,14 +1135,16 @@ inline void NanoBaseWidget<SubWidget>::onDisplay()
        NanoVG::save();
        translate(SubWidget::getAbsoluteX(), SubWidget::getAbsoluteY());
        onNanoDisplay();
-        NanoVG::restore();
        displayChildren();
+        onNanoDisplayAfter();
+        NanoVG::restore();
    }
    else
    {
        NanoVG::beginFrame(SubWidget::getWidth(), SubWidget::getHeight());
        onNanoDisplay();
        displayChildren();
+        onNanoDisplayAfter();
        NanoVG::endFrame();
    }
}
Filename: None. Size: 989b. View raw, , hex, or download this file.

This paste expires on 2026-02-28 07:42:20.220003+00:00. Pasted through web.