/// <summary> /// Формирование массива BMP из СГР. /// </summary> /// <param name="stage">Данные СГР</param> /// <param name="ppi">Разрешение BMP</param> static public Bitmap[] GetSlicedBMP(DataPack stage, Int32 ppi) { var creatorBMP = new CreatorBMP(stage); var arrBmp = creatorBMP.PrepareSlicedBMP(ppi); return(arrBmp); }
/// <summary> /// Формирование BMP из сохранённого файла. /// </summary> /// <param name="ppi">Разрешение BMP</param> static public Bitmap GetBMPfromSaved(Int32 ppi) { var formatter = new Formatter(Constants.Serial.sXML); var stage = formatter.RestoreFromfile(); var creatorBMP = new CreatorBMP(stage); var bmp = creatorBMP.PrepareBMP(ppi); return(bmp); }
/// <summary> /// Формирование BMP из СГР. /// </summary> /// <param name="stage">Данные СГР</param> /// <param name="ppi">Разрешение BMP</param> static public Bitmap GetBMP(DataPack stage, Int32 ppi) { //var formatter = new Formatter(Constants.Serial.sXML); //formatter.Save2file(stage); var creatorBMP = new CreatorBMP(stage); var bmp = creatorBMP.PrepareBMP(ppi); return(bmp); }
public MainForm(DataPack dPack) { InitializeComponent(); panel1.AutoScroll = true; pictureBox1.SizeMode = PictureBoxSizeMode.AutoSize; // reduce flickering this.DoubleBuffered = true; this.MouseWheel += new MouseEventHandler(FMouseWheel); curZoom = 100.0; var creatorBMP = new CreatorBMP(dPack); var PICTURE_DPI = 96; bmp = creatorBMP.PrepareBMP(PICTURE_DPI); RenderDoc(); }