Beispiel #1
0
        //Adds a model lines and shapes to an svg document
        private void AddDiagramImplementation(IDiagram diagram)
        {
            RenderList list = new RenderList();

            //Add each sorted shape to the svg document
            foreach (Element element in diagram.Lines.Values)
            {
                if (element.Visible)
                {
                    list.Add(element);
                }
            }

            //Add each sorted line to the svg document
            foreach (Element element in diagram.Shapes.Values)
            {
                if (element.Visible)
                {
                    list.Add(element);
                }
            }

            list.Sort();

            //Go through the diagram and add the element by layer;
            foreach (Layer layer in diagram.Layers)
            {
                if (layer.Visible)
                {
                    foreach (Element element in list)
                    {
                        if (element.Layer == layer)
                        {
                            AddElement(element);
                        }
                    }
                }
            }
        }
Beispiel #2
0
        //Adds a model lines and shapes to an svg document
        private void AddContainerImplementation(IContainer container)
        {
            RenderList list = new RenderList();

            //Add each sorted shape to the svg document
            foreach (Element element in container.Lines.Values)
            {
                list.Add(element);
            }

            //Add each sorted line to the svg document
            foreach (Element element in container.Shapes.Values)
            {
                list.Add(element);
            }

            list.Sort();

            //Go through the diagram and add the element
            foreach (Element element in list)
            {
                AddElement(element);
            }
        }
Beispiel #3
0
        public RendererControl()
        {
            InitializeComponent();

            lapWatch    = new Stopwatch();
            globalWatch = new Stopwatch();
            camera      = new Camera();

            frameNumber = 0;

            Renderables = new RenderList();

            objects          = new ObjectDisplay();
            objects.Color    = ForeColor;
            objects.Location = new PointF(0, 50);
            Renderables.Add(objects);
        }
Beispiel #4
0
        public RendererControl()
        {
            InitializeComponent();

            lapWatch = new Stopwatch();
            globalWatch = new Stopwatch();
            camera = new Camera();

            frameNumber = 0;

            Renderables = new RenderList();

            objects = new ObjectDisplay();
            objects.Color = ForeColor;
            objects.Location = new PointF(0, 50);
            Renderables.Add(objects);
        }
Beispiel #5
0
        public RendererWindow()
            : base(800, 600, GraphicsMode.Default, "EZ Terrain")
        {
            Context.ErrorChecking = true;
            VSync = VSyncMode.Off;
            ClearColor = Color.LightBlue;

            lapWatch = new Stopwatch();
            globalWatch = new Stopwatch();
            camera = new Camera();

            frameNumber = 0;

            Renderables = new RenderList();

            objects = new ObjectDisplay();
            objects.Color = Color.Black;
            objects.Location = new PointF(0, 50);
            Renderables.Add(objects);
        }
        public override void CreateRenderList(RectangleF rect, bool sort)
        {
            RenderList renderList = RenderList;

            renderList.Clear();

            //Add all items from the current tab
            if (Tabs != null)
            {
                foreach (Element element in Tabs.CurrentTab.Elements.Values)
                {
                    renderList.Add(element);
                }

                if (sort)
                {
                    renderList.Sort();
                }
            }
        }
Beispiel #7
0
        public RendererWindow()
            : base(800, 600, GraphicsMode.Default, "EZ Terrain")
        {
            Context.ErrorChecking = true;
            VSync      = VSyncMode.Off;
            ClearColor = Color.LightBlue;

            lapWatch    = new Stopwatch();
            globalWatch = new Stopwatch();
            camera      = new Camera();

            frameNumber = 0;

            Renderables = new RenderList();

            objects          = new ObjectDisplay();
            objects.Color    = Color.Black;
            objects.Location = new PointF(0, 50);
            Renderables.Add(objects);
        }
		//Adds a model lines and shapes to an svg document
		private void AddContainerImplementation(IContainer container)
		{
			RenderList list = new RenderList();
			
			//Add each sorted shape to the svg document			
			foreach (Element element in container.Lines.Values)
			{
				list.Add(element);
			}

			//Add each sorted line to the svg document
			foreach (Element element in container.Shapes.Values)
			{
				list.Add(element);
			}

			list.Sort();

			//Go through the diagram and add the element
			foreach (Element element in list)
			{
				AddElement(element);
			}
		}
		//Adds a model lines and shapes to an svg document
		private void AddDiagramImplementation(IDiagram diagram)
		{
			RenderList list = new RenderList();
			
			//Add each sorted shape to the svg document			
			foreach (Element element in diagram.Lines.Values)
			{
				if (element.Visible) list.Add(element);
			}

			//Add each sorted line to the svg document
			foreach (Element element in diagram.Shapes.Values)
			{
				if (element.Visible) list.Add(element);
			}

			list.Sort();

			//Go through the diagram and add the element by layer;
			foreach (Layer layer in diagram.Layers)
			{
				if (layer.Visible)
				{
					foreach (Element element in list)
					{
						if (element.Layer == layer) AddElement(element);
					}
				}
			}
		}