]> O.S.I.I.S - jp/crow.git/commitdiff
* Tests.csproj:
authorjpbruyere <jp.bruyere@hotmail.com>
Tue, 3 Jan 2017 12:20:01 +0000 (13:20 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Tue, 3 Jan 2017 12:20:01 +0000 (13:20 +0100)
  update to opentk-2.0

* Enums.cs, Rectangle.cs, Rectangles.cs:
  Code clean

* TemplatedGroup.cs:
  remove logicalParent in items loading

Tests/Tests.csproj
src/Enums.cs
src/GraphicObjects/TemplatedGroup.cs
src/Rectangle.cs
src/Rectangles.cs

index e5d7ec71eabb6b6de475d29ef5fa630fae281de6..c65b1d581feddbb404fb6fd2e8606d4f4715a2b7 100644 (file)
@@ -45,7 +45,7 @@
        <Reference Include="gio-sharp"/>
        <Reference Include="glib-sharp"/>
     <Reference Include="OpenTK">
-      <HintPath>$(SolutionDir)packages\OpenTK.Next.1.2.2336.6514-pre\lib\net20\OpenTK.dll</HintPath>
+      <HintPath>..\packages\OpenTK.2.0.0\lib\net20\OpenTK.dll</HintPath>
     </Reference>
   </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
index 46f8cdab6d0ce7056305fe45f717a6cf5abb5d41..07ae1a4d1a85037b2104d05201ea74eabc850a80 100644 (file)
@@ -35,12 +35,4 @@ namespace Crow
         Bottom,
         Center,
     }
-
-    public enum RectanglesRelations
-    {
-        NoRelation, //nothing to do
-        Intersect,  //clipped clear & repaint, no test
-        Contains,   //clipped clear & repaint, test children
-        Equal       //repaint, no test
-    }
 }
index b05aad9fa732a5cd57b5fd23d24f84268ebb726b..772b89cfcb90e860cc1c3208060665853f4a274e 100644 (file)
@@ -390,6 +390,7 @@ namespace Crow
                        lock (CurrentInterface.LayoutMutex) {
                                g = iTemp.CreateInstance(CurrentInterface);
                                page.AddChild (g);
+                               //g.LogicalParent = this;
                                registerItemClick (g);
                        }
 
@@ -397,8 +398,6 @@ namespace Crow
                                (g as Expandable).Expand += iTemp.Expand;
                                (g as Expandable).GetIsExpandable = iTemp.HasSubItems;
                        }
-                       //g.LogicalParent = this;
-
 
                        g.DataSource = data [i];
                }
index 3ceb396ee73296d230ef9b80772f08b67cfe341a..cc1aa56fe56f92ef5eede609c9feaac67102deb9 100644 (file)
@@ -201,34 +201,7 @@ namespace Crow
         {
             return r1.TopLeft == r2.TopLeft && r1.Size == r2.Size ? false : true;
         }
-        #endregion
-
-        public RectanglesRelations test(Rectangle r)
-        {
-            if (r == this)
-                return RectanglesRelations.Equal;
-
-            int nbrPtIncluded = 0;
-
-            if (this.ContainsOrIsEqual(r.TopLeft))
-                nbrPtIncluded++;
-            if (this.ContainsOrIsEqual(r.TopRight))
-                nbrPtIncluded++;
-            if (this.ContainsOrIsEqual(r.BottomLeft))
-                nbrPtIncluded++;
-            if (this.ContainsOrIsEqual(r.BottomRight))
-                nbrPtIncluded++;
-
-            switch (nbrPtIncluded)
-            {
-                case 0:
-                    return RectanglesRelations.NoRelation;
-                case 4:
-                    return RectanglesRelations.Contains;
-                default:
-                    return RectanglesRelations.Intersect;
-            }
-        }
+        #endregion        
 
                public static readonly Rectangle Zero = new Rectangle(0, 0, 0, 0);
         public static Rectangle Empty
index 9f3c3337e6a330fdb673a3ff91768fcd360a653e..965b28c332d6e4fd7e66e45aa852c837c7c0f871 100644 (file)
@@ -93,16 +93,11 @@ namespace Crow
                }
                public void clear(Context ctx)
         {
-            //ctx.Save();
-
             foreach (Rectangle r in list)
-            {
                 ctx.Rectangle(r);
-            }
             ctx.Operator = Operator.Clear;
             ctx.Fill();
             ctx.Operator = Operator.Over;
-            //ctx.Restore();
         }
                public override string ToString ()
                {