How to draw a new square in the screen?

hi,
i want to draw a new square in my screen.
but i don’t find the config file.

static gboolean
overlay_graphics (AppCtx * appCtx, GstBuffer * buf,
    NvDsBatchMeta * batch_meta, guint index)

i only find the function to draw the line but the line will be flicker????

pls refer https://docs.nvidia.com/metropolis/deepstream/plugin-manual/index.html#page/DeepStream_Plugin_Manual%2Fdeepstream_plugin_metadata_migration.html%23wwpID0EJHA
and https://docs.nvidia.com/metropolis/deepstream/dev-guide/DeepStream_Development_Guide/baggage/struct__NvOSD__LineParams.html

I use app sources/apps/sample_apps/deepstream-infer-tensor-meta-test to draw lines, code added in
osd_sink_pad_buffer_probe, i do not see a flicker, you can give a try.

NvOSD_LineParams *line_params  = display_meta->line_params;
display_meta->num_lines = 2;
line_params[0].x1 = 30;
line_params[0].y1 = 50;
line_params[0].x2 = 150;
line_params[0].y2 = 150;
line_params[1].x1 = 50;
line_params[1].y1 =  110;
line_params[1].x2 = 150;
line_params[1].y2 = 150;
line_params[0].line_width = 2;
line_params[0].line_color = (NvOSD_ColorParams){1.0, 0.0, 0.0, 0.5};
line_params[1].line_width = 2;
line_params[1].line_color = (NvOSD_ColorParams){1.0, 0.0, 0.0, 0.5};

about draw square, refer to this, https://docs.nvidia.com/metropolis/deepstream/dev-guide/DeepStream%20Development%20Guide/baggage/group__ee__nvosd__group.html
int nvll_osd_draw_rectangles (void *nvosd_ctx, NvOSD_FrameRectParams *frame_rect_params)