Code Monkey home page Code Monkey logo

Comments (7)

1993hzw avatar 1993hzw commented on August 20, 2024

两个点确定一条直线。你要保存直线上的所有点?还是确定直线的这两个点?

from graffiti.

Chenshuai770 avatar Chenshuai770 commented on August 20, 2024

直线上所有的点的集合,不用保存直线上的点

from graffiti.

Chenshuai770 avatar Chenshuai770 commented on August 20, 2024

我看了源码,好像是在 mCurrPath.quadTo(
toX(mLastTouchX),
toY(mLastTouchY),
toX((mTouchX + mLastTouchX) / 2),
toY((mTouchY + mLastTouchY) / 2));这里有所有的点得集合,但这里有两个地方调用了,一个是Move得时候,另外一个是Cancel上也有,这里不是很清楚要怎么去保存

from graffiti.

Chenshuai770 avatar Chenshuai770 commented on August 20, 2024

我想知道怎么保存涂鸦上的点的坐标,相对于图片而言,而不是手机屏幕

from graffiti.

1993hzw avatar 1993hzw commented on August 20, 2024

toX() toY()就是把屏幕坐标转换成图片坐标。或者你可以在mPathStack这个集合里找到所有涂鸦的坐标信息。

from graffiti.

Chenshuai770 avatar Chenshuai770 commented on August 20, 2024

楼主,你好.mPathStack的集合好像只记载了按下和抬起这两个点得集合,那么在move中怎么把一条线上的点给记录下来

from graffiti.

1993hzw avatar 1993hzw commented on August 20, 2024

move记录在了GraffitPath里面的Path变量。

from graffiti.

Related Issues (20)

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.