aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-13 12:30:32 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-13 12:30:32 +0200
commit78e040f5f6f3af0f4e66b84523f77fdfb819b8af (patch)
treef6851351fae7d6a9d618cc28364f5661e287f471
parent3260d86cda78bd53070f7318863df642f3492588 (diff)
LastPainted slot clipping rect!
-rw-r--r--Tests/GOLIBTest_4.cs16
-rw-r--r--src/GraphicObjects/GraphicObject.cs4
2 files changed, 12 insertions, 8 deletions
diff --git a/Tests/GOLIBTest_4.cs b/Tests/GOLIBTest_4.cs
index 35b2dcff..97e8c626 100644
--- a/Tests/GOLIBTest_4.cs
+++ b/Tests/GOLIBTest_4.cs
@@ -43,14 +43,14 @@ namespace test
int oldVal = _fps;
_fps = value;
-// if (_fps > fpsMax) {
-// fpsMax = _fps;
-// ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax, _fps));
-// } else if (_fps < fpsMin) {
-// ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin, _fps));
-// fpsMin = _fps;
-// }
-//
+ if (_fps > fpsMax) {
+ fpsMax = _fps;
+ ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMax", fpsMax, _fps));
+ } else if (_fps < fpsMin) {
+ ValueChanged.Raise(this, new ValueChangeEventArgs ("fpsMin", fpsMin, _fps));
+ fpsMin = _fps;
+ }
+
ValueChanged.Raise(this, new ValueChangeEventArgs ("fps", oldVal, _fps));
}
}
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index 2c10a658..0944703f 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -364,10 +364,12 @@ namespace go
}
public Rectangle LastSlots;
+ public Rectangle LastPaintedSlot;
public virtual void registerClipRect()
{
TopContainer.redrawClip.AddRectangle (ScreenCoordinates(Slot));
+ TopContainer.redrawClip.AddRectangle (ScreenCoordinates(LastPaintedSlot));
}
protected virtual Size measureRawSize ()
{
@@ -567,6 +569,8 @@ namespace go
protected virtual void UpdateGraphic ()
{
+ LastPaintedSlot = Slot;
+
int stride = 4 * Slot.Width;
int bmpSize = Math.Abs (stride) * Slot.Height;