private void btnMainThread_Click(object sender, EventArgs e) { RasterToVectorSettings rasterToVectorSettings = new RasterToVectorSettings(); rasterToVectorSettings.ReadGeoCorners(windowSettings.leftXCoord, windowSettings.leftYCoord, windowSettings.rightXCoord, windowSettings.rightYCoord); rasterToVectorSettings.sourceBmp = sourceBmp; rasterToVectorSettings.CalculateGeoPx(); RasterToVectorRunner.RunRasterToVectorMainThread(rasterToVectorSettings); }
private void btnMainThread_Click(object sender, EventArgs e) { RasterToVectorSettings rasterToVectorSettings = new RasterToVectorSettings(); rasterToVectorSettings.ReadGeoCorners(windowSettings.leftXCoord, windowSettings.leftYCoord, windowSettings.rightXCoord, windowSettings.rightYCoord); rasterToVectorSettings.sourceBmp = sourceBmp; rasterToVectorSettings.CalculateGeoPx(); mapFactory = RasterToVectorRunner.RunRasterToVectorMainThread(rasterToVectorSettings); desinationImageCrooper = new VectorImageCrooper(new Size(sourcePanel.Width, sourcePanel.Height), mapFactory, sourceImageCropper.centerX, sourceImageCropper.centerY, windowSettings); DrawCroppedScaledImage(float.Parse(ScaleTB.Text)); }
private void btnStartR2V_Click_1(object sender, EventArgs e) { Debug.Assert(sourceBmp != null, "Nie wgrano obrazu źródłowego."); RasterToVectorSettings rasterToVectorSettings = new RasterToVectorSettings{ sourceBmp = sourceBmp }; rasterToVectorSettings.ReadGeoCorners(windowSettings.leftXCoord, windowSettings.leftYCoord, windowSettings.rightXCoord, windowSettings.rightYCoord); if (rbMainThread.Checked) { mapFactory = RasterToVectorRunner.RunRasterToVectorMainThread(rasterToVectorSettings); // Bitmap res = mapFactory.getBitmap(new Rectangle(0, 0, sourceBmp.Width, sourceBmp.Height)); } else if (rbSeparateThread.Checked) { RasterToVectorRunner.RunRasterToVectorSeparateThread(); } else { Debug.Assert(false, "Oba: Main i Separate = false"); } }