<Type Name="Pattern" FullName="Cairo.Pattern">
  <TypeSignature Language="C#" Value="public class Pattern : IDisposable" />
  <AssemblyInfo>
    <AssemblyName>Mono.Cairo</AssemblyName>
    <AssemblyVersion>1.0.5000.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.IDisposable</InterfaceName>
    </Interface>
  </Interfaces>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="protected Pattern ();" />
      <MemberType>Constructor</MemberType>
      <Parameters />
      <Docs>
        <summary>Internal constructor for creating an empty Pattern object.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Pattern (Cairo.Surface surface);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="surface" Type="Cairo.Surface" />
      </Parameters>
      <Docs>
        <param name="surface">the cairo surface.</param>
        <summary> Create a new Pattern for the given surface.
</summary>
        <remarks />
      </Docs>
      <Attributes>
        <Attribute>
          <AttributeName>System.Obsolete("Use the SurfacePattern constructor")</AttributeName>
        </Attribute>
      </Attributes>
    </Member>
    <Member MemberName="pattern">
      <MemberSignature Language="C#" Value="protected IntPtr pattern;" />
      <MemberType>Field</MemberType>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Cairo's C API pattern.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="Reference">
      <MemberSignature Language="C#" Value="protected void Reference ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>References (increments reference count) of the pattern.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="Destroy">
      <MemberSignature Language="C#" Value="public void Destroy ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Destroys a Pattern.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="Status">
      <MemberSignature Language="C#" Value="public Cairo.Status Status { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>Cairo.Status</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Checks whether an error has previously occurred for this surface.</summary>
        <value>the status</value>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="Matrix">
      <MemberSignature Language="C#" Value="public Cairo.Matrix Matrix { set; get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>Cairo.Matrix</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Gets or sets the Matrix for the current pattern.</summary>
        <value>the matrix</value>
        <remarks>
        </remarks>
      </Docs>
    </Member>
    <Member MemberName="Pointer">
      <MemberSignature Language="C#" Value="public IntPtr Pointer { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Provides access to the raw Cairo C API pattern.</summary>
        <value>the pointer</value>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="PatternType">
      <MemberSignature Language="C#" Value="public Cairo.PatternType PatternType { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>Cairo.PatternType</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>The type of the patter.</summary>
        <value>To be added.</value>
        <remarks>Returns the type of the pattern.</remarks>
        <since version="cairo 1.2" />
      </Docs>
    </Member>
    <Member MemberName="Dispose">
      <MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="disposing" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="disposing">Whether this is being called from IDisposable.Dispose.</param>
        <summary>Internal method, called by derived classes that might implement Dispose.</summary>
        <remarks>
        </remarks>
        <since version="Mono-1.2.5" />
      </Docs>
    </Member>
  </Members>
  <Docs>
    <summary>Patterns allow you to tile or extend images and objects and allow you to draw things like gradients.</summary>
    <remarks>
      <example>
        <code lang="C#">
/* example assumes the Graphics object has already been set up  and width and height are initialized*/

        static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
                ImageSurface image;
                Matrix matrix;
                Pattern pattern;

                gr.Scale (width, height);
                gr.LineWidth = 0.04;

                image = new ImageSurface ("data/e.png");
                w = image.Width;
                h = image.Height;

                pattern = new Pattern (image);
                pattern.Extend = Cairo.Extend.Repeat;

                gr.Translate (0.5, 0.5);
                gr.Rotate (Math.PI / 4);
                gr.Scale (1 / Math.Sqrt (2), 1 / Math.Sqrt (2));
                gr.Translate (- 0.5, - 0.5);

                matrix = new Matrix ();
                matrix.InitScale (w * 5.0, h * 5.0);

                pattern.Matrix = matrix;

                gr.Pattern = pattern;

                gr.Rectangle ( new PointD (0, 0),
                               1.0, 1.0);
                gr.Fill ();

                pattern.Destroy ();
                image.Destroy();
        }
  </code>
      </example>
    </remarks>
  </Docs>
</Type>
