Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何通过程序添加splines? #38

Open
fupeng opened this issue Dec 29, 2014 · 2 comments
Open

如何通过程序添加splines? #38

fupeng opened this issue Dec 29, 2014 · 2 comments

Comments

@fupeng
Copy link

fupeng commented Dec 29, 2014

现在可以通过以下方法实现:
helper.command = @"splines";
_adapter->dispatchPan(kGiGestureBegan, pt, true);
_adapter->dispatchPan(kGiGestureMoved, pt);
_adapter->dispatchPan(kGiGestureEnded, _lastPt, true);

但这是通过模拟屏幕Gesture实现的,但是当显示缩放很小时,效果很差。

是否有更好方法?

@rhcad
Copy link
Owner

rhcad commented Dec 29, 2014

可使用带坐标的绘图命令串,例如 helper.command = @"splines{'points':[1,-10,12,-11,24,-32,56,-43,48,-35,59,-8],'multiMoved':true}"

@fupeng
Copy link
Author

fupeng commented Dec 30, 2014

试了一下,缩放后每次调用上面这绘图命令串,显示的效果都不一样。

我的需求是从网络接受绘图指令,有不同的视图坐标。

能否分离Gesture和实际的绘制? 在模型坐标绘制,另外有专门的Gesture完成视图坐标到模型坐标的转换。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants