Exemplo n.º 1
0
        public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            float thresholdWidth = UCCanvas.GetThresholdWidth();

            if (thresholdWidth < this.Width)
            {
                thresholdWidth = this.Width;
            }
            RectangleF rectangleF;

            switch (rectangleType)
            {
            case BoundingRectangleType.Drawing:
                rectangleF = this.GetDrawingRectangle();
                break;

            case BoundingRectangleType.NodeEditing:
                rectangleF = this.GetNodeEditRectangle();
                break;

            case BoundingRectangleType.SelectRange:
                rectangleF = this.GetSelectionRectangle();
                break;

            default:
                rectangleF = new RectangleF();
                break;
            }
            return(rectangleF);
        }
Exemplo n.º 2
0
        public override RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            if (this.IsCompleteDraw || this.IsEditMode)
            {
                return(base.GetBoundingRectangle(rectangleType));
            }
            float thWidth = UCCanvas.GetThresholdWidth();

            return(ScreenUtils.GetRectangleF(this.p1, this.p2, thWidth / 2));
        }
Exemplo n.º 3
0
        public override RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            float thresholdWidth = UCCanvas.GetThresholdWidth();

            if (this.IsCompleteDraw || this.IsEditMode)
            {
                return(this.GetBoundingRectCommon(thresholdWidth));
            }
            else
            {
                return(HitUtil.CircleBoundingRectangle(this.Center, this.Radius + thresholdWidth / 2));
            }
        }
Exemplo n.º 4
0
        public override RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            float thresholdWidth = UCCanvas.GetThresholdWidth();

            if (this.arcCurrentPointType == ArcCurrentPointType.MidPoint)
            {
                return(ScreenUtils.GetRectangleF(this.startPoint, this.midPoint, thresholdWidth));
            }
            else
            {
                return(this.GetBoundingRectCommon(thresholdWidth));
            }
        }
Exemplo n.º 5
0
        public override RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            if (this.IsCompleteDraw || this.IsEditMode)
            {
                return(base.GetBoundingRectangle(rectangleType));
            }
            float thWidth = UCCanvas.GetThresholdWidth();
            float maxX    = (float)this.Points.Max <UnitPointBulge>(x => x.Point.X);
            float maxY    = (float)this.Points.Max <UnitPointBulge>(x => x.Point.Y);
            float minX    = (float)this.Points.Min <UnitPointBulge>(x => x.Point.X);
            float minY    = (float)this.Points.Min <UnitPointBulge>(x => x.Point.Y);

            return(ScreenUtils.GetRectangleF(new UnitPoint(minX, minY), new UnitPoint(maxX, maxY), thWidth / 2));
        }
Exemplo n.º 6
0
        public override RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            if (this.IsEditMode || this.IsCompleteDraw)
            {
                return(base.GetBoundingRectangle(rectangleType));
            }
            float thWidth = UCCanvas.GetThresholdWidth();
            float maxX    = (float)this.Points.Max <UnitPointBulge>(x => x.Point.X);
            float maxY    = (float)this.Points.Max <UnitPointBulge>(x => x.Point.Y);
            float minX    = (float)this.Points.Min <UnitPointBulge>(x => x.Point.X);
            float minY    = (float)this.Points.Min <UnitPointBulge>(x => x.Point.Y);

            if (this.CurrentPoint == MultiSegementLineCurrentPoint.EndPoint)
            {
                maxX = maxX > this.p3.X ? maxX : (float)p3.X;
                maxY = maxY > this.p3.Y ? maxY : (float)p3.Y;
                minX = minX < this.p3.X ? minX : (float)p3.X;
                minY = minY < this.p3.Y ? minY : (float)p3.Y;
            }
            return(ScreenUtils.GetRectangleF(new UnitPoint(minX, minY), new UnitPoint(maxX, maxY), thWidth / 2));
        }
Exemplo n.º 7
0
        public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            RectangleF rectangleF = this.GetBoundingRectangle();

            return(rectangleF);
        }
Exemplo n.º 8
0
        public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            float thresholdWidth = UCCanvas.GetThresholdWidth();

            return(this.GetBoundingRectangle());
        }
Exemplo n.º 9
0
 public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
 {
     return(this.GetBoundingRectangle());
 }
Exemplo n.º 10
0
        public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            float thWidth = UCCanvas.GetThresholdWidth();

            return(ScreenUtils.GetRectangleF(this.p1, this.p2, thWidth / 2));
        }
Exemplo n.º 11
0
        public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType)
        {
            RectangleF rect = HitUtil.CircleBoundingRectangle(this.P1, UCCanvas.GetThresholdWidth(this.radius));

            return(rect);
        }