上に2つの画像があり、上の画像から小さな部分を消去して背景画像を表示したい。iOSのチタンを使って透明消去はできますか?
ありがとう、よろしく、ガネーシュM
上に2つの画像があり、上の画像から小さな部分を消去して背景画像を表示したい。iOSのチタンを使って透明消去はできますか?
ありがとう、よろしく、ガネーシュM
これは、 ti.paint モジュールを使用して行うことができます。具体的には、キャンバス上に消去可能な画像を表示する機能です。インストール後、これを試してください:
// Container window
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
// Background image
var backgroundImage = Ti.UI.createImageView({
image : 'yourbgimage.png'
width : Ti.UI.FILL,
height : Ti.UI.FILL
});
// Require paint module and add to view with an erasable image
var Paint = require('ti.paint');
var paintView = Paint.createPaintView({
image : 'yourfgimage.png', // This is the image you erase
eraseMode : true,
width : Ti.UI.FILL,
height : Ti.UI.FILL,
strokeColor : '#0f0', strokeAlpha : 255, strokeWidth : 10
});
win.add(backgroundImage);
win.add(paintView);
win.open();