Esempio n. 1
0
        public DrawingEngineControl(DrawingEngine drawingEngine)
        {
            this.drawingEngine = drawingEngine;

            //enable double buffering to eliminate flicker
            this.DoubleBuffered = true;
        }
Esempio n. 2
0
        /**
         * Generates a drawing engine which will draw the given pedigree model.
         */
        public static DrawingEngine generateDrawingEngine(PedigreeModel model)
        {
            DrawingEngine drawingEngine = new DrawingEngine();

            drawingEngine.addDrawingStep(delegate(Graphics g)
            {
                foreach (PedigreeCouple couple in model.couples)
                {
                    rect.X = (int)couple.point.x;
                    rect.Y = (int)couple.point.y;

                    g.DrawEllipse(pen, rect);
                }
            });

            return drawingEngine;
        }