@@ -1468,6 +1468,41 @@ CColorStrategy* CPrintPreview::DrawPageText(
1468
1468
const int nBasePosX = nOffX + nDanWidth * nDan + nLineNumWidth * (nDan + 1 );
1469
1469
1470
1470
const int charWidth = m_pPrintSetting->m_nPrintFontWidth ;
1471
+
1472
+ // 指定桁縦線。段ごとに一度に引く
1473
+ // 文字より下に描画、先に線を引いておく、背景色は透明に限る
1474
+ if (m_typePrint.m_ColorInfoArr [COLORIDX_VERTLINE].m_bDisp ){
1475
+ const STypeConfig& type = m_typePrint;
1476
+ const ColorInfo& vline_cinfo = type.m_ColorInfoArr [COLORIDX_VERTLINE];
1477
+ const SColorAttr& vline_color = vline_cinfo.m_sColorAttr ;
1478
+ const SFontAttr& vline_attr = vline_cinfo.m_sFontAttr ;
1479
+ COLORREF pen_color = RGB (0 ,0 ,0 );
1480
+ if (m_pPrintSetting->m_bColorPrint ){
1481
+ pen_color = vline_color.m_cTEXT ;
1482
+ }
1483
+ HPEN hpNew = ::CreatePen (PS_SOLID, vline_attr.m_bBoldFont ? 2 : 1 , pen_color);
1484
+ HPEN hpOld = (HPEN)::SelectObject (hdc, hpNew);
1485
+ CTextDrawer::DispVerticalLinesImpl (
1486
+ hdc, type.m_nVertLineIdx , MAX_VERTLINES,
1487
+ false , // BoldはPen幅で対応
1488
+ vline_attr.m_bUnderLine ,
1489
+ 0 , // nViewLeftCol 横スクロースしないので0固定
1490
+ m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nWrapLayout
1491
+ nBasePosX + m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nRightCol
1492
+ nBasePosX, // nPosXOffset
1493
+ nBasePosX, // nPosXLeft
1494
+ nBasePosX + m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nPosXRight
1495
+ nDirectY * nOffY, // nTop,
1496
+ nDirectY * (nOffY + nLineHeight * m_bPreview_EnableLines), // nBottom
1497
+ nDirectY,
1498
+ false , // bOddLine
1499
+ m_pPrintSetting->m_nPrintFontWidth , // nLayoutXDefault
1500
+ 1 // nCharPx(プロポーショナル版では1固定)
1501
+ );
1502
+ ::SelectObject (hdc, hpOld);
1503
+ ::DeleteObject (hpNew);
1504
+ }
1505
+
1471
1506
for ( i = 0 ; i < m_bPreview_EnableLines; ++i ){
1472
1507
if ( NULL != pCDlgCancel ){
1473
1508
/* 処理中のユーザー操作を可能にする */
@@ -1581,39 +1616,6 @@ CColorStrategy* CPrintPreview::DrawPageText(
1581
1616
nDirectY * ( nOffY + nLineHeight * i )
1582
1617
);
1583
1618
}
1584
-
1585
- // 指定桁縦線。段ごとに一度に引く
1586
- const STypeConfig& type = m_typePrint;
1587
- const ColorInfo& vline_cinfo = type.m_ColorInfoArr [COLORIDX_VERTLINE];
1588
- const SColorAttr& vline_color = vline_cinfo.m_sColorAttr ;
1589
- const SFontAttr& vline_attr = vline_cinfo.m_sFontAttr ;
1590
- if (vline_cinfo.m_bDisp ){
1591
- COLORREF pen_color = RGB (0 ,0 ,0 );
1592
- if (m_pPrintSetting->m_bColorPrint ){
1593
- pen_color = vline_color.m_cTEXT ;
1594
- }
1595
- HPEN hpNew = ::CreatePen (PS_SOLID, vline_attr.m_bBoldFont ? 2 : 1 , pen_color);
1596
- HPEN hpOld = (HPEN)::SelectObject (hdc, hpNew);
1597
- CTextDrawer::DispVerticalLinesImpl (
1598
- hdc, type.m_nVertLineIdx , MAX_VERTLINES,
1599
- false , // BoldはPen幅で対応
1600
- vline_attr.m_bUnderLine ,
1601
- 0 , // nViewLeftCol 横スクロースしないので0固定
1602
- m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nWrapLayout
1603
- nBasePosX + m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nRightCol
1604
- nBasePosX, // nPosXOffset
1605
- nBasePosX, // nPosXLeft
1606
- nBasePosX + m_pPrintSetting->m_nPrintFontWidth * type.m_nMaxLineKetas , // nPosXRight
1607
- nDirectY * nOffY, // nTop,
1608
- nDirectY * ( nOffY + nLineHeight * i ), // nBottom
1609
- nDirectY,
1610
- false , // bOddLine
1611
- m_pPrintSetting->m_nPrintFontWidth , // nLayoutXDefault
1612
- 1 // nCharPx(プロポーショナル版では1固定)
1613
- );
1614
- ::SelectObject (hdc, hpOld);
1615
- ::DeleteObject (hpNew);
1616
- }
1617
1619
}
1618
1620
return pStrategy;
1619
1621
}
0 commit comments