* Samples/png: Fixed samples with new changes.
authorHisham Mardam Bey <hisham@mono-cvs.ximian.com>
Wed, 7 Sep 2005 00:08:46 +0000 (00:08 -0000)
committerHisham Mardam Bey <hisham@mono-cvs.ximian.com>
Wed, 7 Sep 2005 00:08:46 +0000 (00:08 -0000)
* Samples/x11: Fixed samples with new changes.
* Samples/gtk: Fixed samples with new changes.

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

mcs/class/Mono.Cairo/ChangeLog
mcs/class/Mono.Cairo/Samples/gtk/clip_img.cs
mcs/class/Mono.Cairo/Samples/gtk/gradient.cs
mcs/class/Mono.Cairo/Samples/gtk/image.cs
mcs/class/Mono.Cairo/Samples/gtk/image_pattern.cs
mcs/class/Mono.Cairo/Samples/x11/clip_img.cs
mcs/class/Mono.Cairo/Samples/x11/gradient.cs
mcs/class/Mono.Cairo/Samples/x11/image.cs
mcs/class/Mono.Cairo/Samples/x11/image_pattern.cs

index 2ec93f2a2f23a5b5323f0a2a0b5c3b3af0c3c5c8..1c34eebab008bc51eb3c440e2fcf1208bc29aa46 100644 (file)
@@ -1,6 +1,8 @@
 2005-09-07 Hisham Mardam Bey <hisham.mardambey@gmail.com>
 
        * Samples/png: Fixed samples with new changes.
+       * Samples/x11: Fixed samples with new changes.
+       * Samples/gtk: Fixed samples with new changes.  
 
 2005-09-06  John Luke  <john.luke@gmail.com>
 
index dd7c4ce7f90a035d8404926c32d18bb8d27323a8..aee47540045ec97a63fafa5efce74dc9268fb873 100644 (file)
@@ -62,7 +62,7 @@ public class CairoGraphic : DrawingArea
        static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
 
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
@@ -71,7 +71,7 @@ public class CairoGraphic : DrawingArea
                gr.Clip ();
                gr.NewPath ();
 
-               image = new SurfaceImage("data/e.png");
+               image = new ImageSurface("data/e.png");
                w = image.Width;
                h = image.Height;
 
