- Timestamp:
- 02/25/14 22:31:57 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Visualization/HeuristicLab.Visualization/3.3/ChartControl.cs
r9491 r10515 29 29 namespace HeuristicLab.Visualization { 30 30 public partial class ChartControl : UserControl { 31 private Bitmap bitmap;32 31 public Bitmap Bitmap { get; private set; } 32 33 33 private bool renderingRequired; 34 34 private Point buttonDownPoint; … … 243 243 } else { 244 244 if ((pictureBox.Width == 0) || (pictureBox.Height == 0)) { 245 bitmap = null;245 Bitmap = null; 246 246 } else { 247 bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);247 Bitmap = new Bitmap(pictureBox.Width, pictureBox.Height); 248 248 if (Chart != null) { 249 Graphics graphics = Graphics.FromImage( bitmap);249 Graphics graphics = Graphics.FromImage(Bitmap); 250 250 graphics.SetClip(new System.Drawing.Rectangle(0, 0, pictureBox.Width, pictureBox.Height)); 251 251 Chart.Render(graphics, pictureBox.Width, pictureBox.Height); … … 254 254 } 255 255 if (pictureBox.Image != null) pictureBox.Image.Dispose(); 256 pictureBox.Image = bitmap;256 pictureBox.Image = Bitmap; 257 257 renderingRequired = false; 258 258 } … … 270 270 271 271 private void SaveImageAsBitmap(string filename) { 272 if ( bitmap == null) throw new Exception("Bitmap is null.");273 bitmap.Save(filename);272 if (Bitmap == null) throw new Exception("Bitmap is null."); 273 Bitmap.Save(filename); 274 274 } 275 275
Note: See TracChangeset
for help on using the changeset viewer.