/// <summary> /// Saves the PlotView as a bitmap. /// </summary> /// <param name="fileName">Name of the file.</param> /// <param name="width">The width.</param> /// <param name="height">The height.</param> /// <param name="background">The background.</param> public void SaveBitmap(string fileName, int width, int height, OxyColor background) { if (width == 0) { width = (int)this.ActualWidth; } if (height == 0) { height = (int)this.ActualHeight; } if (background.IsAutomatic()) { background = this.Background.ToOxyColor(); } PngExporter.Export(this.ActualModel, fileName, width, height, background); }