4
使用圖形時,如何在智能移動工作室中創建屏幕外圖像?我想繪畫來創建圖像,繪製到畫布上 - 然後將該圖形複製到遊戲項目中的顯示器上。如何在智能手機工作室中創建屏幕外圖像?
使用圖形時,如何在智能移動工作室中創建屏幕外圖像?我想繪畫來創建圖像,繪製到畫布上 - 然後將該圖形複製到遊戲項目中的顯示器上。如何在智能手機工作室中創建屏幕外圖像?
http://op4js.optimalesystemer.no/2012/01/10/how-do-i-move-graphics-from-the-canvas-to-an-image/
因此,在短期:
var image := TW3Image.Create(self);
//create temp graphic and canvas to draw on
var graph := TW3GraphicContext.Create(NIL);
graph.Allocate(image.Width, image.Height);
var canvas := TW3Canvas.Create(graph);
// Draw some text on the canvas
canvas.font:='10pt verdana';
canvas.FillStyle:='rgb(255,255,255)';
canvas.FillTextF('This was generated on a canvas!',10,20,MAXINT);
//You can load it in as a picture
image.LoadFromUrl(canvas.toDataUrl(''));