Difference between revisions of "D3d.DrawRect"
From Nomad DB
(Created page with "Draws a rectangle on the screen. The color is set using d3d.SetColor. {{Warning|This function can only be called from inside OnRender event!}}...") |
|||
Line 1: | Line 1: | ||
+ | {{Page_WD2}}{{Page_MDE}}{{Page_WDL}} | ||
Draws a rectangle on the screen. The color is set using [[d3d.SetColor]]. | Draws a rectangle on the screen. The color is set using [[d3d.SetColor]]. | ||
Line 21: | Line 22: | ||
==Related Pages== | ==Related Pages== | ||
− | *[[ | + | *[[ScriptHook: Rendering]] |
*[[d3d.SetColor]] | *[[d3d.SetColor]] | ||
[[Category:WD2 ScriptHook Lua]] | [[Category:WD2 ScriptHook Lua]] | ||
+ | [[Category:WDL ScriptHook Lua]] |
Latest revision as of 11:12, 15 April 2021
Draws a rectangle on the screen. The color is set using d3d.SetColor.
This function can only be called from inside OnRender event!
Syntax
d3d.DrawRect(x, y, w, h)
- x, y: number (Position)
- w, h: width (number), height (number)
Example
Draws a red square at 50x50.
function script:OnRender()
d3d.SetColor(255, 0, 0) --red
d3d.DrawRect(50, 50, 50, 50)
end