All pastes #53541 Raw Edit

Untitled

public text v1 · immutable
#53541 ·published 2006-05-04 14:52 UTC
rendered paste body
Index: SystemLayer/PdnGraphics.cs
===================================================================
--- SystemLayer/PdnGraphics.cs  (revision 29)
+++ SystemLayer/PdnGraphics.cs  (working copy)
@@ -584,7 +584,10 @@
                 }
             }
 #else
-           Console.WriteLine ("PDN: DrawPolyLine not implemented");
+               // did I miss something ? anyway it looks better than no rendering
+               using (Pen pen = new Pen (color)) {
+                       g.DrawLines (pen, points);
+               }
 #endif
         }
  
@@ -654,11 +657,8 @@
                 }
             }
 #else
-               SolidBrush sb;
-
-               sb = new SolidBrush(color);
-               foreach (Rectangle rect in rects) {
-                       g.FillRectangle(sb, rect);
+               using (SolidBrush brush = new SolidBrush (color)) {
+                       g.FillRectangles (brush, rects);
                }
                Console.WriteLine("Drawing Managed FillRect -> Fixme and make MWF support unmanaged");
 #endif
Index: ColorWheel.cs
===================================================================
--- ColorWheel.cs       (revision 29)
+++ ColorWheel.cs       (working copy)
@@ -140,9 +140,6 @@
             float x = (alpha * (radius - 1) * (float)Math.Cos(theta)) + radius;
             float y = (alpha * (radius - 1) * (float)Math.Sin(theta)) + radius;
  
-           Console.WriteLine ("PORT: wheelPictureBox missing code due to BeginContainer");
-           return;
-
             GraphicsContainer container = e.Graphics.BeginContainer();
                        e.Graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
                        e.Graphics.SmoothingMode = SmoothingMode.HighQuality;