Ejemplo n.º 1
0
        private EntraForm PrepareDrawerForm(string imageInput, bool isClipping)
        {
            EntraForm form;

            if (String.IsNullOrEmpty(imageInput))
            {
                form = new EntraForm();
            }
            else
            {
                form = new EntraForm(imageInput);
            }

            this._graphic = form.Graphics;

            //if (subjs != null)
            //    SortClockwise(subjs);
            //if (clips != null)
            //    SortClockwise(clips);
            //if (solution != null)
            //    SortClockwise(solution);


            if (isClipping)
            {
                ClipPolygonsFromBorders(ref subjs);
                ClipPolygonsFromBorders(ref clips);
                ClipPolygonsFromBorders(ref solution);
            }

            if (subjs != null)
            {
                DrawPolygons(subjs, ColorSubjs, subjsAlpha);
            }
            if (clips != null)
            {
                DrawPolygons(clips, ColorClips, clipsAlpha);
            }
            if (solution != null)
            {
                DrawPolygons(solution, ColorSolutions, solutionAlpha);
            }

            return(form);
        }
Ejemplo n.º 2
0
        public void DrawSolutionIntoFile(string imageInput = null, bool isClipping = true)
        {
            EntraForm form = PrepareDrawerForm(imageInput, isClipping);

            form.SaveEntraOutputImageIntoHDD();
        }
Ejemplo n.º 3
0
        public void DrawSolutionIntoFile(string imageInput, bool isClipping, int counter)
        {
            EntraForm form = PrepareDrawerForm(imageInput, isClipping);

            form.SaveEntraOutputImageIntoHDD(counter);
        }
Ejemplo n.º 4
0
        private Bitmap GetPolyOnlySolutionBitmap()
        {
            EntraForm form = PrepareDrawerForm(null, true);

            return(form.SavePolyOnlyIntoBitmap());
        }