public ImageBorderMargin(int width, int height, BorderCalculation calculation)
 {
     _width = width;
     _height = height;
     _calculations = new List<BorderCalculation>();
     _calculations.Add(calculation);
 }
 public ImageBorderMargin(int width, int height, BorderCalculation calculation)
 {
     _width        = width;
     _height       = height;
     _calculations = new List <BorderCalculation>();
     _calculations.Add(calculation);
 }
 public void Save(IProperties properties)
 {
     properties.RemoveAll();
     properties.SetInt(WIDTH, _width);
     properties.SetInt(HEIGHT, _height);
     properties.SetInt(COUNT, _calculations.Count);
     for (int i = 0; i < _calculations.Count; i++)
     {
         BorderCalculation calc   = _calculations[i];
         string            prefix = CALC + i.ToString(CultureInfo.InvariantCulture);
         properties.SetInt(prefix + WIDTH_ADD, calc.WidthAdd);
         properties.SetInt(prefix + HEIGHT_ADD, calc.HeightAdd);
         properties.SetFloat(prefix + WIDTH_FACTOR, calc.WidthFactor);
         properties.SetFloat(prefix + HEIGHT_FACTOR, calc.HeightFactor);
     }
 }
 public ImageBorderMargin(ImageBorderMargin existingBorder, int width, int height, BorderCalculation calculation)
 {
     _width = width + existingBorder.Width;
     _height = height + existingBorder.Height;
     _calculations = new List<BorderCalculation>(existingBorder._calculations);
     _calculations.Add(calculation);
 }
 public ImageBorderMargin(ImageBorderMargin existingBorder, int width, int height, BorderCalculation calculation)
 {
     _width        = width + existingBorder.Width;
     _height       = height + existingBorder.Height;
     _calculations = new List <BorderCalculation>(existingBorder._calculations);
     _calculations.Add(calculation);
 }