Skip to content

Commit

Permalink
Merge f27a8d3 into 0de7f4e
Browse files Browse the repository at this point in the history
  • Loading branch information
beru committed Apr 3, 2021
2 parents 0de7f4e + f27a8d3 commit 5a39b81
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions sakura_core/view/CEditView_Paint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,7 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
sPos.ForwardLayoutLineRef(1); //レイアウト行++
}
}else{
auto caretY = GetCaret().GetCaretLayoutPos().GetY2();
SColorStrategyInfo sInfo(gr);
sInfo.m_pDispPos = &sPos;
sInfo.m_pcView = this;
Expand All @@ -788,6 +789,8 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
//描画X位置リセット
sPos.ResetDrawCol();

auto nLayoutLine = sPos.GetLayoutLineRef();

//1行描画
bool bDispResult = DrawLogicLine(
&sInfo,
Expand All @@ -812,6 +815,14 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
DeleteObject(hdcBgImg);
}
}
// メモリDCを利用しない場合はアンダーライン描画を行描画の直後に行う事でちらつきを抑える
if (!bUseMemoryDC && nLayoutLine == caretY)
{
if (m_pcEditWnd->GetActivePane() == m_nMyIndex) {
/* アクティブペインは、アンダーライン描画 */
GetCaret().m_cUnderLine.CaretUnderLineON(true, false);
}
}
}
}

Expand Down Expand Up @@ -844,16 +855,15 @@ void CEditView::OnPaint2( HDC _hdc, PAINTSTRUCT *pPs, BOOL bDrawFromComptibleBmp
pPs->rcPaint.top,
SRCCOPY
);
// From Here 2007.09.09 Moca 互換BMPによる画面バッファ
// アンダーライン描画をメモリDCからのコピー前処理から後に移動
if ( m_pcEditWnd->GetActivePane() == m_nMyIndex ){
/* アクティブペインは、アンダーライン描画 */
GetCaret().m_cUnderLine.CaretUnderLineON( true, false );
}
// To Here 2007.09.09 Moca
}

// From Here 2007.09.09 Moca 互換BMPによる画面バッファ
// アンダーライン描画をメモリDCからのコピー前処理から後に移動
if ( m_pcEditWnd->GetActivePane() == m_nMyIndex ){
/* アクティブペインは、アンダーライン描画 */
GetCaret().m_cUnderLine.CaretUnderLineON( true, false );
}
// To Here 2007.09.09 Moca

/* 03/02/18 対括弧の強調表示(描画) ai */
DrawBracketPair( true );

Expand Down

0 comments on commit 5a39b81

Please sign in to comment.