<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsLineGetItemWidth?action=history&amp;feed=atom</id>
	<title>DgsLineGetItemWidth - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsLineGetItemWidth?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLineGetItemWidth&amp;action=history"/>
	<updated>2026-04-24T01:45:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsLineGetItemWidth&amp;diff=75996&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}} This function gets the width of an item of DGS Line.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; float dgsLineGetItemWidth( element line, int index ) &lt;/syntaxhighlight&gt;   ===Required Arguments===  *'''line''': The DGS Line. *'''index''': The item index.  ===Returns=== Returns a ''float'' indicates the width of the item if successful, ''false'' otherwise  ==Example==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; DGS = exports.dgs  local line = DGS:dgsCreateLi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLineGetItemWidth&amp;diff=75996&amp;oldid=prev"/>
		<updated>2023-01-10T12:13:42Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}} This function gets the width of an item of DGS Line.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; float dgsLineGetItemWidth( element line, int index ) &amp;lt;/syntaxhighlight&amp;gt;   ===Required Arguments===  *&amp;#039;&amp;#039;&amp;#039;line&amp;#039;&amp;#039;&amp;#039;: The DGS Line. *&amp;#039;&amp;#039;&amp;#039;index&amp;#039;&amp;#039;&amp;#039;: The item index.  ===Returns=== Returns a &amp;#039;&amp;#039;float&amp;#039;&amp;#039; indicates the width of the item if successful, &amp;#039;&amp;#039;false&amp;#039;&amp;#039; otherwise  ==Example==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; DGS = exports.dgs  local line = DGS:dgsCreateLi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function gets the width of an item of DGS Line.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float dgsLineGetItemWidth( element line, int index )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''line''': The DGS Line.&lt;br /&gt;
*'''index''': The item index.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''float'' indicates the width of the item if successful, ''false'' otherwise&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local line = DGS:dgsCreateLine(400,200,600,400)&lt;br /&gt;
local sinX = math.sin(0/500*4*math.pi)&lt;br /&gt;
DGS:dgsLineAddItem(line,0/500,sinX/2+0.5,0/500,sinX/2+0.5,2,tocolor(0,255,0,255),true)&lt;br /&gt;
for i=1,100 do&lt;br /&gt;
	local sinX = math.sin(i/100*4*math.pi)&lt;br /&gt;
	DGS:dgsLineAddItem(line,_,_,i/100,sinX/2+0.5,2,tocolor(i/100*255,255-i/100*255,0,255),true)&lt;br /&gt;
end&lt;br /&gt;
local width = DGS:dgsLineGetItemWidth(line, 1)&lt;br /&gt;
outputChatBox(&amp;quot;Width: &amp;quot;..width)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>