Difference between revisions of "Lua:getScreenCanvas"

From Cheat Engine
Jump to navigation Jump to search
(Created page with "Category:Lua {{CodeBox|'''function''' getScreenCanvas() ''':''' Canvas}} Returns a Canvas object that can be used to draw or write directly to the screen. Note: This fun...")
 
m
 
Line 4: Line 4:
 
Returns a Canvas object that can be used to draw or write directly to the screen.
 
Returns a Canvas object that can be used to draw or write directly to the screen.
  
Note: This function is not as useful as it may seem, since drawing directly to the screen is usually temporary and can be overwritten by normal screen updates.
+
'''Note''': This function is not as useful as it may seem, since drawing directly to the screen is usually temporary and can be overwritten by normal screen updates.
  
 
===Function Parameters===
 
===Function Parameters===

Latest revision as of 03:49, 21 June 2026

<> Function

function getScreenCanvas() : Canvas

Returns a Canvas object that can be used to draw or write directly to the screen.

Note: This function is not as useful as it may seem, since drawing directly to the screen is usually temporary and can be overwritten by normal screen updates.

Function Parameters[edit]

This function has no parameters.

Returns[edit]

Canvas — A Canvas object that can be used to draw or write to the screen.

Examples[edit]

local canvas = getScreenCanvas()
canvas.TextOut(100, 100, "Hello World")

See also[edit]

Lua
Script Engine