[英]transparent erase in iOS- Titanium
我上面有兩個圖像,我想從頂部圖像中刪除一小部分以顯示背景圖像。 使用鈦制iOS可以進行透明擦除嗎?
謝謝和問候,GANESH 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();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.