Skip to content

Commit

Permalink
DEBUG_SETPIXELの呼出順を変える
Browse files Browse the repository at this point in the history
issue sakura-editor#568 「バージョン情報」のURL部分の1文字目より前の左上にドットがある を参照。

DEBUG_SETPIXELはvista以降で描画のデバッグをする際に発生した不具合の対策関数。
点を打つ命令(実際には2pxの線を引いている)を発行することで描画を即時反映させる目的のもの。
この関数の利用箇所は4箇所あるが、うち2箇所はデッドコード(ANSI版関数)。

aliveな関数呼出しが塗りつぶし処理の後にあるため、
描画結果にゴミが見えてしまっているバグの対策として、
点を打つ処理と塗りつぶし処理の呼出し順を入れ替える対応を行う。
  • Loading branch information
berryzplus committed Oct 21, 2018
1 parent 25ce975 commit 324c671
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sakura_core/apiwrap/StdApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ namespace ApiWrap
const int* lpDx
)
{
BOOL ret=::ExtTextOut(hdc,x,y,fuOptions,lprc,lpwString,cbCount,lpDx);
DEBUG_SETPIXEL(hdc);
BOOL ret=::ExtTextOut(hdc,x,y,fuOptions,lprc,lpwString,cbCount,lpDx);
return ret;
}
#else
Expand All @@ -108,8 +108,8 @@ namespace ApiWrap
int cbString
)
{
BOOL ret=::TextOut(hdc,nXStart,nYStart,lpwString,cbString);
DEBUG_SETPIXEL(hdc);
BOOL ret=::TextOut(hdc,nXStart,nYStart,lpwString,cbString);
return ret;
}
#else
Expand Down

0 comments on commit 324c671

Please sign in to comment.