/// <summary>
        /// Renders all tiles in a given scale
        /// </summary>
        /// <param name="scaleindex">The scale to render</param>
        /// <param name="group">The name of the baselayer group</param>
        public void RenderScale(int scaleindex, string group)
        {
            m_parent.InvokeBeginRendering(this, group, scaleindex);

            if (!m_parent.Cancel)
            {
                int rows          = (int)m_dimensions[scaleindex][0];
                int cols          = (int)m_dimensions[scaleindex][1];
                int rowTileOffset = (int)m_dimensions[scaleindex][2];
                int colTileOffset = (int)m_dimensions[scaleindex][3];

                //If the MaxExtents are different from the actual bounds, we need a start offset offset

                using (var settings = new RenderThreads(this, m_parent, m_scaleindexmap[scaleindex], group, m_tileSetResourceID, rows, cols, rowTileOffset, colTileOffset, m_parent.Config.RandomizeTileSequence))
                {
                    settings.RunAndWait();

                    if (settings.TileSet.Count != 0 && !m_parent.Cancel)
                    {
                        throw new Exception(Strings.TS_ThreadFailureError);
                    }
                }
            }

            m_parent.InvokeFinishRendering(this, group, scaleindex);
        }
Пример #2
0
        /// <summary>
        /// Renders all tiles in a given scale
        /// </summary>
        /// <param name="scaleindex">The scale to render</param>
        /// <param name="group">The name of the baselayer group</param>
        public void RenderScale(int scaleindex, string group)
        {
            m_parent.InvokeBeginRendering(this, group, scaleindex);

            if (!m_parent.Cancel)
            {
                int rows = (int)m_dimensions[scaleindex][0];
                int cols = (int)m_dimensions[scaleindex][1];
                int rowTileOffset = (int)m_dimensions[scaleindex][2];
                int colTileOffset = (int)m_dimensions[scaleindex][3];

                //If the MaxExtents are different from the actual bounds, we need a start offset offset

                RenderThreads settings = new RenderThreads(this, m_parent, m_scaleindexmap[scaleindex], group, m_mapdefinition.ResourceID, rows, cols, rowTileOffset, colTileOffset, m_parent.Config.RandomizeTileSequence);

                settings.RunAndWait();

                if (settings.TileSet.Count != 0 && !m_parent.Cancel)
                    throw new Exception(Strings.TS_ThreadFailureError);
            }

            m_parent.InvokeFinishRendering(this, group, scaleindex);
        }