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
b8e4cd81
Commit
b8e4cd81
authored
May 23, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Simplify creation of hatch masks and avoid endianness issues.
parent
574a07e4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
19 deletions
+5
-19
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+4
-18
primitives.c
dlls/gdi32/dibdrv/primitives.c
+0
-0
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
b8e4cd81
...
...
@@ -191,7 +191,7 @@ typedef struct primitive_funcs
DWORD
(
*
colorref_to_pixel
)(
const
dib_info
*
dib
,
COLORREF
color
);
COLORREF
(
*
pixel_to_colorref
)(
const
dib_info
*
dib
,
DWORD
pixel
);
void
(
*
convert_to
)(
dib_info
*
dst
,
const
dib_info
*
src
,
const
RECT
*
src_rect
,
BOOL
dither
);
BOOL
(
*
create_rop_masks
)(
const
dib_info
*
dib
,
const
dib_info
*
hatch
,
void
(
*
create_rop_masks
)(
const
dib_info
*
dib
,
const
BYTE
*
hatch_ptr
,
const
rop_mask
*
fg
,
const
rop_mask
*
bg
,
rop_mask_bits
*
bits
);
void
(
*
stretch_row
)(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
const
dib_info
*
src_dib
,
const
POINT
*
src_start
,
...
...
dlls/gdi32/dibdrv/objects.c
View file @
b8e4cd81
...
...
@@ -1777,7 +1777,7 @@ static BOOL create_pattern_brush_bits( dib_brush *brush )
return
TRUE
;
}
static
const
DWORD
hatches
[
6
][
8
]
=
static
const
BYTE
hatches
[
6
][
8
]
=
{
{
0x00
,
0x00
,
0x00
,
0xff
,
0x00
,
0x00
,
0x00
,
0x00
},
/* HS_HORIZONTAL */
{
0x08
,
0x08
,
0x08
,
0x08
,
0x08
,
0x08
,
0x08
,
0x08
},
/* HS_VERTICAL */
...
...
@@ -1789,9 +1789,7 @@ static const DWORD hatches[6][8] =
static
BOOL
create_hatch_brush_bits
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
BOOL
*
needs_reselect
)
{
dib_info
hatch
;
rop_mask
fg_mask
,
bg_mask
;
BOOL
ret
;
/* Just initialise brush dib with the color / sizing info. We don't
need the bits as we'll calculate the rop masks straight from
...
...
@@ -1808,17 +1806,6 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev, dib_brush *brush, BOOL
if
(
!
alloc_brush_mask_bits
(
brush
))
return
FALSE
;
hatch
.
bit_count
=
1
;
hatch
.
height
=
hatch
.
width
=
8
;
hatch
.
stride
=
4
;
hatch
.
bits
.
ptr
=
(
void
*
)
hatches
[
brush
->
hatch
];
hatch
.
bits
.
free
=
hatch
.
bits
.
param
=
NULL
;
hatch
.
bits
.
is_copy
=
FALSE
;
hatch
.
rect
.
left
=
0
;
hatch
.
rect
.
top
=
0
;
hatch
.
rect
.
right
=
8
;
hatch
.
rect
.
bottom
=
8
;
get_color_masks
(
pdev
,
brush
->
rop
,
brush
->
colorref
,
GetBkMode
(
pdev
->
dev
.
hdc
),
&
fg_mask
,
&
bg_mask
);
...
...
@@ -1827,10 +1814,9 @@ static BOOL create_hatch_brush_bits(dibdrv_physdev *pdev, dib_brush *brush, BOOL
if
(
GetBkMode
(
pdev
->
dev
.
hdc
)
!=
TRANSPARENT
&&
(
GetBkColor
(
pdev
->
dev
.
hdc
)
&
(
1
<<
24
)))
*
needs_reselect
=
TRUE
;
ret
=
brush
->
dib
.
funcs
->
create_rop_masks
(
&
brush
->
dib
,
&
hatch
,
&
fg_mask
,
&
bg_mask
,
&
brush
->
masks
);
if
(
!
ret
)
free_brush_mask_bits
(
brush
);
return
ret
;
brush
->
dib
.
funcs
->
create_rop_masks
(
&
brush
->
dib
,
hatches
[
brush
->
hatch
],
&
fg_mask
,
&
bg_mask
,
&
brush
->
masks
);
return
TRUE
;
}
static
BOOL
matching_pattern_format
(
dib_info
*
dib
,
dib_info
*
pattern
)
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
b8e4cd81
This diff is collapsed.
Click to expand it.
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