<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/HU/dxDrawPrimitive?action=history&amp;feed=atom</id>
	<title>HU/dxDrawPrimitive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/HU/dxDrawPrimitive?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HU/dxDrawPrimitive&amp;action=history"/>
	<updated>2026-04-07T05:26:28Z</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=HU/dxDrawPrimitive&amp;diff=60122&amp;oldid=prev</id>
		<title>Surge: /* Lásd még */</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HU/dxDrawPrimitive&amp;diff=60122&amp;oldid=prev"/>
		<updated>2018-10-26T17:13:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Lásd még&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:13, 26 October 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Lásd még==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Lásd még==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Drawing_functions}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Drawing_functions &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;hu&lt;/ins&gt;}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[en:dxDrawPrimitive]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[en:dxDrawPrimitive]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-60121:rev-60122 --&gt;
&lt;/table&gt;</summary>
		<author><name>Surge</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HU/dxDrawPrimitive&amp;diff=60121&amp;oldid=prev</id>
		<title>Surge: Created page with &quot;__NOTOC__  {{Client function hu}}  {{New feature/item|3.0157|1.5.6|14203|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be us...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HU/dxDrawPrimitive&amp;diff=60121&amp;oldid=prev"/>
		<updated>2018-10-26T17:13:23Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function hu}}  {{New feature/item|3.0157|1.5.6|14203|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be us...&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 hu}} &lt;br /&gt;
{{New feature/item|3.0157|1.5.6|14203|This function draws a 2D primitive shape across the screen - rendered for one frame. This should be used in conjunction with [[onClientRender]] in order to display continuously.}}&lt;br /&gt;
&lt;br /&gt;
==Szintaxis== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dxDrawPrimitive ( string pType, bool postGUI, table vertice1 [, table vertice2, ...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Kötelező paraméterek=== &lt;br /&gt;
* '''pType:''' Type of primitive to be drawn.&lt;br /&gt;
* '''postGUI:''' A bool representing whether the line should be drawn on top of or behind any ingame GUI (rendered by CEGUI).&lt;br /&gt;
* '''vertices:''' Tables representing each primitive vertice, required amount of them is determined by primitive type.&lt;br /&gt;
&lt;br /&gt;
==Engedélyezett típusok==&lt;br /&gt;
[[Image:MTAsa_primitives.png|thumb|240px|Available primitive types.]]&lt;br /&gt;
More info on primitives may be found on [https://msdn.microsoft.com/en-us/library/windows/desktop/bb147291(v=vs.85).aspx this MSDN site] &lt;br /&gt;
* '''pointlist:''' Renders the vertices as a collection of isolated points.&lt;br /&gt;
* '''linelist:''' Renders the vertices as a list of isolated straight line segments.&lt;br /&gt;
* '''linestrip:''' Renders the vertices as a single polyline.&lt;br /&gt;
* '''trianglelist:''' Renders the specified vertices as a sequence of isolated triangles. Each group of three vertices defines a separate triangle.&lt;br /&gt;
* '''trianglestrip:''' Renders the vertices as a triangle strip.&lt;br /&gt;
* '''trianglefan:''' Renders the vertices as a triangle fan.&lt;br /&gt;
&lt;br /&gt;
==Vertices format==&lt;br /&gt;
* '''posX:''' An float representing the absolute X position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''posY:''' An float representing the absolute Y position of the vertice, represented by pixels on the screen.&lt;br /&gt;
* '''color (optional):''' An integer of the hex color, produced using [[tocolor]] or 0xAARRGGBB (AA = alpha, RR = red, GG = green, BB = blue). If it's not specified, white color is used.&lt;br /&gt;
&lt;br /&gt;
===Visszatérési érték===&lt;br /&gt;
Returns a ''true'' if the operation was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Példa== &lt;br /&gt;
This is a small example that creates trianglefan primitive with vertices in places that user clicks. It assigns every vertice random color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local vertices = {}&lt;br /&gt;
function onClick(btn, state, x, y)&lt;br /&gt;
	if btn ~= &amp;quot;left&amp;quot; then return end&lt;br /&gt;
	if state ~= &amp;quot;up&amp;quot; then return end&lt;br /&gt;
	local vertice = {x, y, tocolor(math.random(255), math.random(255), math.random(255))}&lt;br /&gt;
	table.insert(vertices, vertice)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientClick&amp;quot;, root, onClick)&lt;br /&gt;
&lt;br /&gt;
function draw()&lt;br /&gt;
	dxDrawPrimitive(&amp;quot;trianglefan&amp;quot;, true, unpack(vertices))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPreRender&amp;quot;, root, draw)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Lásd még==&lt;br /&gt;
{{Drawing_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:dxDrawPrimitive]]&lt;/div&gt;</summary>
		<author><name>Surge</name></author>
	</entry>
</feed>