Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
38e06bfb
Commit
38e06bfb
authored
Dec 07, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Dec 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Fix color handling in PSDRV_WriteDIBPatternDict.
parent
8be8d188
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
ps.c
dlls/wineps.drv/ps.c
+28
-2
No files found.
dlls/wineps.drv/ps.c
View file @
38e06bfb
...
...
@@ -1002,8 +1002,34 @@ BOOL PSDRV_WriteDIBPatternDict(print_ctx *ctx, const BITMAPINFO *bmi, BYTE *bits
PSDRV_WriteSpool
(
ctx
,
"def
\n
"
,
4
);
PSDRV_WriteIndexColorSpaceBegin
(
ctx
,
1
);
map
[
0
]
=
GetTextColor
(
ctx
->
hdc
);
map
[
1
]
=
GetBkColor
(
ctx
->
hdc
);
if
(
usage
==
DIB_RGB_COLORS
)
{
map
[
0
]
=
RGB
(
bmi
->
bmiColors
[
0
].
rgbRed
,
bmi
->
bmiColors
[
0
].
rgbGreen
,
bmi
->
bmiColors
[
0
].
rgbBlue
);
map
[
1
]
=
RGB
(
bmi
->
bmiColors
[
1
].
rgbRed
,
bmi
->
bmiColors
[
1
].
rgbGreen
,
bmi
->
bmiColors
[
1
].
rgbBlue
);
}
else
if
(
usage
==
DIB_PAL_COLORS
)
{
HPALETTE
hpal
=
GetCurrentObject
(
ctx
->
hdc
,
OBJ_PAL
);
PALETTEENTRY
pal
[
2
];
memset
(
pal
,
0
,
sizeof
(
pal
));
if
(
hpal
)
GetPaletteEntries
(
hpal
,
0
,
2
,
pal
);
map
[
0
]
=
RGB
(
pal
[
0
].
peRed
,
pal
[
0
].
peGreen
,
pal
[
0
].
peBlue
);
map
[
1
]
=
RGB
(
pal
[
1
].
peRed
,
pal
[
1
].
peGreen
,
pal
[
1
].
peBlue
);
}
else
if
(
usage
==
2
/* DIB_PAL_INDICES */
)
{
map
[
0
]
=
GetTextColor
(
ctx
->
hdc
);
map
[
1
]
=
GetBkColor
(
ctx
->
hdc
);
}
else
{
FIXME
(
"wrong usage: %d
\n
"
,
usage
);
return
FALSE
;
}
PSDRV_WriteRGB
(
ctx
,
map
,
2
);
PSDRV_WriteIndexColorSpaceEnd
(
ctx
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment