{"hash":"0x405224591DF02025","ns":"GRAPHICS","name":"DRAW_RECT","slug":"DRAW_RECT","official":true,"named":true,"luaName":"DrawRect","game":"rdr3","apiset":"client","returnType":"void","params":[{"name":"x","type":"float"},{"name":"y","type":"float"},{"name":"width","type":"float"},{"name":"height","type":"float"},{"name":"red","type":"int"},{"name":"green","type":"int"},{"name":"blue","type":"int"},{"name":"alpha","type":"int"},{"name":"p8","type":"BOOL"},{"name":"p9","type":"BOOL"}],"summary":"Draws a rectangle on the screen.","descriptions":[{"source":"alloc8or","format":"text","body":"Draws a rectangle on the screen.\n\n-x: The relative X point of the center of the rectangle. (0.0-1.0, 0.0 is the left edge of the screen, 1.0 is the right edge of the screen)\n\n-y: The relative Y point of the center of the rectangle. (0.0-1.0, 0.0 is the top edge of the screen, 1.0 is the bottom edge of the screen)\n\n-width: The relative width of the rectangle. (0.0-1.0, 1.0 means the whole screen width)\n\n-height: The relative height of the rectangle. (0.0-1.0, 1.0 means the whole screen height)\n\n-R: Red part of the color. (0-255)\n\n-G: Green part of the color. (0-255)\n\n-B: Blue part of the color. (0-255)\n\n-A: Alpha part of the color. (0-255, 0 means totally transparent, 255 means totally opaque)"}],"examples":[],"aliases":[],"enums":[],"related":[],"build":"1207","gtaHash":"0x3A618A217E5154F0","gtaJhash":"0xDD2BFC77","sources":["alloc8or"],"doc":2,"url":"https://natives.borderlinerp.com/natives/GRAPHICS/DRAW_RECT","markdownUrl":"https://natives.borderlinerp.com/natives/GRAPHICS/DRAW_RECT.md","snippets":{"lua":"DrawRect(x, y, width, height, red, green, blue, alpha, p8, p9)","luaInvoke":"Citizen.InvokeNative(0x405224591DF02025, x, y, width, height, red, green, blue, alpha, p8, p9)","js":"DrawRect(x, y, width, height, red, green, blue, alpha, p8, p9);","jsInvoke":"Citizen.invokeNative('0x405224591DF02025', x + 0.0000001, y + 0.0000001, width + 0.0000001, height + 0.0000001, red, green, blue, alpha, p8, p9);","csharp":"Function.Call((Hash)0x405224591DF02025, x, y, width, height, red, green, blue, alpha, p8, p9);","notes":["Float parameters: Lua integers (`10`, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write `10.0` or `value + 0.0`. The generated JS wrappers add `0.0000001` to non-zero floats for the same reason."]}}