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
76b0626f
Commit
76b0626f
authored
Aug 02, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Aug 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a function to retrieve the rop codes.
parent
4b50743f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+6
-0
objects.c
dlls/gdi32/dibdrv/objects.c
+14
-3
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
76b0626f
...
...
@@ -56,6 +56,12 @@ extern const primitive_funcs funcs_4 DECLSPEC_HIDDEN;
extern
const
primitive_funcs
funcs_1
DECLSPEC_HIDDEN
;
extern
const
primitive_funcs
funcs_null
DECLSPEC_HIDDEN
;
struct
rop_codes
{
DWORD
a1
,
a2
,
x1
,
x2
;
};
extern
void
get_rop_codes
(
INT
rop
,
struct
rop_codes
*
codes
);
extern
void
calc_and_xor_masks
(
INT
rop
,
DWORD
color
,
DWORD
*
and
,
DWORD
*
xor
)
DECLSPEC_HIDDEN
;
extern
void
update_brush_rop
(
dibdrv_physdev
*
pdev
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
void
reset_dash_origin
(
dibdrv_physdev
*
pdev
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/objects.c
View file @
76b0626f
...
...
@@ -85,11 +85,22 @@ static const DWORD rop2_xor_array[16][2] =
#undef ONE
#undef ZERO
void
calc_and_xor_masks
(
INT
rop
,
DWORD
color
,
DWORD
*
and
,
DWORD
*
xor
)
void
get_rop_codes
(
INT
rop
,
struct
rop_codes
*
codes
)
{
/* NB The ROP2 codes start at one and the arrays are zero-based */
*
and
=
(
color
&
rop2_and_array
[
rop
-
1
][
0
])
^
rop2_and_array
[
rop
-
1
][
1
];
*
xor
=
(
color
&
rop2_xor_array
[
rop
-
1
][
0
])
^
rop2_xor_array
[
rop
-
1
][
1
];
codes
->
a1
=
rop2_and_array
[
rop
-
1
][
0
];
codes
->
a2
=
rop2_and_array
[
rop
-
1
][
1
];
codes
->
x1
=
rop2_xor_array
[
rop
-
1
][
0
];
codes
->
x2
=
rop2_xor_array
[
rop
-
1
][
1
];
}
void
calc_and_xor_masks
(
INT
rop
,
DWORD
color
,
DWORD
*
and
,
DWORD
*
xor
)
{
struct
rop_codes
codes
;
get_rop_codes
(
rop
,
&
codes
);
*
and
=
(
color
&
codes
.
a1
)
^
codes
.
a2
;
*
xor
=
(
color
&
codes
.
x1
)
^
codes
.
x2
;
}
static
inline
RGBQUAD
rgbquad_from_colorref
(
COLORREF
c
)
...
...
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