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
5990091b
Commit
5990091b
authored
Nov 14, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Nov 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Expose a solid_rects function.
parent
15fabcde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
32 deletions
+26
-32
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-0
objects.c
dlls/gdi32/dibdrv/objects.c
+25
-32
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
5990091b
...
...
@@ -211,6 +211,7 @@ extern void copy_dib_color_info(dib_info *dst, const dib_info *src) DECLSPEC_HID
extern
BOOL
convert_dib
(
dib_info
*
dst
,
const
dib_info
*
src
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_pixel_color
(
dibdrv_physdev
*
pdev
,
COLORREF
color
,
BOOL
mono_fixup
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_rects
(
dibdrv_physdev
*
pdev
,
int
num
,
const
RECT
*
rects
)
DECLSPEC_HIDDEN
;
extern
void
solid_rects
(
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
const
rop_mask
*
color
,
HRGN
region
)
DECLSPEC_HIDDEN
;
extern
HRGN
add_extra_clipping_region
(
dibdrv_physdev
*
pdev
,
HRGN
rgn
)
DECLSPEC_HIDDEN
;
extern
void
restore_clipping_region
(
dibdrv_physdev
*
pdev
,
HRGN
rgn
)
DECLSPEC_HIDDEN
;
extern
int
clip_line
(
const
POINT
*
start
,
const
POINT
*
end
,
const
RECT
*
clip
,
...
...
dlls/gdi32/dibdrv/objects.c
View file @
5990091b
...
...
@@ -1094,52 +1094,45 @@ COLORREF dibdrv_SetDCPenColor( PHYSDEV dev, COLORREF color )
return
next
->
funcs
->
pSetDCPenColor
(
next
,
color
);
}
/**********************************************************************
* solid_brush
*
* Fill a number of rectangles with the solid brush
* FIXME: Should we insist l < r && t < b? Currently we assume this.
*/
static
BOOL
solid_brush
(
dibdrv_physdev
*
pdev
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
HRGN
region
)
void
solid_rects
(
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
const
rop_mask
*
color
,
HRGN
region
)
{
int
i
,
j
;
const
WINEREGION
*
clip
=
get_wine_region
(
region
)
;
const
WINEREGION
*
clip
;
if
(
!
clip
)
if
(
!
region
)
{
dib
->
funcs
->
solid_rects
(
dib
,
num
,
rects
,
pdev
->
brush_and
,
pdev
->
brush_
xor
);
return
TRUE
;
dib
->
funcs
->
solid_rects
(
dib
,
num
,
rects
,
color
->
and
,
color
->
xor
);
return
;
}
clip
=
get_wine_region
(
region
);
for
(
i
=
0
;
i
<
num
;
i
++
)
{
for
(
j
=
0
;
j
<
clip
->
numRects
;
j
++
)
{
RECT
rect
=
rects
[
i
]
;
RECT
clipped_rect
;
/* Optimize unclipped case */
if
(
clip
->
rects
[
j
].
top
<=
rect
.
top
&&
clip
->
rects
[
j
].
bottom
>=
rect
.
bottom
&&
clip
->
rects
[
j
].
left
<=
rect
.
left
&&
clip
->
rects
[
j
].
right
>=
rect
.
right
)
{
dib
->
funcs
->
solid_rects
(
dib
,
1
,
&
rect
,
pdev
->
brush_and
,
pdev
->
brush_xor
);
break
;
}
if
(
clip
->
rects
[
j
].
top
>=
rect
.
bottom
)
break
;
if
(
clip
->
rects
[
j
].
bottom
<=
rect
.
top
)
continue
;
if
(
clip
->
rects
[
j
].
right
>
rect
.
left
&&
clip
->
rects
[
j
].
left
<
rect
.
right
)
{
rect
.
left
=
max
(
rect
.
left
,
clip
->
rects
[
j
].
left
);
rect
.
top
=
max
(
rect
.
top
,
clip
->
rects
[
j
].
top
);
rect
.
right
=
min
(
rect
.
right
,
clip
->
rects
[
j
].
right
);
rect
.
bottom
=
min
(
rect
.
bottom
,
clip
->
rects
[
j
].
bottom
);
dib
->
funcs
->
solid_rects
(
dib
,
1
,
&
rect
,
pdev
->
brush_and
,
pdev
->
brush_xor
);
}
if
(
intersect_rect
(
&
clipped_rect
,
rects
+
i
,
clip
->
rects
+
j
))
dib
->
funcs
->
solid_rects
(
dib
,
1
,
&
clipped_rect
,
color
->
and
,
color
->
xor
);
}
}
release_wine_region
(
region
);
}
/**********************************************************************
* solid_brush
*
* Fill a number of rectangles with the solid brush
*/
static
BOOL
solid_brush
(
dibdrv_physdev
*
pdev
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
HRGN
region
)
{
rop_mask
brush_color
;
brush_color
.
and
=
pdev
->
brush_and
;
brush_color
.
xor
=
pdev
->
brush_xor
;
solid_rects
(
dib
,
num
,
rects
,
&
brush_color
,
region
);
return
TRUE
;
}
...
...
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