How to add overlay UI or line to the frame?

Hi,I use deepstream in jetson-nano.
Maybe I can use gst-plugins\gst-dsexample.
I know how to add obj_label to the frame. nvds_add_obj_meta_to_frame() can work.
But how to add overlay UI or line to the frame?

Same issue with https://devtalk.nvidia.com/default/topic/1072942/deepstream-sdk/how-to-draw-line-on-the-frame-/?offset=2#5435959

OK,thanks.