/// <summary> /// Fires the OnBufferChanged event /// </summary> /// <param name="clipRectangles">The Rectangle in pixels</param> protected virtual void OnBufferChanged(List <Rectangle> clipRectangles) { if (BufferChanged != null) { ClipArgs e = new ClipArgs(clipRectangles); BufferChanged(this, e); } }
public static void Clip(ClipArgs args) { args.Callback.Invoke(); }
protected void MapFrame_BufferChanged(object sender, ClipArgs e) { Rectangle view = MapFrame.View; foreach (Rectangle clip in e.ClipRectangles) { if (clip.IsEmpty == false) { var mapClip = new Rectangle(clip.X - view.X, clip.Y - view.Y, clip.Width, clip.Height); Invalidate(mapClip); } } }