private void drawPreview()
        {
            double sx, sy, ex, ey;

            sx = trnsX(0.0);
            sy = trnsY(0.0);
            ex = trnsX(210.0);
            ey = trnsY(297.0);
            m_libCanvas.setBrushFill(0xff, 0xff, 0xff);
            m_libCanvas.drawBoxs(canvasPreview, sx, sy, ex - sx, ey - sy);

            drawCanvas(canvasPreview);
        }
        private void drawPreviewPage()
        {
            double sx, sy, ex, ey;

            if (m_nCrtPage == 1)
            {
                btnPrevPage.IsEnabled = false;
            }
            if (m_nCrtPage == m_nPageMax)
            {
                btnNextPage.IsEnabled = false;
            }
            sx = trnsX(0.0);
            sy = trnsY(0.0);
            ex = trnsX(210.0);
            ey = trnsY(297.0);
            m_libCanvas.setBrushFill(0xff, 0xff, 0xff);
            m_libCanvas.drawBoxs(canvasPage, sx, sy, ex - sx, ey - sy);

            drawPageToCanvas(canvasPage, m_nCrtPage);
        }
Пример #3
0
        public void SettingCanvas(string sFileName, Canvas canvas)
        {
            double timex, timey;

            string[] aryLine;
            int      max, idx;

            m_Canvas = canvas;
            timex    = m_Canvas.Width / 210.0;
            timey    = m_Canvas.Height / 297.0;
            if (timex < timey)
            {
                m_dTime = timex;
            }
            else
            {
                m_dTime = timey;
            }
            m_dBaseX = 0;
            m_dBaseY = 0;

            aryLine = m_libCmn.LoadFileLineSJIS(sFileName);

            m_libCanvas.setFontSize(24.0);
            m_libCanvas.setFontName("MS ゴシック");
            m_libCanvas.setFontNomal();
            m_libCanvas.setBrushFill(-1, -1, -1);
            m_libCanvas.setBrushStroke(0, 0, 0, 1, 0);
            m_libCanvas.setBrushText(0, 0, 0);

            max = aryLine.Length;
            for (idx = 0; idx < max; idx++)
            {
                analysisLine(aryLine[idx]);
            }
        }