Exemplo n.º 1
0
        private void menuItemScaleDown_Click(object sender, System.EventArgs e)
        {
            // If no template doc active, bail

            if (m_tmpdActive == null)
            {
                return;
            }

            // Make sure 24 x 24 (could actually allow any sort of conversion...)

            if (m_tmpdActive.TileSize.Width != 24 && m_tmpdActive.TileSize.Height != 24)
            {
                MessageBox.Show(DocManager.GetFrameParent(), "The current template collection must be 24 x 24 tile size");
                return;
            }

            // Get busy

            TemplateDoc tmpdDst = TemplateTools.CloneTemplateDoc(m_tmpdActive);

            TemplateTools.ScaleTemplates(tmpdDst, new Size(16, 16));
            TemplateTools.QuantizeTemplates(tmpdDst, null, 0, 0, 0);
            DocManager.SetActiveDocument(typeof(TemplateDoc), tmpdDst);
        }
Exemplo n.º 2
0
        private void menuItemQuantizeOnly_Click(object sender, System.EventArgs e)
        {
            if (m_tmpdActive == null)
            {
                return;
            }
            TemplateDoc tmpdDst = TemplateTools.CloneTemplateDoc(m_tmpdActive);

            TemplateTools.QuantizeTemplates(tmpdDst, null, 0, 0, 0);
            DocManager.SetActiveDocument(typeof(TemplateDoc), tmpdDst);
        }