Exemplo n.º 1
0
        public void SetOptions(ImageSettings imageSettings)
        {
            bitmap   = new Bitmap(imageSettings.Size.Width, imageSettings.Size.Height);
            graphics = Graphics.FromImage(bitmap);

            layouter.SetCenter(new Point(imageSettings.Size.Width / 2, imageSettings.Size.Height / 2));
            graphics.Clear(imageSettings.Background);
        }
Exemplo n.º 2
0
 public void SetOptions(ImageSettings imageSettings)
 {
     if (imageSettings.Size.Height <= 0 || imageSettings.Size.Height <= 0)
     {
         throw new AggregateException("Size have zero width or height");
     }
     bitmap   = new Bitmap(imageSettings.Size.Width, imageSettings.Size.Height);
     graphics = Graphics.FromImage(bitmap);
     graphics.Clear(imageSettings.Background);
     layouter.SetCenter(new Point(imageSettings.Size.Width / 2, imageSettings.Size.Height / 2));
 }