<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE funcs
  SYSTEM '../../../clonk.dtd'>
<?xml-stylesheet type="text/xsl" href="../../../clonk.xsl"?>
<funcs>
  <func>
    <title>DrawMaterialQuad</title>
    <category>Landscape</category>
    <version>5.1 OC</version>
    <syntax>
      <rtype>bool</rtype>
      <params>
        <param>
          <type>string</type>
          <name>szMaterialTexture</name>
          <desc>Material-Texture combination for the material to be drawn.</desc>
        </param>
        <param>
          <type>int</type>
          <name>x1</name>
          <desc>X coordinate of the first corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y1</name>
          <desc>Y coordinate of the first corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>x2</name>
          <desc>X coordinate of the second corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y2</name>
          <desc>Y coordinate of the second corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>x3</name>
          <desc>X coordinate of the third corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y3</name>
          <desc>Y coordinate of the third corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>x4</name>
          <desc>X coordinate of the fourth corner. Always global.</desc>
        </param>
        <param>
          <type>int</type>
          <name>y4</name>
          <desc>Y coordinate of the fourth corner. Always global.</desc>
        </param>
        <param>
          <type>any</type>
          <name>szBkgMat</name>
          <desc>One of the symbolic constants <code>DMQ_Sky</code>, <code>DMQ_Sub</code> or <code>DMQ_Bridge</code>, or a material texture combination. Specifies the background material of the chunk drawn. If <code>DMQ_Sky</code>, the material will be drawn with sky background. If <code>DMQ_Sub</code>, the material will be drawn with the default underground material as background. If <code>DMQ_Bridge</code>, the material will be drawn only over layers of equal or lower density, and the background material remains unchanged. If this is a string, the specified material-texture combination is used as background material. The background material is the material that a pixel is replaced with when it is digged away or blasted free.</desc>
        </param>
      </params>
    </syntax>
    <desc>Draws a four-cornered polygon of the specified material and texture into the landscape.</desc>
    <remark>The corners of the polygon should be specified in clockwise order and polygon boundaries should not intersect. For more complex or concave shapes you can make multiple calls to this function.</remark>
    <examples>
      <example>
        <code>DrawMaterialQuad(&quot;Gold-gold&quot;, 0,0, <funclink>LandscapeWidth</funclink>()-1,0, <funclink>LandscapeWidth</funclink>()-1,<funclink>LandscapeHeight</funclink>()-1, 0,<funclink>LandscapeHeight</funclink>()-1);</code>
        <text>Fills the complete landscape with gold.</text>
      </example>
    </examples>
    <related>
      <funclink>InsertMaterial</funclink>
    </related>
  </func>
  <author>Sven2</author><date>2002-05</date>
  <author>Clonk-Karl</author><date>2015-07</date>
</funcs>
