首页 \ 问答 \ ImageView没有显示图像Titanium(ImageView not showing image Titanium)

ImageView没有显示图像Titanium(ImageView not showing image Titanium)

我的所有代码(链接到imgur)

为什么图像不会出现在模拟器中?

所有代码,以防您不想点击上面的链接:

var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});

var image = Ti.UI.createImageView({
    image: '/images/name.png',
    width:200
});

win.add(image);

win.open();

在上面的链接中,您可以看到没有拼写错误或任何东西


All my code (links to imgur)

Why does the image not show up in the emulator?

All code in case you don't want to click the link above:

var win = Ti.UI.createWindow({
    backgroundColor: 'white'
});

var image = Ti.UI.createImageView({
    image: '/images/name.png',
    width:200
});

win.add(image);

win.open();

In the link above you can see there are no spelling mistakes or anything


原文:https://stackoverflow.com/questions/38425809
更新时间:2023-09-04 19:09

最满意答案

Kinetic非常稳固而且开放

http://kineticjs.com/

好的tutourial网站,让你入门

http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-rect-tutorial/

EaselJS更加公司化...... http://www.createjs.com/#!/EaselJS


Kinetic is pretty solid and its open

http://kineticjs.com/

good tutourial site to get you started

http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-rect-tutorial/

EaselJS is more corporate... http://www.createjs.com/#!/EaselJS

相关问答

更多
  • 你应该看看RaphaelJS。 它是一个围绕Canvas,SVG和VML(仅用于IE6的SVG之前的仅限IE的矢量标记语言)的JavaScript,跨浏览器的包装库。 使用RaphaelJS,您可以使用JS与广泛的浏览器兼容生成各种各样的矢量图形。 http://raphaeljs.com/ RaphaelJS也与jQuery非常兼容,并遵循jQuery中看到的很多相同的调用链。 这两个成为一对。 You should take a look at RaphaelJS. It is a JavaScript ...
  • 看起来paperjs.org几乎是我所需要的。 我还在研究,如果有其他人有想法,我会全力以赴。 谢谢! 一些参考文献:使用路径的封闭形状多边形: http : //scriptographer.org/tutorials/paths/working-with-path-items/ 使用两个形状通过加法减法创建一个: http : //scriptographer.org/tutorials/paths/geometric-operations/ Looks like paperjs.org has pre ...
  • Kinetic非常稳固而且开放 http://kineticjs.com/ 好的tutourial网站,让你入门 http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-rect-tutorial/ EaselJS更加公司化...... http://www.createjs.com/#!/EaselJS Kinetic is pretty solid and its open http://kineticjs.com/ go ...
  • 请将此变量转换为整数,它将解决您的问题。 parseFloat(shapeCoordinates[sh]['lat']) Please convert this variable to integer it will solve your issue. parseFloat(shapeCoordinates[sh]['lat'])
  • 首先填充矩形,然后在其上绘制。 : class MyCanvas extends JComponent { public void paint(Graphics g) { g.fillRect(x, y, width, height); g.drawRect(x, y, width, height); } } First fill the rectangle and then draw on top of it.: class MyCanvas exten ...
  • 您正在寻找的是UIBezierPath 。 Core Graphics将为您绘制这样的路径,以及其他魔法,如掩蔽。 核心动画也可以沿贝塞尔路径移动对象。 请享用 :) What you're looking for is UIBezierPath. Core Graphics will draw along such paths for you, as well as other magic such as masking. Core Animation can move objects along bez ...
  • Paper.js 根据他们的网站: Paper.JS是一个开源矢量图形脚本框架,运行在HTML5 Canvas之上。 和 为您可以使用鼠标(或触摸屏)执行的不同操作提供鼠标处理程序。 three.js所 javascript中的另一个图形库是three.js 。 根据他们的网站: 该项目的目的是创建一个复杂程度非常低的轻量级3D库 - 换句话说,就是假人。 该库提供canvas,svg和WebGL渲染器。 我不确定在库中处理鼠标事件的支持有多好。 以下SO问题涉及一个例子: Three.js中几何的事件处理 ...
  • 你可以用画布来做。 几个月前有一个类似于这个问题的Javascript绘图库? 。 Processing.js允许你这样做。 You can do it using canvas. There was a question similar to this a few months ago Javascript drawing library?. There is Processing.js that allows you to do it too.
  • 目前没有聚合物元素可以让您在Google地图上绘制形状。 但是,您可以使用JavaScript访问地图对象并绘制形状。 例如,您可以添加google-map元素: 然后通过访问DOM中地图元素上的地图对象在地图上绘制一些JavaScript: function drawCircle(center, radiu ...
  • [海报澄清后编辑] 此代码将绘制/继续折线到用户下次点击的位置。 如果用户在他们开始的绿色圆圈中单击回来,则会填充折线。 这是代码和小提琴: http : //jsfiddle.net/m1erickson/qwd2a/