From: jpbruyere Date: Sat, 13 Jun 2015 10:30:32 +0000 (+0200) Subject: LastPainted slot clipping rect! X-Git-Tag: 0.2~79 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=78e040f5f6f3af0f4e66b84523f77fdfb819b8af;p=jp%2Fcrow.git LastPainted slot clipping rect! --- 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;