Ejemplo n.º 1
0
 /// <summary>
 /// See interface docs.
 /// </summary>
 /// <param name="original"></param>
 /// <param name="width"></param>
 /// <param name="centreHorizontally"></param>
 /// <returns></returns>
 public IImage WidenImage(IImage original, int width, bool centreHorizontally)
 {
     return(_ImageFile.CloneAndDraw(
                _ImageFile.Create(width, original.Height),
                drawing => {
         var x = !centreHorizontally ? 0 : (width - original.Width) / 2;
         drawing.DrawImage(original, x, 0);
     }
                ));
 }