public static FeatheredRectangleF Union(FeatheredRectangleF a, FeatheredRectangleF b) { RectangleF rslt = RectangleF.Union(a._rect, b._rect); FeatheredRectangleF retVal = new FeatheredRectangleF(rslt.Location, rslt.Size, System.Math.Max(a._feather, b._feather)); retVal.BorderOffset = System.Math.Max(a._border, b._border); return(retVal); }
public static FeatheredRectangleF Intersect(FeatheredRectangleF a, FeatheredRectangleF b) { RectangleF rslt = RectangleF.Intersect(a._rect, b._rect); if (!rslt.IsEmpty) { FeatheredRectangleF retVal = new FeatheredRectangleF(rslt.Location, rslt.Size, System.Math.Max(a._feather, b._feather)); retVal.BorderOffset = System.Math.Max(a._border, b._border); return(retVal); } else { return(FeatheredRectangleF.Empty); } }
public static FeatheredRectangleF Intersect(FeatheredRectangleF a, FeatheredRectangleF b) { RectangleF rslt = RectangleF.Intersect(a._rect, b._rect); if (!rslt.IsEmpty) { FeatheredRectangleF retVal = new FeatheredRectangleF(rslt.Location, rslt.Size, System.Math.Max(a._feather, b._feather)); retVal.BorderOffset = System.Math.Max(a._border, b._border); return retVal; } else return FeatheredRectangleF.Empty; }
public static FeatheredRectangleF Inflate(FeatheredRectangleF rect, float x, float y) { return new FeatheredRectangleF(rect.Location, new SizeF(rect.Width + x, rect.Height + y), rect.CornerFeather); }
public static FeatheredRectangleF Union(FeatheredRectangleF a, FeatheredRectangleF b) { RectangleF rslt = RectangleF.Union(a._rect, b._rect); FeatheredRectangleF retVal = new FeatheredRectangleF(rslt.Location, rslt.Size, System.Math.Max(a._feather, b._feather)); retVal.BorderOffset = System.Math.Max(a._border, b._border); return retVal; }
public static FeatheredRectangle Round(FeatheredRectangleF value) { return new FeatheredRectangle(Point.Round(value.Location), Size.Round(value.Size), (int)System.Math.Round(value.CornerFeather)); }
public static FeatheredRectangle Truncate(FeatheredRectangleF value) { return new FeatheredRectangle(Point.Truncate(value.Location), Size.Truncate(value.Size), (int)System.Math.Truncate(value.CornerFeather)); }
public static FeatheredRectangleF Inflate(FeatheredRectangleF rect, float x, float y) { return(new FeatheredRectangleF(rect.Location, new SizeF(rect.Width + x, rect.Height + y), rect.CornerFeather)); }
//*************************************************************************** // Static Methods // public static FeatheredRectangleF FromLTRB(float left, float top, float right, float bottom) { return(FeatheredRectangleF.FromLTRB(left, top, right, bottom, 0)); }
public static FeatheredRectangle Round(FeatheredRectangleF value) { return(new FeatheredRectangle(Point.Round(value.Location), Size.Round(value.Size), (int)System.Math.Round(value.CornerFeather))); }