Beispiel #1
0
        public void SetCropRequest(int zoomWidth, int zoomHeight, int offsetX, int offsetY)
        {
            lock (_Sync)
            {
                _CropRequest = new ComputationRequest(_Package.Min, _Package.Max, Width, Height, zoomWidth, zoomHeight, _NUMBER_LENGTH, offsetX, offsetY, ComputationType.Crop);

                _Package = null;
            }
        }
Beispiel #2
0
        public void CreateFrame(Complex min, Complex max)
        {
            lock (_Sync)
            {
                _FrameCount++;

                string path = Path.Combine(GetProjectBasePath(Name), _FrameCount.ToString());

                Directory.CreateDirectory(path);

                Tuple <Complex, Complex> complexDim = Tuple.Create(min, max);
                string json = JsonConvert.SerializeObject(complexDim);
                path = Path.Combine(path, "_bounds.json");
                File.WriteAllText(path, json);

                _Package = new ComputationPackage(min, max, Width, Height, PartialWidth, PartialHeight, (uint)Palette.Length - 1, Cols, Rows, Threads);
            }
        }