<Type Name="Graphics" FullName="Gtk.DotNet.Graphics">
  <TypeSignature Language="C#" Value="public class Graphics" Maintainer="auto" />
  <AssemblyInfo>
    <AssemblyName>gtk-dotnet</AssemblyName>
    <AssemblyPublicKey>[00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 71 EB 6C 55 75 52 9C BF 72 44 F7 A6 EA 05 62 84 F9 EA E0 3B CF F2 CC 13 2C 9C 49 0A B3 09 EA B0 B5 6B CE 44 9D F5 03 D9 C0 A8 1E 52 05 85 CD BE 70 E2 FB 90 43 4B AC 04 FA 62 22 A8 00 98 B7 A1 A7 B3 AF 99 1A 41 23 24 BB 43 25 F6 B8 65 BB 64 EB F6 D1 C2 06 D5 73 2D DF BC 70 A7 38 9E E5 3E 0C 24 6E 32 79 74 1A D0 05 03 E4 98 42 E1 9B F3 7B 19 8B 40 21 26 CB 36 89 C2 EA 64 96 A4 7C B4]</AssemblyPublicKey>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
    <AssemblyCulture>neutral</AssemblyCulture>
    <Attributes />
  </AssemblyInfo>
  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
  <Docs>
    <summary>Gdk to System.Drawing.Graphics interoperability.</summary>
    <remarks />
  </Docs>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Attributes />
  <Members>
    <Member MemberName="FromDrawable">
      <MemberSignature Language="C#" Value="public static System.Drawing.Graphics FromDrawable (Gdk.Drawable drawable);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Drawing.Graphics</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="drawable" Type="Gdk.Drawable" />
      </Parameters>
      <Docs>
        <summary>Gets a <see cref="T:System.Drawing.Graphics" /> context for a <see cref="T:Gdk.Drawable" /></summary>
        <param name="drawable">a <see cref="T:Gdk.Drawable" /></param>
        <returns>a <see cref="T:System.Drawing.Graphics" /></returns>
        <remarks>Use this method to obtain a System.Drawing.Graphics context from a Gtk drawable.

<para>
   Both pixmaps (<see cref="T:Gdk.Pixmap" />) and windows (<see cref="T:Gdk.Window" />) are drawables (<see cref="T:Gdk.Drawable" />).
</para><para>
The following example shows how to create a custom widget that renders a mesh.  This example overrides the OnExposeEvent method and uses <see cref="N:System.Drawing" /> calls to do the actual drawing:
</para><example>
            <code lang="C#">
using System.Drawing;
using Gtk;

class PrettyGraphic : DrawingArea {

	public PrettyGraphic ()
	{
		SetSizeRequest (200, 200);
	}
			       
	protected override bool OnExposeEvent (Gdk.EventExpose args)
	{
		using (Graphics g = Gtk.DotNet.Graphics.FromDrawable (args.Window)){
			Pen p = new Pen (Color.Blue, 1.0f);

			for (int i = 0; i &lt; 600; i += 60)
				for (int j = 0; j &lt; 600; j += 60)
					g.DrawLine (p, i, 0, 0, j);
		}
		return true;
	}
}
  </code>
          </example></remarks>
      </Docs>
    </Member>
    <Member MemberName="FromDrawable">
      <MemberSignature Language="C#" Value="public static System.Drawing.Graphics FromDrawable (Gdk.Drawable drawable, bool double_buffered);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Drawing.Graphics</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="drawable" Type="Gdk.Drawable" />
        <Parameter Name="double_buffered" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <summary>To be added</summary>
        <param name="drawable">a <see cref="T:Gdk.Drawable" /></param>
        <param name="double_buffered">a <see cref="T:System.Boolean" /></param>
        <returns>a <see cref="T:System.Drawing.Graphics" /></returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
  </Members>
</Type>