예제 #1
0
        /// <summary>
        /// Render the specified target, projection, layers, zoomFactor and coordinate.
        /// </summary>
        /// <param name="target">Target.</param>
        /// <param name="projection">Projection.</param>
        /// <param name="layers">Layers.</param>
        /// <param name="view">View</param>
        public bool Render(TTarget target, List <ILayer> layers, View2D view)
        {
            // create the view for this control.
            Target2DWrapper <TTarget> target2DWrapper = _renderer.CreateTarget2DWrapper(target);

            // draw all layers seperatly but in the correct order.
            var scenes = new List <Scene2D>();

            for (int layerIdx = 0; layerIdx < layers.Count; layerIdx++)
            {
                // get the layer.
                scenes.Add(layers[layerIdx].Scene);
            }

            // render the scenes.
            return(_renderer.Render(target, scenes, view));
        }