Example #1
0
        public static RectangleF RoundRectangleF(RectangleF rect, DiagramUnit unit)
        {
            int decimals = Units.DecimalsFromUnit(unit);

            return(new RectangleF(Convert.ToSingle(Math.Round(rect.X, decimals)), Convert.ToSingle(Math.Round(rect.Y, decimals)), Convert.ToSingle(Math.Round(rect.Width, decimals)), Convert.ToSingle(Math.Round(rect.Height, decimals))));
        }