prominenceai/deepstream-services-library

Implement new connect-label-bbox ODE Action - dsl_ode_action_label_connect_to_bbox_new

rjhowell44 opened this issue · 1 comments

A new ODE Action to draw a line from the label's x and y coordinates to a specific point on the object's bbox. The Action is designed to be used with the Offset-Label Action.

Note: the line will be draw with 2 segments - one segment always drawn at 45 deg angle from the bbox point, plus a horizontal segment to complete the line.

/**
 * @brief Creates a uniquely named "Connect Object Label to BBox" ODE Action that
 * connects the object label (x,y offset) with a line to a defined corner of
 * the Object's bbox. This Action should be used with the "Offset Label" Action.
 * @param[in] name unique name for the "Snap Object Label to Grid ODE Action. 
 * @param[in] line_color name of the RGBA color to use for the connecting line
 * @param[in] line_width width value for the connecting line.
 * @param[in] bbox_point one of the DSL_BBOX_POINT symbolic constants.
 * @return DSL_RESULT_SUCCESS on success, one of DSL_RESULT_ODE_ACTION_RESULT otherwise.
 */
DslReturnType dsl_ode_action_label_connect_to_bbox_new(const wchar_t* name,  
    const wchar_t* line_color, uint line_width, uint bbox_point);

Merged into the v0.30.alpha dev branch