Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
slide_match 方法内部调用 get_target 方法时也返回了 target_x。反正 target_y 最后也返回了,那 target_x 也顺便返回一下呗?
源码 2660 行是 target_x 初始化逻辑,2685 行是 target_y 返回逻辑。
ddddocr/ddddocr/__init__.py
Lines 2656 to 2686 in 491ce02
因为有的滑块是 png 格式的,这种滑块图片四周有一圈透明的像素。如果能拿到 target_x 的话,在计算滑动距离时就能够获得更精准的结果。所以 target_x 也是有必要返回的。