public void Invalidate(Rect rect) { var r = new UnmanagedMethods.RECT { left = (int)rect.X, top = (int)rect.Y, right = (int)rect.Right, bottom = (int)rect.Bottom, }; UnmanagedMethods.InvalidateRect(_hwnd, ref r, false); }
public void Invalidate(Rect rect) { var f = Scaling; var r = new UnmanagedMethods.RECT { left = (int)Math.Floor(rect.X * f), top = (int)Math.Floor(rect.Y * f), right = (int)Math.Ceiling(rect.Right * f), bottom = (int)Math.Ceiling(rect.Bottom * f), }; UnmanagedMethods.InvalidateRect(_hwnd, ref r, false); }