index edfd501911e013723284d53d8f4d9329575fa94d..7f27c1597846313a71d8e2e9ee3bae65127990f8 100644 (file)
@@ -65,9 +65,9 @@ public class CairoGraphic : DrawingArea
        {
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
-               Pattern pat;            
+               LinearGradient pat;             
                
-               pat = new PatternLinear (0.0, 0.0,  0.0, 1.0);
+               pat = new LinearGradient (0.0, 0.0,  0.0, 1.0);
                pat.AddColorStop (1, new Color (0, 0, 0, 1) );
                pat.AddColorStop (0, new Color (1, 1, 1, 1) );
                gr.Rectangle ( new PointD (0, 0),
@@ -78,15 +78,15 @@ public class CairoGraphic : DrawingArea
                gr.Fill ();
                pat.Destroy ();
 
-               pat = new PatternRadial (0.45, 0.4, 0.1,
+               RadialGradient pat2 = new RadialGradient (0.45, 0.4, 0.1,
                                     0.4,  0.4, 0.5);
                
-               pat.AddColorStop (0, new Color (1, 1, 1, 1) );
-               pat.AddColorStop (1, new Color (0, 0, 0, 1) );
-               gr.Pattern =  pat;              
+               pat2.AddColorStop (0, new Color (1, 1, 1, 1) );
+               pat2.AddColorStop (1, new Color (0, 0, 0, 1) );
+               gr.Pattern =  pat2;
                gr.Arc (0.5, 0.5, 0.3, 0, 2 * M_PI);
                gr.Fill ();
-               pat.Destroy ();
+               pat2.Destroy ();
        }
        
        
index 11c0547e1a75a2ca466572e2dcbfd84915281ce6..4cf1330190121c682f7df014026fdf1fe6abfbab 100644 (file)
@@ -64,12 +64,12 @@ public class CairoGraphic : DrawingArea
        static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
                
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
                                
-               image = new SurfaceImage ("data/e.png");
+               image = new ImageSurface ("data/e.png");
                w = image.Width;
                h = image.Height;
                
index d07c71d4e94f2211a50f71fe082c849a473a1556..b7b86c22917de9f769e802a8af9a84e3f94ad7d4 100644 (file)
@@ -64,18 +64,18 @@ public class CairoGraphic : DrawingArea
        static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
                Matrix matrix;
-               Pattern pattern;
+               SurfacePattern pattern;
                
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
 
-               image = new SurfaceImage ("data/e.png");
+               image = new ImageSurface ("data/e.png");
                w = image.Width;
                h = image.Height;
                
-               pattern = new Pattern (image);
+               pattern = new SurfacePattern (image);
                pattern.Extend = Cairo.Extend.Repeat;
                
                gr.Translate (0.5, 0.5);
index 1b3d45296585079f8f30c7506e8188ab0a5383ce..f8b1364ee1b034b12e6cdb64cc4d8b8219908dbd 100644 (file)
@@ -40,7 +40,7 @@ public class X11Test
        static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
                
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
@@ -49,7 +49,7 @@ public class X11Test
                gr.Clip ();
                gr.NewPath ();
                
-               image = new SurfaceImage("data/e.png");
+               image = new ImageSurface("data/e.png");
                w = image.Width;
                h = image.Height;
                
index d5fed13ab40f8ac5d63064be97879dd0c60a14f1..4e3598997b9badb407809350e565a16a99fbf729 100644 (file)
@@ -40,9 +40,8 @@ public class X11Test
        {
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
-               Pattern pat;
                
-               pat = new PatternLinear (0.0, 0.0,  0.0, 1.0);
+               LinearGradient pat = new LinearGradient (0.0, 0.0,  0.0, 1.0);
                pat.AddColorStop (1, new Color (0, 0, 0, 1) );
                pat.AddColorStop (0, new Color (1, 1, 1, 1) );
                gr.Rectangle ( new PointD (0, 0),
@@ -53,15 +52,15 @@ public class X11Test
                gr.Fill ();
                pat.Destroy ();
                
-               pat = new PatternRadial (0.45, 0.4, 0.1,
+               RadialGradient pat2 = new RadialGradient (0.45, 0.4, 0.1,
                                                         0.4,  0.4, 0.5);
                
-               pat.AddColorStop (0, new Color (1, 1, 1, 1) );
-               pat.AddColorStop (1, new Color (0, 0, 0, 1) );
-               gr.Pattern =  pat;
+               pat2.AddColorStop (0, new Color (1, 1, 1, 1) );
+               pat2.AddColorStop (1, new Color (0, 0, 0, 1) );
+               gr.Pattern =  pat2;
                gr.Arc (0.5, 0.5, 0.3, 0, 2 * M_PI);
                gr.Fill ();
-               pat.Destroy ();
+               pat2.Destroy ();
        }
        
        
index 40d70281359c43a5d1924d87f1cea00224d91545..80b6f16076d41baa8b98a8af4baa59d2323dff29 100644 (file)
@@ -39,12 +39,12 @@ public class X11Test
         static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
                
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
                
-               image = new SurfaceImage ("data/e.png");
+               image = new ImageSurface ("data/e.png");
                w = image.Width;
                h = image.Height;
                
index 2bb4f01b28d0207e26230d13cb760182d0aec4f3..4f76a25f4616a7655c321a0082b9d90c3e3b18d2 100644 (file)
@@ -39,18 +39,18 @@ public class X11Test
         static void draw (Cairo.Graphics gr, int width, int height)
        {
                int w, h;
-               SurfaceImage image;
+               ImageSurface image;
                Matrix matrix;
-               Pattern pattern;
+               SurfacePattern pattern;
                
                gr.Scale (width, height);
                gr.LineWidth = 0.04;
                
-               image = new SurfaceImage ("data/e.png");
+               image = new ImageSurface ("data/e.png");
                w = image.Width;
                h = image.Height;
                
-               pattern = new Pattern (image);
+               pattern = new SurfacePattern (image);
                pattern.Extend = Cairo.Extend.Repeat;
                
                gr.Translate (0.5, 0.5);