Skip to content

Commit

Permalink
fix: 修正setfillstyle 中填充样式为 EMPTY_FILL 时为固实填充的错误 (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
yixy-only authored May 16, 2024
1 parent 79bb371 commit 6076175
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/egegapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1019,10 +1019,10 @@ void setfillstyle(int pattern, color_t color, PIMAGE pimg)
img->m_fillcolor = color;
lbr.lbColor = ARGBTOZBGR(color);
// SetBkColor(img->m_hDC, color);
if (pattern < SOLID_FILL) {
lbr.lbHatch = BS_NULL;
if (pattern == EMPTY_FILL) {
lbr.lbStyle = BS_NULL;
} else if (pattern == SOLID_FILL) {
lbr.lbHatch = BS_SOLID;
lbr.lbStyle = BS_SOLID;
} else if (pattern < USER_FILL) { // dose not finish
int hatchmap[] = {
HS_VERTICAL,
Expand All @@ -1040,7 +1040,7 @@ void setfillstyle(int pattern, color_t color, PIMAGE pimg)
lbr.lbStyle = BS_HATCHED;
lbr.lbHatch = hatchmap[pattern - 2];
} else {
lbr.lbHatch = BS_SOLID;
lbr.lbStyle = BS_SOLID;
}
HBRUSH hbr = CreateBrushIndirect(&lbr);
if (hbr) {
Expand Down

0 comments on commit 6076175

Please sign in to comment.