Search code examples
linemovehalcon

Halcon - Move XLD line


I have a Iconic variable BackWallBoundaryLineXLD It containts 2 points and the line connecting them.

I would need to move this line upwards 40 pixels, so basically change the row coordinate of the line to Currentvalue-40.

Is there a simple and clean way to do it, or do I have to extract the points first, edit them and then draw a new line?


Solution

  • Try

    hom_mat2d_identity (HomMat2DIdentity)
    hom_mat2d_translate (HomMat2DIdentity, -40, 0, HomMat2DTranslate)
    affine_trans_contour_xld (BackWallBoundaryLineXLD, BackWallBoundaryLineXLDTranslated, HomMat2DTranslate)