<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=IQ65</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=IQ65"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/IQ65"/>
	<updated>2026-04-22T04:57:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78589</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78589"/>
		<updated>2023-11-15T14:13:06Z</updated>

		<summary type="html">&lt;p&gt;IQ65: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draws a rounded corner rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, width, height, radius, color, align, postGUI, subPixelPositioning)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sx, sy = guiGetScreenSize()&lt;br /&gt;
local x, y, w, h = sx/2-200, sy/2-200, 400, 400&lt;br /&gt;
local rounded = 10&lt;br /&gt;
local color = tocolor(0, 0, 0, 200)&lt;br /&gt;
&lt;br /&gt;
addEventHandler('onClientRender', root, function ()&lt;br /&gt;
    dxDrawRoundedRectangle(x, y, w, h, rounded, color)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Example by @IQ65&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 1==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, width, height, radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+radius, width-(radius*2), height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle(x+radius, (y+height)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, (y+height)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawRectangle(x, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+height-radius, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+width-radius, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 2==&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, w, h, radius = 10, color = tocolor(255, 255, 255, 255), align = 'full', postGUI = false, subPixelPositioning = false)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local data = {}&lt;br /&gt;
data.resolution = {}&lt;br /&gt;
data.resolution.x, data.resolution.y = guiGetScreenSize()&lt;br /&gt;
data.mainRect = {}&lt;br /&gt;
data.mainRect.width = 300&lt;br /&gt;
data.mainRect.height = 500&lt;br /&gt;
&lt;br /&gt;
dxDrawRoundedRectangle(&lt;br /&gt;
    data.resolution.x-data.mainRect.width,&lt;br /&gt;
    data.resolution.y-data.mainRect.height,&lt;br /&gt;
    data.mainRect.width,&lt;br /&gt;
    data.mainRect.height,&lt;br /&gt;
    10,&lt;br /&gt;
    0xffffffff,&lt;br /&gt;
    'top',&lt;br /&gt;
    false,&lt;br /&gt;
    false&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, w, h, radius, color, align, postGUI)&lt;br /&gt;
	if not x or not y or not w or not h then return end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 10&lt;br /&gt;
	local color = color or tocolor(255, 255, 255, 255)&lt;br /&gt;
	local align = align or 'full'&lt;br /&gt;
&lt;br /&gt;
	if w &amp;lt; radius then&lt;br /&gt;
		w = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
		&lt;br /&gt;
	elseif h &amp;lt; radius then&lt;br /&gt;
		h = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if align == 'full' or align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if align == 'full' or align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
			&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	if align == 'full' then&lt;br /&gt;
		dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original by [[User:Extasy]]&lt;br /&gt;
&lt;br /&gt;
Rewritten by [[User:Woovie]]&lt;br /&gt;
&lt;br /&gt;
Code 2 by [[User:.WhiteBlue]]&lt;/div&gt;</summary>
		<author><name>IQ65</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78588</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78588"/>
		<updated>2023-11-15T14:11:47Z</updated>

		<summary type="html">&lt;p&gt;IQ65: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draws a rounded corner rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, width, height, radius, color, align, postGUI, subPixelPositioning)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sx, sy = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
addEventHandler('onClientRender', root, function ()&lt;br /&gt;
    dxDrawRoundedRectangle(sx/2-200, sy/2-200, 400, 400, 10, tocolor(0, 0, 0, 200))&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Example by @IQ65&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 1==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, width, height, radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+radius, width-(radius*2), height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle(x+radius, (y+height)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, (y+height)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawRectangle(x, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+height-radius, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+width-radius, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 2==&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, w, h, radius = 10, color = tocolor(255, 255, 255, 255), align = 'full', postGUI = false, subPixelPositioning = false)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local data = {}&lt;br /&gt;
data.resolution = {}&lt;br /&gt;
data.resolution.x, data.resolution.y = guiGetScreenSize()&lt;br /&gt;
data.mainRect = {}&lt;br /&gt;
data.mainRect.width = 300&lt;br /&gt;
data.mainRect.height = 500&lt;br /&gt;
&lt;br /&gt;
dxDrawRoundedRectangle(&lt;br /&gt;
    data.resolution.x-data.mainRect.width,&lt;br /&gt;
    data.resolution.y-data.mainRect.height,&lt;br /&gt;
    data.mainRect.width,&lt;br /&gt;
    data.mainRect.height,&lt;br /&gt;
    10,&lt;br /&gt;
    0xffffffff,&lt;br /&gt;
    'top',&lt;br /&gt;
    false,&lt;br /&gt;
    false&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, w, h, radius, color, align, postGUI)&lt;br /&gt;
	if not x or not y or not w or not h then return end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 10&lt;br /&gt;
	local color = color or tocolor(255, 255, 255, 255)&lt;br /&gt;
	local align = align or 'full'&lt;br /&gt;
&lt;br /&gt;
	if w &amp;lt; radius then&lt;br /&gt;
		w = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
		&lt;br /&gt;
	elseif h &amp;lt; radius then&lt;br /&gt;
		h = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if align == 'full' or align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if align == 'full' or align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
			&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	if align == 'full' then&lt;br /&gt;
		dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original by [[User:Extasy]]&lt;br /&gt;
&lt;br /&gt;
Rewritten by [[User:Woovie]]&lt;br /&gt;
&lt;br /&gt;
Code 2 by [[User:.WhiteBlue]]&lt;/div&gt;</summary>
		<author><name>IQ65</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78587</id>
		<title>RoundedRectangle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RoundedRectangle&amp;diff=78587"/>
		<updated>2023-11-15T14:10:39Z</updated>

		<summary type="html">&lt;p&gt;IQ65: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
&amp;lt;lowercasetitle&amp;gt;&amp;lt;/lowercasetitle&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function draws a rounded corner rectangle.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, width, height, radius, color, align, postGUI, subPixelPositioning)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sx, sy = guiGetScreenSize()&lt;br /&gt;
&lt;br /&gt;
addEventHandler('onClientRender', root, function ()&lt;br /&gt;
    dxDrawRoundedRectangle(sx/2-200, sy/2-200, 400, 400, 10, tocolor(0, 0, 0, 200))&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 1==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, width, height, radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+radius, width-(radius*2), height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle(x+radius, (y+height)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, (y+height)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawCircle((x+width)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
    dxDrawRectangle(x, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y+height-radius, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+width-radius, y+radius, radius, height-(radius*2), color, postGUI, subPixelPositioning)&lt;br /&gt;
    dxDrawRectangle(x+radius, y, width-(radius*2), radius, color, postGUI, subPixelPositioning)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code 2==&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;nil dxDrawRoundedRectangle(x, y, w, h, radius = 10, color = tocolor(255, 255, 255, 255), align = 'full', postGUI = false, subPixelPositioning = false)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local data = {}&lt;br /&gt;
data.resolution = {}&lt;br /&gt;
data.resolution.x, data.resolution.y = guiGetScreenSize()&lt;br /&gt;
data.mainRect = {}&lt;br /&gt;
data.mainRect.width = 300&lt;br /&gt;
data.mainRect.height = 500&lt;br /&gt;
&lt;br /&gt;
dxDrawRoundedRectangle(&lt;br /&gt;
    data.resolution.x-data.mainRect.width,&lt;br /&gt;
    data.resolution.y-data.mainRect.height,&lt;br /&gt;
    data.mainRect.width,&lt;br /&gt;
    data.mainRect.height,&lt;br /&gt;
    10,&lt;br /&gt;
    0xffffffff,&lt;br /&gt;
    'top',&lt;br /&gt;
    false,&lt;br /&gt;
    false&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client side&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function dxDrawRoundedRectangle(x, y, w, h, radius, color, align, postGUI)&lt;br /&gt;
	if not x or not y or not w or not h then return end&lt;br /&gt;
&lt;br /&gt;
	local radius = radius or 10&lt;br /&gt;
	local color = color or tocolor(255, 255, 255, 255)&lt;br /&gt;
	local align = align or 'full'&lt;br /&gt;
&lt;br /&gt;
	if w &amp;lt; radius then&lt;br /&gt;
		w = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
		&lt;br /&gt;
	elseif h &amp;lt; radius then&lt;br /&gt;
		h = 0&lt;br /&gt;
		radius = 0&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if align == 'full' or align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, y+radius, radius, 180, 270, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, y+radius, radius, 270, 360, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'top' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if align == 'full' or align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
		if align == 'right' then&lt;br /&gt;
			dxDrawRectangle(x, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
			&lt;br /&gt;
		elseif align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - radius, radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
		else&lt;br /&gt;
			dxDrawRectangle(x + radius, y + h - radius, w - (radius * 2), radius, color, postGUI)&lt;br /&gt;
			dxDrawCircle(x+radius, (y+h)-radius, radius, 90, 180, color, color, 16, 1, postGUI)&lt;br /&gt;
			dxDrawCircle((x+w)-radius, (y+h)-radius, radius, 0, 90, color, color, 16, 1, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
&lt;br /&gt;
		if align == 'bottom' or align == 'right' or align == 'left' then&lt;br /&gt;
			dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
		&lt;br /&gt;
	if align == 'full' then&lt;br /&gt;
		dxDrawRectangle(x, y + radius, w, h - (radius * 2), color, postGUI)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Original by [[User:Extasy]]&lt;br /&gt;
&lt;br /&gt;
Rewritten by [[User:Woovie]]&lt;br /&gt;
&lt;br /&gt;
Code 2 by [[User:.WhiteBlue]]&lt;/div&gt;</summary>
		<author><name>IQ65</name></author>
	</entry>
</feed>