<Type Name="Rgb" FullName="Gdk.Rgb">
  <TypeSignature Language="C#" Value="public class Rgb" Maintainer="auto" />
  <AssemblyInfo>
    <AssemblyName>gdk-sharp</AssemblyName>
    <AssemblyPublicKey>
    </AssemblyPublicKey>
    <AssemblyVersion>2.12.0.0</AssemblyVersion>
  </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>
      <para>
Gdk's <see cref="T:Gdk.Rgb" /> is a low-level module which renders RGB, grayscale, and indexed colormap images to a <see cref="T:Gdk.Drawable" />. It does this as efficiently as possible, handling issues such as colormaps, visuals, dithering, temporary buffers, and so on. Most code should use the higher-level GdkPixbuf features in place of this module; for example, gdk_pixbuf_render_to_drawable() uses GdkRGB in its implementation.
</para>
      <para>
GdkRGB allocates a color cube to use when rendering images. You can set the threshold for installing colormaps with the Gdk.<see cref="M:Gdk.Rgb.MinColors" /> property. The default is 5x5x5 (125). If a colorcube of this size or larger can be allocated in the default colormap, then that's done. Otherwise, GdkRGB creates its own private colormap. Setting it to 0 means that it always tries to use the default colormap, and setting it to 216 means that it always creates a private one if it cannot allocate the 6x6x6 colormap in the default. If you always want a private colormap (to avoid consuming too many colormap entries for other apps, say), you can use gdk_rgb_set_install(TRUE). Setting the value greater than 216 exercises a bug in older versions of GdkRGB. Note, however, that setting it to 0 doesn't let you get away with ignoring the colormap and visual - a colormap is always created in grayscale and direct color modes, and the visual is changed in cases where a "better" visual than the default is available. 
</para>
    </summary>
    <remarks />
  </Docs>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces />
  <Members>
    <Member MemberName="FindColor">
      <MemberSignature Language="C#" Value="public static void FindColor (Gdk.Colormap colormap, ref Gdk.Color color);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="colormap" Type="Gdk.Colormap" />
        <Parameter Name="color" Type="Gdk.Color&amp;" RefType="ref" />
      </Parameters>
      <Docs>
        <summary>Fetches a color to be used on the given colormap.</summary>
        <param name="colormap">Tthe colormap for the graphics context and drawable you're using to draw. If you're drawing to a <see cref="T:Gtk.Widget" />, use the <see cref="P:Gtk.Widget.Colormap" /> property.</param>
        <param name="color">Color should have its red, green, and blue fields initialized.</param>
        <remarks>This routine will fill in the pixel field with the best matching pixel from a color cube. The color is then ready to be used for drawing, e.g. you can use <see cref="P:Gtk.GC.Foreground" /> which expects the pixel to be initialized.

<para>
In many cases, you can avoid this whole issue by setting the <see cref="P:Gdk.GC.RgbFgColor" /> or <see cref="P:Gdk.GC.RgbBgColor" />, which do not expect pixel to be initialized in advance. If you use those functions, there's no need for using FindColor.
</para></remarks>
      </Docs>
    </Member>
    <Member MemberName="Ditherable">
      <MemberSignature Language="C#" Value="public static bool Ditherable ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Whether the visual in use by GdkRGB is dithereable.</summary>
        <returns>
          <see langword="true" /> if the visual is ditherable.</returns>
        <remarks>Determines whether the visual is ditherable. This function may be useful for presenting a user interface choice to the user about which dither mode is desired; if the display is not ditherable, it may make sense to gray out or hide the corresponding UI widget.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public Rgb ();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>Basic constructor.</summary>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="MinColors">
      <MemberSignature Language="C#" Value="public static int MinColors { set; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Int32</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>The minimum number of colors for this colormap.</summary>
        <value>a <see cref="T:System.Int32" /></value>
        <remarks>Sets the minimum number of colors for the color cube. Generally, GdkRGB tries to allocate the largest color cube it can. If it can't allocate a color cube at least as large as min_colors, it installs a private colormap.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Visual">
      <MemberSignature Language="C#" Value="public static Gdk.Visual Visual { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>Gdk.Visual</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>The preferred visual for GdkRGB operations.</summary>
        <value>a <see cref="T:Gdk.Visual" /></value>
        <remarks>Gets a "preferred visual" chosen by GdkRGB for rendering image data on the default screen. In previous versions of GDK, this was the only visual GdkRGB could use for rendering. In current versions, it's simply the visual GdkRGB would have chosen as the optimal one in those previous versions. GdkRGB can now render to drawables with any visual.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Install">
      <MemberSignature Language="C#" Value="public static bool Install { set; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>Whether to install a private colormap for Gdk.RGB</summary>
        <value>a <see cref="T:System.Boolean" /></value>
        <remarks>If the value is <see langword="true" />, it directs GdkRGB to always install a new "private" colormap rather than trying to find a best fit with the colors already allocated. Ordinarily, GdkRGB will install a colormap only if a sufficient cube cannot be allocated.
