Exemplo n.º 1
0
 public Color(global::SharpSDL.Color _0)
 {
     __Instance                     = Marshal.AllocHGlobal(sizeof(global::SharpSDL.Color.__Internal));
     __ownsNativeInstance           = true;
     NativeToManagedMap[__Instance] = this;
     *((global::SharpSDL.Color.__Internal *)__Instance) = *((global::SharpSDL.Color.__Internal *)_0.__Instance);
 }
Exemplo n.º 2
0
        /// <summary>Set a range of colors in a palette.</summary>
/// <param name="palette">The palette to modify.</param>
/// <param name="colors">An array of colors to copy into the palette.</param>
/// <param name="firstcolor">The index of the first palette entry to modify.</param>
/// <param name="ncolors">The number of entries to modify.</param>
/// <returns>0 on success, or -1 if not all of the colors could be set.</returns>
        public static int SetPaletteColors(global::SharpSDL.Palette palette, global::SharpSDL.Color colors, int firstcolor, int ncolors)
        {
            var __arg0 = ReferenceEquals(palette, null) ? global::System.IntPtr.Zero : palette.__Instance;
            var __arg1 = ReferenceEquals(colors, null) ? global::System.IntPtr.Zero : colors.__Instance;
            var __ret  = __Internal.SetPaletteColors(__arg0, __arg1, firstcolor, ncolors);

            return(__ret);
        }