OS X Cocoa 中的交互式曲线编辑器
我的目标是在 Cocoa OS X 10.6 中为 GUI 组件实现可编辑的样条曲线或贝塞尔曲线。该功能可能与 ichart RapahelJS 演示类似 http://raphaeljs.com/icart.html或曲线点上的典型“插画类型”手柄。曲线的精确规范具有一定的可塑性,并且可以符合可用的/更容易实现的。
因此,我希望找到一个能够提供坚实基础并应用标准 Cocoa 模式的库或组件。我看过 Core Plot,它对于实际绘制数据似乎很棒,但显然没有提供修改数据数组的交互式方法。
我是否遗漏了某些东西,或者必须在 NSView 中从头开始实现这样的东西(包括命中测试)?谢谢。
I am aiming to implement an editable spline or bezier curve for a GUI component in Cocoa OS X 10.6. The functionality could be along the line of the ichart RapahelJS demo http://raphaeljs.com/ichart.html or a typical "illustrator-type" handle on the curve points. Exact specification of the curve is somewhat malleable and can conform to what is available/simpler to implement.
So I am hoping to find a library or component that provides a solid basis, with the standard Cocoa patterns applied. I've looked at Core Plot, which seems great to actually plot data, but apparently does not offer interactive methods to modify a data array.
Am I missing something or must such a thing (including hit tests) be implemented from scratch in an NSView? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可能想查看 Graham Cox 的 DrawKit。这是一个极其复杂的框架,示例应用程序令人惊叹。
You might like to check out DrawKit by Graham Cox. It's an extremely sophisticated framework and the sample app is amazing.
AppKit 中没有“免费”提供贝塞尔路径编辑器。 Dave DeLong 和我一直在开发一款名为 BezierBuilder 的贝塞尔曲线编辑器应用程序,该应用程序可在 GitHub 上找到。您也许可以提取
BezierView
类及其一些依赖项。我不会说这个应用程序是通过任何想象力完成的。如果您将其集成到您自己的应用程序中,您肯定会想要更改一些内容。但无论如何,这只是一个开始。
There is no Bezier path editor provided "free" as part of AppKit. Dave DeLong and I have been working on a bezier curve editor app called BezierBuilder which is available at GitHub. You may be able to pull out the
BezierView
class and some of its dependencies.I wouldn't say the app's done by any stretch of the imagination; there are certainly things you'll want to change if you're integrating it into your own app. But it's a start, anyway.