Skip to content

Commit

Permalink
Merge 84d77da into 05fa19e
Browse files Browse the repository at this point in the history
  • Loading branch information
beru committed Oct 4, 2019
2 parents 05fa19e + 84d77da commit 07981aa
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 40 deletions.
3 changes: 1 addition & 2 deletions sakura_core/view/CEditView.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ class CEditView
protected:
//! ロジック行を1行描画
bool DrawLogicLine(
HDC hdc, //!< [in] 作画対象
DispPos* pDispPos, //!< [in,out] 描画する箇所、描画元ソース
SColorStrategyInfo* pInfo, //!< [in,out]
CLayoutInt nLineTo //!< [in] 作画終了するレイアウト行番号
);

Expand Down
79 changes: 41 additions & 38 deletions sakura_core/view/CEditView_Paint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -779,15 +779,22 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
sPos.ForwardLayoutLineRef(1); //レイアウト行++
}
}else{

SColorStrategyInfo _sInfo;
SColorStrategyInfo* pInfo = &_sInfo;
pInfo->m_gr = gr;
pInfo->m_pDispPos = &sPos;
pInfo->m_pcView = this;

auto y0 = pInfo->m_pDispPos->GetDrawPos().y;
while(sPos.GetLayoutLineRef() <= nLayoutLineTo)
{
//描画X位置リセット
sPos.ResetDrawCol();

//1行描画
bool bDispResult = DrawLogicLine(
gr,
&sPos,
pInfo,
nLayoutLineTo
);

Expand All @@ -810,6 +817,37 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
}
}
}
auto y1 = pInfo->m_pDispPos->GetDrawPos().y;

// ノート線描画
if( !m_bMiniMap ){
GetTextDrawer().DispNoteLine(
pInfo->m_gr,
y0,
y1,
GetTextArea().GetAreaLeft(),
GetTextArea().GetAreaRight()
);
}

// 指定桁縦線描画
GetTextDrawer().DispVerticalLines(
pInfo->m_gr,
y0,
y1,
CLayoutInt(0),
CLayoutInt(-1)
);

// 折り返し桁縦線描画
if( !m_bMiniMap ){
GetTextDrawer().DispWrapLine(
pInfo->m_gr,
y0,
y1
);
}

}

cTextType.RewindGraphicsState(gr);
Expand Down Expand Up @@ -871,18 +909,12 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
@date 2007.08.31 kobake 引数 bDispBkBitmap を削除
*/
bool CEditView::DrawLogicLine(
HDC _hdc, //!< [in] 作画対象
DispPos* _pDispPos, //!< [in,out] 描画する箇所、描画元ソース
SColorStrategyInfo* pInfo, //!< [in,out]
CLayoutInt nLineTo //!< [in] 作画終了するレイアウト行番号
)
{
// MY_RUNNINGTIMER( cRunningTimer, "CEditView::DrawLogicLine" );
bool bDispEOF = false;
SColorStrategyInfo _sInfo;
SColorStrategyInfo* pInfo = &_sInfo;
pInfo->m_gr.Init(_hdc);
pInfo->m_pDispPos = _pDispPos;
pInfo->m_pcView = this;

//CColorStrategyPool初期化
CColorStrategyPool* pool = CColorStrategyPool::getInstance();
Expand Down Expand Up @@ -1146,35 +1178,6 @@ bool CEditView::DrawLayoutLine(SColorStrategyInfo* pInfo)
}
}

// ノート線描画
if( !m_bMiniMap ){
GetTextDrawer().DispNoteLine(
pInfo->m_gr,
pInfo->m_pDispPos->GetDrawPos().y,
pInfo->m_pDispPos->GetDrawPos().y + nLineHeight,
GetTextArea().GetAreaLeft(),
GetTextArea().GetAreaRight()
);
}

// 指定桁縦線描画
GetTextDrawer().DispVerticalLines(
pInfo->m_gr,
pInfo->m_pDispPos->GetDrawPos().y,
pInfo->m_pDispPos->GetDrawPos().y + nLineHeight,
CLayoutInt(0),
CLayoutInt(-1)
);

// 折り返し桁縦線描画
if( !m_bMiniMap ){
GetTextDrawer().DispWrapLine(
pInfo->m_gr,
pInfo->m_pDispPos->GetDrawPos().y,
pInfo->m_pDispPos->GetDrawPos().y + nLineHeight
);
}

// 反転描画
if( pcLayout && GetSelectionInfo().IsTextSelected() ){
DispTextSelected(
Expand Down

0 comments on commit 07981aa

Please sign in to comment.