CardMaker.Card.Export.PdfSharpExporter.ConfigurePointSizes C# (CSharp) Метод

ConfigurePointSizes() приватный Метод

Updates the point sizes to match that of the PDF exporter
private ConfigurePointSizes ( CardMaker.XML.ProjectLayout zLayout ) : void
zLayout CardMaker.XML.ProjectLayout
Результат void
        private void ConfigurePointSizes(ProjectLayout zLayout)
        {
            int nWidth = zLayout.width;
            int nHeight = zLayout.height;
            switch (zLayout.exportRotation)
            {
                case 90:
                case -90:
                    nWidth = zLayout.height;
                    nHeight = zLayout.width;
                    break;
            }

            double dPointsPerInchWidth = (double)m_zCurrentPage.Width / (double)m_zCurrentPage.Width.Inch;
            double dInchesWidthPerLayoutItem = (double)nWidth / (double)zLayout.dpi;
            m_dLayoutPointWidth = dInchesWidthPerLayoutItem * dPointsPerInchWidth;

            double dPointsPerInchHeight = (double)m_zCurrentPage.Height / (double)m_zCurrentPage.Height.Inch;
            double dInchesHeightPerLayoutItem = (double)nHeight / (double)zLayout.dpi;
            m_dLayoutPointHeight = dInchesHeightPerLayoutItem * dPointsPerInchHeight;

            m_dBufferX = ((double)zLayout.buffer / (double)zLayout.dpi) * dPointsPerInchWidth;
            m_dBufferY = ((double)zLayout.buffer / (double)zLayout.dpi) * dPointsPerInchHeight;
        }