Author: hisham
Date: 2005-06-14 17:48:11 -0400 (Tue, 14 Jun 2005)
New Revision: 45995

Added:
   trunk/efl-sharp/apps/image_viewer/image.cs
Modified:
   trunk/efl-sharp/apps/image_viewer/build.sh
   trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs
Log:
just a small test / sample to using pixel data in evas

Modified: trunk/efl-sharp/apps/image_viewer/build.sh
===================================================================
--- trunk/efl-sharp/apps/image_viewer/build.sh  2005-06-14 21:33:04 UTC (rev 
45994)
+++ trunk/efl-sharp/apps/image_viewer/build.sh  2005-06-14 21:48:11 UTC (rev 
45995)
@@ -1,5 +1,8 @@
 mcs image_test_simple.cs 
-r:/usr/lib/mono/gac/efl-sharp/0.0.1.0__56eb9b2d0c525a1a/efl-sharp.dll \
  -out:image_test_simple.exe
+ 
+mcs image.cs 
-r:/usr/lib/mono/gac/efl-sharp/0.0.1.0__56eb9b2d0c525a1a/efl-sharp.dll \
+ -out:image.exe 
 
 mcs image_test_eblocks.cs 
-r:/usr/lib/mono/gac/efl-sharp/0.0.1.0__56eb9b2d0c525a1a/efl-sharp.dll \
  -out:image_test_eblocks.exe

Added: trunk/efl-sharp/apps/image_viewer/image.cs
===================================================================
--- trunk/efl-sharp/apps/image_viewer/image.cs  2005-06-14 21:33:04 UTC (rev 
45994)
+++ trunk/efl-sharp/apps/image_viewer/image.cs  2005-06-14 21:48:11 UTC (rev 
45995)
@@ -0,0 +1,29 @@
+using System;
+using System.IO;
+using Enlightenment.Evas;
+using Enlightenment.Ecore;
+
+public class EvasImagePlayground
+{
+   
+   public static void Main(string [] args)
+     {
+       Enlightenment.Ecore.Canvas.Init();      
+       
+       Enlightenment.Ecore.Canvas EE  = new Enlightenment.Ecore.Canvas();      
        
+       EE.SoftwareX11New(":0", IntPtr.Zero, 0, 0, 800, 600);
+       
+       
+       Image im = new Image(EE.Get());
+       im.Set("/tmp/test.png", null);
+       
+       int[] pixels = new int[im.Geometry.W * im.Geometry.H];
+       
+       pixels = im.PixelsGet(1);
+       
+       // play around here.
+       
+       im.PixelsSet(pixels);
+       
+     }      
+}

Modified: trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs
===================================================================
--- trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs     2005-06-14 
21:33:04 UTC (rev 45994)
+++ trunk/efl-sharp/apps/image_viewer/image_test_eblocks.cs     2005-06-14 
21:48:11 UTC (rev 45995)
@@ -33,7 +33,7 @@
        
        shadow = new Enlightenment.Evas.Image(canvas);
        shadow.Set(file, null);
-       shadow.Set("temp_images/e17_titlebar_shadow2.png", null);
+       shadow.Set(DataConfig.DATADIR + "/data/test/images/shadow.png", null);
        shadow.Border = new ImageBorder(5, 5, 5, 5);
      }
    
@@ -46,7 +46,7 @@
    public override void Show()
      {
        i.Show();
-       //shadow.Show(); add image then uncomment
+       shadow.Show();
      }
    
    public override void Hide()
@@ -155,7 +155,9 @@
          }
        
        cont = new Container(EE, items);
-       cont.ItemSize(64, 64);
+       cont.ItemSize(96, 96);
+       cont.HorizSpacer = 10;
+       cont.VertSpacer = 10;
        cont.Move(64, 37);
        cont.Resize(640 - 60 - 2, 480 - 37 - 2);
        cont.Show();
@@ -177,8 +179,8 @@
        Edje win_bg = (Edje)EE.DataGet("win_bg");
        win_bg.Resize(w, h);
        
-       Enlightenment.Eblocks.Line line = 
(Enlightenment.Eblocks.Line)EE.DataGet("line");
-       line.Resize(w, line.Geometry.H);
+//     Enlightenment.Eblocks.Line line = 
(Enlightenment.Eblocks.Line)EE.DataGet("line");
+//     line.Resize(w, line.Geometry.H);
        
        cont.Resize(w- 60 - 2, h - 37 - 2);
      }
@@ -198,7 +200,7 @@
        EE.Show();              
        
        Edje win_bg = new Edje(EE.Get());
-       
win_bg.FileSet("/usr/share/efl-sharp/data/eblocks/themes/e17.edj","window");
+       win_bg.FileSet(DataConfig.DATADIR + 
"/data/eblocks/themes/e17.edj","window");
        win_bg.Resize(640, 480);
        win_bg.Move(0, 0);
        win_bg.Lower();
@@ -228,12 +230,12 @@
        button.MouseUpEvent += new 
Enlightenment.Evas.Item.EventHandler(AppAboutButtonHandler); 
        box_menu.Add(button);   
        
-       Enlightenment.Eblocks.Line line;
+//     Enlightenment.Eblocks.Line line;
        
-       line = new Enlightenment.Eblocks.Line(EE.Get());
-       line.Horizontal = true;
-       line.Resize(640, 6);
-       box_top.Add(line);              
+//     line = new Enlightenment.Eblocks.Line(EE.Get());
+//     line.Horizontal = true;
+//     line.Resize(640, 6);
+//     box_top.Add(line);              
        
        box_top.Show();
        
@@ -266,7 +268,7 @@
        EE.DataSet("box_icons", box_icons);
        EE.DataSet("box_top", box_top);
        EE.DataSet("win_bg", win_bg);
-       EE.DataSet("line", line);
+       //EE.DataSet("line", line);
        
        WaitCallback callback = new WaitCallback(Callback);
        ThreadPool.QueueUserWorkItem(callback);

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to