Example #1
0
 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);
 }
Example #2
0
        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();
        }
Example #3
0
        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();
            }
        }
Example #4
0
 protected void InvalidateDesigner()
 {
     System.Drawing.Rectangle invalidationRect = GripsProvider.GetInvalidationRectangle();
     invalidationRect.Inflate(VObject.InvalidationMargin);
     _objectHost.HostViewer.InvalidateViewer(new MultiLayerViewerInvalidationTarget(invalidationRect));
 }