コード例 #1
0
ファイル: PdfSharpExporter.cs プロジェクト: nhmkdev/cardmaker
        /// <summary>
        /// Adjusts the y position to the next row based on the current layout
        /// respecting the horizontal centering option
        /// </summary>
        /// <param name="zRowExporter"></param>
        /// <param name="nNextExportIndex">The next index of the item to be exported (0-X counter)</param>
        private void MoveToNextRow(PdfRowExporter zRowExporter, int nNextExportIndex)
        {
            zRowExporter.SetupNewRowXPosition(nNextExportIndex);
            m_zExportData.DrawY += m_zExportData.NextRowYAdjust;
            // reset the row adjust to be that of the current layout
#warning    (this likely happens more often than needed, should only apply on layout changes)
            m_zExportData.NextRowYAdjust = m_zExportData.LayoutPointHeight + m_zExportData.BufferY;
        }
コード例 #2
0
ファイル: PdfSharpExporter.cs プロジェクト: nhmkdev/cardmaker
        /// <summary>
        /// Adds a new page to the PDF based on the current configuration
        /// </summary>
        /// <param name="zRowExporter">The row exporter to setup the x position with</param>
        /// <param name="nNextExportIndex">Will be used to setup the x position</param>
        private void AddPage(PdfRowExporter zRowExporter, int nNextExportIndex)
        {
            m_zCurrentPage = m_zDocument.AddPage();

            UpdatePageSize();
            m_zCurrentPage.Orientation = m_ePageOrientation;

            m_zPageGfx          = XGraphics.FromPdfPage(m_zCurrentPage);
            m_zExportData.DrawY = m_zExportData.PageMarginY;

            zRowExporter.SetupNewRowXPosition(nNextExportIndex);
            m_zExportData.NextRowYAdjust = m_zExportData.LayoutPointHeight + m_zExportData.BufferY;
        }