<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsMaskAdaptTextureSize?action=history&amp;feed=atom</id>
	<title>DgsMaskAdaptTextureSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsMaskAdaptTextureSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMaskAdaptTextureSize&amp;action=history"/>
	<updated>2026-04-03T19:00:30Z</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=DgsMaskAdaptTextureSize&amp;diff=65317&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}}  This function adapt the size of the source texture of DGS mask.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool dgsMaskAdaptTextureSize( element...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsMaskAdaptTextureSize&amp;diff=65317&amp;oldid=prev"/>
		<updated>2020-03-05T05:41:48Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}}  This function adapt the size of the source texture of DGS mask.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool dgsMaskAdaptTextureSize( element...&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;
&lt;br /&gt;
This function adapt the size of the source texture of DGS mask.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dgsMaskAdaptTextureSize( element mask, int w, int h )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''mask:''' The DGS mask you want to operate.&lt;br /&gt;
*'''w:''' A number of the width of the texture.( See [[dxGetMaterialSize]] )&lt;br /&gt;
*'''h:''' A number of the width of the texture.( See [[dxGetMaterialSize]] )&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' 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 --get exported functions from dgs&lt;br /&gt;
&lt;br /&gt;
local sourceTex = dxCreateTexture( &amp;quot;yourTexture.png&amp;quot; )  -- Your Texture&lt;br /&gt;
local mask = DGS:dgsCreateMask( sourceTex, &amp;quot;circle&amp;quot; ) --Use built-in mask (circle)&lt;br /&gt;
local tw,th = dxGetMaterialSize( sourceTex )&lt;br /&gt;
DGS:dgsMaskCenterTexturePosition( mask, tw,th ) --Move the texture to the center&lt;br /&gt;
DGS:dgsMaskAdaptTextureSize( mask, tw,th ) --Auto adapt the size&lt;br /&gt;
local image = DGS:dgsCreateImage( 300, 300,200, 200, mask, false )&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>