Exemple #1
0
        // Image
        private void menuImageOpenSvg_Click(object sender, RoutedEventArgs e)
        {
            // Export and open svg in default editor
            var image = new Torec.Drawing.Image(_viewport);

            _gridDrawer.DrawGrid(image);
            image.Show(true);
        }
Exemple #2
0
        public void DrawGrid_DrawEmptyGrid()
        {
            using (var stringWriter = new StringWriter())
            {
                Console.SetOut(stringWriter);

                _gridDrawer.DrawGrid(new Position(0, 0), new Dictionary <Coordinates, FieldType>());

                var swString = stringWriter.ToString().Trim().Replace("\r", "");
                var emptyGridStringTrimmed = _emptyGridString.Trim().Replace("\r", "");

                swString.Should().BeEquivalentTo(emptyGridStringTrimmed);
            }
        }
        public void Render()
        {
            GridDrawer.DrawGrid(EditorConfig.smallGridSpacing, EditorConfig.smallGridOpacity, window.position, ref offset, ref drag);
            GridDrawer.DrawGrid(EditorConfig.largeGridSpacing, EditorConfig.largeGridOpacity, window.position, ref offset, ref drag);
            MenuBarDrawer.DrawMenuBar(window);

            selectorNodeDrawer.Draw(window?.selectorNodes);
            actionNodeDrawer.Draw(window?.actionNodes);
            pinDrawer.Draw(window.connectionPins);

            if (selectedPin != null)
            {
                connectionDrawer.DrawDraggedLine(selectedPin, Event.current.mousePosition);
            }
            connectionDrawer.DrawConnections(window.connections);
        }