dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp Graphics.cs, 1.8, 1.9 InputOut


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/Xsharp Graphics.cs, 1.8, 1.9 InputOutputWidget.cs, 1.3, 1.4
Date: Wed, 23 Jul 2003 20:31:34 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/Xsharp
In directory subversions:/tmp/cvs-serv15342/Xsharp

Modified Files:
        Graphics.cs InputOutputWidget.cs 
Log Message:


Add the "ExposeRegion" property to the "Xsharp.Graphics" class so that
higher layers can query the expose region during an "OnPaint" event.


Index: Graphics.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/Graphics.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** Graphics.cs 8 Jul 2003 02:09:06 -0000       1.8
--- Graphics.cs 24 Jul 2003 00:31:32 -0000      1.9
***************
*** 66,69 ****
--- 66,70 ----
        private Bitmap stipple;
        private byte[] dashPattern;
+       internal Region exposeRegion;
  
        /// <summary>
***************
*** 222,225 ****
--- 223,231 ----
                                        dpy.Unlock();
                                }
+                               if(exposeRegion != null)
+                               {
+                                       exposeRegion.Dispose();
+                                       exposeRegion = null;
+                               }
                        }
  
***************
*** 774,777 ****
--- 780,806 ----
                                {
                                        return stipple;
+                               }
+                       }
+ 
+       /// <summary>
+       /// <para>Get the expose region for this graphics context.</para>
+       /// </summary>
+       ///
+       /// <value>
+       /// <para>The <see cref="T:Xsharp.Region"/> value that was used
+       /// to define the exposed area during an <c>OnPaint</c> call.
+       /// Returns <see langword="null"/> if this object was not created
+       /// in response to an expose.</para>
+       /// </value>
+       ///
+       /// <remarks>
+       /// <para>The expose region will be automatically set as the clipping
+       /// region when the graphics object is created.</para>
+       /// </remarks>
+       public Region ExposeRegion
+                       {
+                               get
+                               {
+                                       return exposeRegion;
                                }
                        }

Index: InputOutputWidget.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/InputOutputWidget.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** InputOutputWidget.cs        11 Jun 2003 10:37:28 -0000      1.3
--- InputOutputWidget.cs        24 Jul 2003 00:31:32 -0000      1.4
***************
*** 490,495 ****
                                        exposeRegion = null;
                                        Graphics graphics = new Graphics(this);
                                        graphics.SetClipRegion(region);
-                                       region.Dispose();
                                        OnPaint(graphics);
                                        graphics.Dispose();
--- 490,495 ----
                                        exposeRegion = null;
                                        Graphics graphics = new Graphics(this);
+                                       graphics.exposeRegion = region;
                                        graphics.SetClipRegion(region);
                                        OnPaint(graphics);
                                        graphics.Dispose();





reply via email to

[Prev in Thread] Current Thread [Next in Thread]