Open rfarid opened 8 years ago
Hi @rfarid , is this boundary check a proposed feature? Or is it an existing feature that isn't working? I've run into the same issue of labels outside the image while labeling.
Hi @nickdeveaux, It is a proposed one. I have done it in my "fixedRatioRect" branch. (Commits on Oct 13, 2015)
Thanks for the info. plus 1 on getting that branch into master
@rfarid, would you be so kind and do a pull-request? I promise to take a look at it soonish!
@nilsonholger, sure. Just it might take time. Please be patient since I need a bit of time to go through docs to do the pull-request properly.
@rfarid Sure, take your time, if you have any questions, feel free to ask here. I don't think the docs state anything about pull-requests except for "Of course, pull requests are always welcome!", so don't sweat it. If it compiles, doesn't break anything and the code looks decent, it will be just fine! Thank you for your effort!
Having a rectangle label, you might end up with invalid x,y,w,h values such as negative values for x,y and too big values for x,y,w,h in which x+w>image.width and y+h>image.height The boundary check during creation, moving and resizing of the label can solve this issue.