コード例 #1
0
ファイル: CircularCloudDrawing.cs プロジェクト: Pasha0666/fp
        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);
        }
コード例 #2
0
ファイル: CircularCloudDrawing.cs プロジェクト: Pasha0666/di
 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));
 }