【问题标题】:How to draw a line on image using appcelerator titanium mobile如何使用 appcelerator Titan Mobile 在图像上画线
【发布时间】:2012-10-04 07:54:39
【问题描述】:

我想为 Galaxy Tab 制作一个应用程序,让我可以绘制图片...类似于 MS Paint 的东西(不要问我为什么 :))所以第一步是:

win = Ti.UI.createWindow({
    backgroundColor: 'black',
    exitOnClose: true
});

image = Ti.UI.createImageView({
  width: 200,
  height: 200
});

image.addEventListener('touchmove', function(e){
   //And here I need somehow to draw a pixel on image at e.x, e.y coordinates
   // How can i do it?
});

那么,我应该如何绘制像素?

【问题讨论】:

    标签: image titanium draw pixels touchmove


    【解决方案1】:

    对不起,我还没有阅读完整的问题。

    试试This,这是一个 Titanium Appcelerator 模块,完全免费 它也有一个简单的例子。您可以轻松使用。

    再次非常抱歉..

    【讨论】:

    • 对不起,您在 imageView 上究竟在哪里绘制像素?我认为这个示例可以用作拖放示例,我的问题是关于如何在我触摸它时在我的图像视图上绘制一个像素......但无论如何还是谢谢你。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多