- Renamed Paint() method to Draw() for clarity. Also, moved
authorRavindra <ravindra@mono-cvs.ximian.com>
Fri, 15 Oct 2004 13:32:45 +0000 (13:32 -0000)
committerRavindra <ravindra@mono-cvs.ximian.com>
Fri, 15 Oct 2004 13:32:45 +0000 (13:32 -0000)
DrawImage() to OnPaint().

svn path=/trunk/mcs/; revision=35027

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs

index ee5ac3ca2a22ab925ef569d62085485ad5a95eba..e6e1be9aa567ef24a823f584e4e488e52a49c968 100644 (file)
 //     Peter Bartok    pbartok@novell.com
 //
 // $Log: ButtonBase.cs,v $
+// Revision 1.15  2004/10/15 13:32:45  ravindra
+//     - Renamed Paint() method to Draw() for clarity. Also, moved
+//     DrawImage() to OnPaint().
+//
 // Revision 1.14  2004/10/15 13:16:10  ravindra
 //     - Redraw () is not virtual now.
 //     - Added an internal virtual method Paint (), so that
@@ -147,15 +151,13 @@ namespace System.Windows.Forms {
                        Refresh ();
                }
 
-               // Derived classes should override Paint method and we dont want
+               // Derived classes should override Draw method and we dont want
                // to break the control signature, hence this approach.
-               internal virtual void Paint (PaintEventArgs pevent) {
+               internal virtual void Draw (PaintEventArgs pevent) {
                        if (redraw) {
                                ThemeEngine.Current.DrawButtonBase(this.DeviceContext, pevent.ClipRectangle, this);
                                redraw = false;
                        }
-
-                       pevent.Graphics.DrawImage(this.ImageBuffer, pevent.ClipRectangle, pevent.ClipRectangle, GraphicsUnit.Pixel);
                }
 
                private void RedrawEvent(object sender, System.EventArgs e) {
@@ -497,7 +499,8 @@ namespace System.Windows.Forms {
                }
 
                protected override void OnPaint(PaintEventArgs pevent) {
-                       Paint (pevent);
+                       Draw (pevent);
+                       pevent.Graphics.DrawImage(this.ImageBuffer, pevent.ClipRectangle, pevent.ClipRectangle, GraphicsUnit.Pixel);
                        base.OnPaint (pevent);
                }
 
index 65ea4b604a2973adf16fab34b3396bf866da6cdb..d54093872c5506c553d2351d41d5743d23785482 100644 (file)
 //
 //
 // $Log: CheckBox.cs,v $
+// Revision 1.10  2004/10/15 13:32:45  ravindra
+//     - Renamed Paint() method to Draw() for clarity. Also, moved
+//     DrawImage() to OnPaint().
+//
 // Revision 1.9  2004/10/15 13:25:50  ravindra
 //     - Removed Redraw (), we get it from ButtonBase.
 //     - Implemented Paint (), to do class specific painting.
@@ -286,12 +290,11 @@ namespace System.Windows.Forms {
                #endregion      // Events
 
                #region Internal drawing code
-               internal override void Paint (PaintEventArgs pe) {
+               internal override void Draw (PaintEventArgs pe) {
                        if (redraw) {
                                ThemeEngine.Current.DrawCheckBox (this.DeviceContext, this.ClientRectangle, this);
                                redraw = false;
                        }
-                       pe.Graphics.DrawImage (this.ImageBuffer, pe.ClipRectangle, pe.ClipRectangle, GraphicsUnit.Pixel);
                }
                #endregion      // Internal drawing code
        }
index e536c41f8e021213f209eb2bc098e2fda102642f..15271b05075f7e73e672ef093496b8c4b1d66c01 100644 (file)
 //     Peter Bartok    pbartok@novell.com
 //
 // $Log: RadioButton.cs,v $
+// Revision 1.8  2004/10/15 13:32:45  ravindra
+//     - Renamed Paint() method to Draw() for clarity. Also, moved
+//     DrawImage() to OnPaint().
+//
 // Revision 1.7  2004/10/15 13:25:50  ravindra
 //     - Removed Redraw (), we get it from ButtonBase.
 //     - Implemented Paint (), to do class specific painting.
@@ -291,13 +295,11 @@ namespace System.Windows.Forms {
                #endregion      // Events
 
                #region Internal Drawing Code
-               internal override void Paint (PaintEventArgs pe) {
+               internal override void Draw (PaintEventArgs pe) {
                        if (redraw) {
                                ThemeEngine.Current.DrawRadioButton(this.DeviceContext, this.ClientRectangle, this);
                                redraw = false;
                        }
-
-                       pe.Graphics.DrawImage (this.ImageBuffer, pe.ClipRectangle, pe.ClipRectangle, GraphicsUnit.Pixel);
                }
                #endregion      // Internal Drawing Code
        }