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