[Mono-bugs] [Bug 81202][Nor] New - Attributes of GpPen are not changed properly.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Mar 21 06:09:56 EDT 2007

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 choe.hwanjin at gmail.com.


--- shadow/81202	2007-03-21 05:09:56.000000000 -0500
+++ shadow/81202.tmp.28930	2007-03-21 05:09:56.000000000 -0500
@@ -0,0 +1,59 @@
+Bug#: 81202
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: libgdiplus
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: choe.hwanjin at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Attributes of GpPen are not changed properly.
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Attributes of GpPen are not changed, when I call several functions at once.
+Because GpPen uses 'changed' flag for checking whether it changes or not.
+If the programmer call some functions immediately, it will lose the
+information. It's easier to explain with the code. So I will explain it below.
+Steps to reproduce the problem:
+Let's think about this code:
+    GdipSetPenWidth(pen, 10);
+    GdipSetPenLineJoin(pen, LineJoinMiter);
+Actual Results:
+No changes.
+Expected Results:
+Pen attributes should be changed.
+How often does this happen? 
+Additional Information:
+First, when I call 'GdipSetPenWidth()', the pen->changed flag will have
+true value.
+But if I call 'GdipSetPenLineJoin()' with the same value of current pen
+line join attribute, the pen->changed flag will be change to FALSE.
+Because the code is like this:
+    pen->changed = (pen->line_join != lineJoin);
+This code does not check whether another attributes changed or not.
+So this will lose the change. This should be like this:
+    pen->changed = pen->changed ? TRUE : (pen->line_join != lineJoin);
+I made a path for this problem. I will attach it.

More information about the mono-bugs mailing list