]> O.S.I.I.S - jp/crow.git/commitdiff
LastPainted slot clipping rect!
authorjpbruyere <jp.bruyere@hotmail.com>
Sat, 13 Jun 2015 10:30:32 +0000 (12:30 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Sat, 13 Jun 2015 10:30:32 +0000 (12:30 +0200)
Tests/GOLIBTest_4.cs
src/GraphicObjects/GraphicObject.cs

index 35b2dcffaa229f29d20519b2a5b73c8be35d98ce..97e8c6262779e85f18c57ded10f8a4b2687f2ae5 100644 (file)
@@ -43,14 +43,14 @@ namespace test
                                int oldVal = _fps;\r
                                _fps = value;\r
 \r
-//                             if (_fps > fpsMax) {\r
-//                                     fpsMax = _fps;\r
-//                                     ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax, _fps));\r
-//                             } else if (_fps < fpsMin) {\r
-//                                     ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin, _fps));\r
-//                                     fpsMin = _fps;\r
-//                             }\r
-//\r
+                               if (_fps > fpsMax) {\r
+                                       fpsMax = _fps;\r
+                                       ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax, _fps));\r
+                               } else if (_fps < fpsMin) {\r
+                                       ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin, _fps));\r
+                                       fpsMin = _fps;\r
+                               }\r
+\r
                                ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", oldVal, _fps));\r
                        }\r
                }\r
index 2c10a658b7fc3408134a9441e8f4d4b6d4a2869d..0944703f9bf69919ffa3ebe1861586a944951554 100644 (file)
@@ -364,10 +364,12 @@ namespace go
                }\r
 \r
                public Rectangle LastSlots;\r
+               public Rectangle LastPaintedSlot;\r
 \r
                public virtual void registerClipRect()\r
                {\r
                        TopContainer.redrawClip.AddRectangle (ScreenCoordinates(Slot));\r
+                       TopContainer.redrawClip.AddRectangle (ScreenCoordinates(LastPaintedSlot));\r
                }\r
                protected virtual Size measureRawSize ()\r
                {\r
@@ -567,6 +569,8 @@ namespace go
 \r
                protected virtual void UpdateGraphic ()\r
                {\r
+                       LastPaintedSlot = Slot;\r
+\r
                        int stride = 4 * Slot.Width;\r
 \r
                        int bmpSize = Math.Abs (stride) * Slot.Height;\r