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); }
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)); }
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)); } }
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)); } }
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)); }
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)); }
public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType) { RectangleF rectangleF = this.GetBoundingRectangle(); return(rectangleF); }
public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType) { float thresholdWidth = UCCanvas.GetThresholdWidth(); return(this.GetBoundingRectangle()); }
public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType) { return(this.GetBoundingRectangle()); }
public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType) { float thWidth = UCCanvas.GetThresholdWidth(); return(ScreenUtils.GetRectangleF(this.p1, this.p2, thWidth / 2)); }
public RectangleF GetBoundingRectangle(BoundingRectangleType rectangleType) { RectangleF rect = HitUtil.CircleBoundingRectangle(this.P1, UCCanvas.GetThresholdWidth(this.radius)); return(rect); }