Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3c2502a8
Commit
3c2502a8
authored
May 22, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add support for dithering pattern brushes when painting to monochrome bitmaps.
parent
27ca37db
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
dc.c
dlls/gdi32/dibdrv/dc.c
+1
-1
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+4
-2
primitives.c
dlls/gdi32/dibdrv/primitives.c
+0
-0
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
3c2502a8
...
...
@@ -230,7 +230,7 @@ DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bit
__TRY
{
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
&
src
->
visrect
);
dst_dib
.
funcs
->
convert_to
(
&
dst_dib
,
&
src_dib
,
&
src
->
visrect
,
FALSE
);
ret
=
TRUE
;
}
__EXCEPT_PAGE_FAULT
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
3c2502a8
...
...
@@ -191,7 +191,7 @@ typedef struct primitive_funcs
DWORD
(
*
get_pixel
)(
const
dib_info
*
dib
,
int
x
,
int
y
);
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
);
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
,
const
rop_mask
*
fg
,
const
rop_mask
*
bg
,
rop_mask_bits
*
bits
);
void
(
*
stretch_row
)(
const
dib_info
*
dst_dib
,
const
POINT
*
dst_start
,
...
...
dlls/gdi32/dibdrv/objects.c
View file @
3c2502a8
...
...
@@ -1874,6 +1874,7 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
BITMAPINFO
*
info
=
(
BITMAPINFO
*
)
buffer
;
RGBQUAD
color_table
[
2
];
dib_info
pattern
;
BOOL
dither
=
(
brush
->
dib
.
bit_count
==
1
);
if
(
!
brush
->
pattern
.
info
)
{
...
...
@@ -1921,6 +1922,7 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
pattern
.
color_table
=
color_table
;
pattern
.
color_table_size
=
2
;
*
needs_reselect
=
TRUE
;
dither
=
FALSE
;
/* DDB pattern brushes don't get dithered */
}
copy_dib_color_info
(
&
brush
->
dib
,
&
pdev
->
dib
);
...
...
@@ -1930,7 +1932,7 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
brush
->
dib
.
stride
=
get_dib_stride
(
brush
->
dib
.
width
,
brush
->
dib
.
bit_count
);
brush
->
dib
.
rect
=
pattern
.
rect
;
if
(
matching_pattern_format
(
&
brush
->
dib
,
&
pattern
))
if
(
!
dither
&&
matching_pattern_format
(
&
brush
->
dib
,
&
pattern
))
{
brush
->
dib
.
bits
.
ptr
=
pattern
.
bits
.
ptr
;
brush
->
dib
.
bits
.
is_copy
=
FALSE
;
...
...
@@ -1941,7 +1943,7 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
brush
->
dib
.
bits
.
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
brush
->
dib
.
height
*
brush
->
dib
.
stride
);
brush
->
dib
.
bits
.
is_copy
=
TRUE
;
brush
->
dib
.
bits
.
free
=
free_heap_bits
;
brush
->
dib
.
funcs
->
convert_to
(
&
brush
->
dib
,
&
pattern
,
&
pattern
.
rect
);
brush
->
dib
.
funcs
->
convert_to
(
&
brush
->
dib
,
&
pattern
,
&
pattern
.
rect
,
dither
);
}
return
TRUE
;
}
...
...
dlls/gdi32/dibdrv/primitives.c
View file @
3c2502a8
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