Giter VIP home page Giter VIP logo

Comments (1)

wenlng avatar wenlng commented on May 20, 2024

正常情况下

  • 前端的坐标是以左上角来计算的,这毫无问题

和服务器储存的坐标信息对比,你会发现:

  • X轴的坐标信息是对的(Dx <= fontendX <= Dx+Width),这毫无问题
  • Y轴的坐标信息是错的,前端的Y轴坐标小于了后端的Y轴开始坐标,也就是(fontendY <= Dy <= Dy_Height),你肯定会很紧张,以为自己算错了

把心放肚子里

  • 这是因为文字的坐标是以文字的左下角为原点的,也就是说服务端储存的Dy值已经是加上了Height之后的值了
  • 前端不需要任何处理,后端会在比对的时候自动减去Height值再进行比对,也就是(Dy - Height)≈ fontendY
  • 所以放心大胆的把这个看起来错误的Y值传给服务器,它会自己处理的

嘿,v2 版本即将更新,坐标会有所变化哟 _

from go-captcha.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.