Fixes MakeTransparent method
[mono.git] / mcs / class / System.Drawing / System.Drawing / gdipStructs.cs
index d7bb5b66a9e6de6748d0e85e6fe7d370d78e72d3..101fbf575b33127298e29ad634afe7c66f0a9b1f 100644 (file)
@@ -143,5 +143,23 @@ namespace System.Drawing
                internal EncoderParameterValueType type;
                internal IntPtr value;
        }
+
+       [StructLayout(LayoutKind.Sequential)]
+       internal struct GdipPropertyItem
+       {
+               internal int id;
+               internal int len;
+               internal short type;
+               internal IntPtr value;
+
+               internal static void MarshalTo (GdipPropertyItem gdipProp, PropertyItem prop)
+               {       
+                       prop.Id = gdipProp.id;
+                       prop.Len = gdipProp.len;
+                       prop.Type = gdipProp.type;
+                       prop.Value = new byte [gdipProp.len];                   
+                       Marshal.Copy (gdipProp.value, prop.Value, 0, gdipProp.len);
+               }
+       }
 }