<para>
A private colormap has more colors, leading to better quality display, but also leads to the dreaded "colormap flashing" effect. 
</para></remarks>
      </Docs>
    </Member>
    <Member MemberName="Colormap">
      <MemberSignature Language="C#" Value="public static Gdk.Colormap Colormap { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>Gdk.Colormap</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Get preferred colormap for using Gdk.RGB</summary>
        <value>The preferred <see cref="T:Gdk.Colormap" />.</value>
        <remarks>Get the preferred colormap for rendering image data. Not a very useful function; historically, GDK could only render RGB image data to one colormap and visual, but in the current version it can render to any colormap and visual. So there's no need to call this function.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Verbose">
      <MemberSignature Language="C#" Value="public static bool Verbose { set; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
      </Parameters>
      <Docs>
        <summary>Whether or not to be verbose to the console about actions. Useful for debugging.</summary>
        <value>a <see cref="T:System.Boolean" /></value>
        <remarks />
      </Docs>
    </Member>
    <Member MemberName="GcSetForeground">
      <MemberSignature Language="C#" Value="public static void GcSetForeground (Gdk.GC gc, uint rgb);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="gc" Type="Gdk.GC" />
        <Parameter Name="rgb" Type="System.UInt32" />
      </Parameters>
      <Docs>
        <summary>To be added</summary>
        <param name="gc">a <see cref="T:Gdk.GC" /></param>
        <param name="rgb">a <see cref="T:System.UInt32" /></param>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.4" />
      </Docs>
    </Member>
    <Member MemberName="GcSetBackground">
      <MemberSignature Language="C#" Value="public static void GcSetBackground (Gdk.GC gc, uint rgb);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="gc" Type="Gdk.GC" />
        <Parameter Name="rgb" Type="System.UInt32" />
      </Parameters>
      <Docs>
        <summary>To be added</summary>
        <param name="gc">a <see cref="T:Gdk.GC" /></param>
        <param name="rgb">a <see cref="T:System.UInt32" /></param>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.4" />
      </Docs>
    </Member>
    <Member MemberName="XpixelFromRgb">
      <MemberSignature Language="C#" Value="public static ulong XpixelFromRgb (uint rgb);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.UInt64</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="rgb" Type="System.UInt32" />
      </Parameters>
      <Docs>
        <summary>To be added</summary>
        <param name="rgb">a <see cref="T:System.UInt32" /></param>
        <returns>a <see cref="T:System.UInt64" /></returns>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.4" />
      </Docs>
    </Member>
    <Member MemberName="Init">
      <MemberSignature Language="C#" Value="public static void Init ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added</summary>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.4" />
      </Docs>
    </Member>
    <Member MemberName="ColormapDitherable">
      <MemberSignature Language="C#" Value="public static bool ColormapDitherable (Gdk.Colormap cmap);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="cmap" Type="Gdk.Colormap" />
      </Parameters>
      <Docs>
        <summary>To be added</summary>
        <param name="cmap">a <see cref="T:Gdk.Colormap" /></param>
        <returns>a <see cref="T:System.Boolean" /></returns>
        <remarks>To be added</remarks>
        <since version="Gtk# 2.6" />
      </Docs>
    </Member>
  </Members>
</Type>
