public void DrawGeometry_Rectangle_Fill()
        {
            UserControl userControl = new UserControl();

            userControl.Width  = 200;
            userControl.Height = 200;

            DrawGeometryControl testControl = new DrawGeometryControl();

            testControl.Geometry = new RectangleGeometry(new Rect(8, 10, 180, 175.5));
            testControl.Pen      = new Pen(new SolidColorBrush(Colors.Red), 1);
            userControl.Content  = testControl;

            this.RenderToFile(userControl);
            this.CompareImages();
        }
        public void DrawGeometry_Cubic_Besier_Curve()
        {
            UserControl userControl = new UserControl();

            userControl.Width  = 320;
            userControl.Height = 180;

            DrawGeometryControl testControl = new DrawGeometryControl();
            GeometryConverter   converter   = new GeometryConverter();

            testControl.Geometry = (Geometry)converter.ConvertFrom("M 10,100 C 10,300 300,-200 300,100");
            testControl.Brush    = new SolidColorBrush(Colors.Gray);
            testControl.Pen      = new Pen(new SolidColorBrush(Colors.Black), 1);
            userControl.Content  = testControl;

            this.RenderToFile(userControl);
            this.CompareImages();
        }
Ejemplo n.º 3
0
        public void DrawGeometry_Cubic_Besier_Curve()
        {
            UserControl userControl = new UserControl();
            userControl.Width = 320;
            userControl.Height = 180;

            DrawGeometryControl testControl = new DrawGeometryControl();
            GeometryConverter converter = new GeometryConverter();
            testControl.Geometry = (Geometry)converter.ConvertFrom("M 10,100 C 10,300 300,-200 300,100");
            testControl.Brush = new SolidColorBrush(Colors.Gray);
            testControl.Pen = new Pen(new SolidColorBrush(Colors.Black), 1);
            userControl.Content = testControl;

            this.RenderToFile(userControl);
            this.CompareImages();
        }
Ejemplo n.º 4
0
        public void DrawGeometry_Rectangle_Fill()
        {
            UserControl userControl = new UserControl();
            userControl.Width = 200;
            userControl.Height = 200;

            DrawGeometryControl testControl = new DrawGeometryControl();
            testControl.Geometry = new RectangleGeometry(new Rect(8, 10, 180, 175.5));
            testControl.Pen = new Pen(new SolidColorBrush(Colors.Red), 1);
            userControl.Content = testControl;

            this.RenderToFile(userControl);
            this.CompareImages();
        }