How to create a screensaver in a smart studio?

When working with graphics, how do I create a screensaver in a smart studio? I want to draw in order to create an image, draw on a canvas, and then copy this graphic to the screen in a game project.

+4
source share
1 answer

http://op4js.optimalesystemer.no/2012/01/10/how-do-i-move-graphics-from-the-canvas-to-an-image/

In short:

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('')); 
+3
source

Source: https://habr.com/ru/post/1412912/


All Articles