[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-libs-commits] CVS: xsharp/Xsharp/XWindows Region.cs,1.1.1.1,1.2
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-libs-commits] CVS: xsharp/Xsharp/XWindows Region.cs,1.1.1.1,1.2 |
Date: |
Fri, 27 Sep 2002 08:55:02 -0400 |
Update of /cvsroot/dotgnu-libs/xsharp/Xsharp/XWindows
In directory subversions:/tmp/cvs-serv13755/Xsharp/XWindows
Modified Files:
Region.cs
Log Message:
Add the "ICloneable" interface to the "Region" class.
Index: Region.cs
===================================================================
RCS file: /cvsroot/dotgnu-libs/xsharp/Xsharp/XWindows/Region.cs,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Region.cs 26 Sep 2002 10:32:43 -0000 1.1.1.1
--- Region.cs 27 Sep 2002 12:54:59 -0000 1.2
***************
*** 33,37 ****
/// window shapes, and expose areas.</para>
/// </summary>
! public sealed class Region : IDisposable
{
// Pointer to the raw X11 region structure.
--- 33,37 ----
/// window shapes, and expose areas.</para>
/// </summary>
! public sealed class Region : IDisposable, ICloneable
{
// Pointer to the raw X11 region structure.
***************
*** 254,257 ****
--- 254,278 ----
}
}
+ }
+
+ /// <summary>
+ /// <para>Clone an instance of <see cref="T:XWindows.Region"/>.</para>
+ /// </summary>
+ ///
+ /// <remarks>
+ /// <para>This method implements the <see cref="T:System.ICloneable"/>
+ /// interface.</para>
+ /// </remarks>
+ public Object Clone()
+ {
+ Region r = new Region();
+ lock(typeof(Region))
+ {
+ if(region != IntPtr.Zero)
+ {
+ Xlib.XUnionRegion(region,
r.region, r.region);
+ }
+ }
+ return r;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-libs-commits] CVS: xsharp/Xsharp/XWindows Region.cs,1.1.1.1,1.2,
Rhys Weatherley <address@hidden> <=