private System.Drawing.Rectangle GetObjectInvalidationArea() { System.Drawing.Rectangle result = GripsProvider.GetInvalidationRectangle(); result = System.Drawing.Rectangle.Union(result, _objectHost.HostViewer.WorkspaceToControl(_obj.GetTransformedVObjectBounds(), Aurigma.GraphicsMill.Unit.Point)); result.Inflate(VObject.InvalidationMargin); return(result); }
public virtual void NotifyConnect(IVObjectHost objectHost) { if (objectHost == null) { throw new System.ArgumentNullException("objectHost"); } _objectHost = objectHost; _gripsProvider = new GripsProvider(_obj, _objectHost.HostViewer); _gripsProvider.VObjectBorderPen = _objectBorderPen; InvalidateObjectArea(); }
private void UpdateCursor(int x, int y) { int point = _gripsProvider.TestPoint(new System.Drawing.Point(x, y)); if (point != GripsProvider.InvalidPointHandle) { _objectHost.HostViewer.Cursor = GripsProvider.GetCursor(point); } else { _objectHost.HostViewer.RestoreCursorToDefault(); } }
protected void InvalidateDesigner() { System.Drawing.Rectangle invalidationRect = GripsProvider.GetInvalidationRectangle(); invalidationRect.Inflate(VObject.InvalidationMargin); _objectHost.HostViewer.InvalidateViewer(new MultiLayerViewerInvalidationTarget(invalidationRect)); }