Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77734 --- shadow/77734 2006-05-09 20:46:11.000000000 -0400 +++ shadow/77734.tmp.4967 2006-05-16 02:57:45.000000000 -0400 @@ -10,14 +10,14 @@ Component: Windows.Forms AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: -Cc: [EMAIL PROTECTED],[EMAIL PROTECTED] -Summary: Graphics.Transform isn't resetted between calls to Paint +Cc: [EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED] +Summary: [PATCH] Graphics.Transform isn't resetted between calls to Paint Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: If you compile the test code attached, and run you will see that instead of the clock being displayed once, it is being redrawn a number of times. When @@ -105,6 +105,53 @@ True ... but I got no clue where it should be done ;-) ------- Additional Comments From [EMAIL PROTECTED] 2006-05-09 20:46 ------- *** Bug 78350 has been marked as a duplicate of this bug. *** + +------- Additional Comments From [EMAIL PROTECTED] 2006-05-16 02:57 ------- +Simplified testcase: + +using System; +using System.Drawing; +using System.Windows.Forms; +using System.Drawing.Drawing2D; + +namespace AnalogClock +{ + public class MyClick : Form + { + static void Main() + { + Application.Run(new MyClick()); + } + + public MyClick() + { + Text = "click me"; + this.Paint += new PaintEventHandler(f1_paint); + this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); + this.SetStyle(ControlStyles.UserPaint, true); + this.SetStyle(ControlStyles.DoubleBuffer, true); + this.Click += new EventHandler (fire); + } + + private void fire(object sender, System.EventArgs e) + { + Invalidate(); + } + + private void f1_paint(object sender, PaintEventArgs e) + { + Graphics g = e.Graphics; +Console.WriteLine (g.ClipBounds); + g.FillEllipse(Brushes.Red, 20, 20, 200, 200); + g.TranslateTransform(120, 120, MatrixOrder.Append); + } + } +} + +As Sebastien guessed, seems like that MS.NET resets the transform and +thus g.ClipBounds shows always the same rectangle in f1_paint(). + +Attaching a fix. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
