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
9b8d920c
Commit
9b8d920c
authored
Dec 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Pass the clip region to the brush_rect helper and add a similar helper for pens.
parent
18c20964
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
20 deletions
+23
-20
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+2
-1
graphics.c
dlls/gdi32/dibdrv/graphics.c
+3
-5
objects.c
dlls/gdi32/dibdrv/objects.c
+18
-14
No files found.
dlls/gdi32/dibdrv/dibdrv.h
View file @
9b8d920c
...
...
@@ -229,7 +229,8 @@ 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
COLORREF
make_rgb_colorref
(
HDC
hdc
,
dib_info
*
dib
,
COLORREF
color
,
BOOL
*
got_pixel
,
DWORD
*
pixel
)
DECLSPEC_HIDDEN
;
extern
DWORD
get_pixel_color
(
dibdrv_physdev
*
pdev
,
COLORREF
color
,
BOOL
mono_fixup
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
BOOL
pen_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
DECLSPEC_HIDDEN
;
extern
int
get_clipped_rects
(
const
dib_info
*
dib
,
const
RECT
*
rc
,
HRGN
clip
,
struct
clipped_rects
*
clip_rects
)
DECLSPEC_HIDDEN
;
extern
int
clip_line
(
const
POINT
*
start
,
const
POINT
*
end
,
const
RECT
*
clip
,
const
bres_params
*
params
,
POINT
*
pt1
,
POINT
*
pt2
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
9b8d920c
...
...
@@ -479,7 +479,7 @@ BOOL dibdrv_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
TRACE
(
"(%p, %d, %d, %d, %d, %06x)
\n
"
,
dev
,
dst
->
x
,
dst
->
y
,
dst
->
width
,
dst
->
height
,
rop
);
return
brush_rect
(
pdev
,
&
dst
->
visrect
,
get_rop2_from_rop
(
rop
)
);
return
brush_rect
(
pdev
,
&
dst
->
visrect
,
pdev
->
clip
,
get_rop2_from_rop
(
rop
)
);
}
/***********************************************************************
...
...
@@ -501,7 +501,7 @@ BOOL dibdrv_PaintRgn( PHYSDEV dev, HRGN rgn )
{
rect
=
get_device_rect
(
dev
->
hdc
,
region
->
rects
[
i
].
left
,
region
->
rects
[
i
].
top
,
region
->
rects
[
i
].
right
,
region
->
rects
[
i
].
bottom
,
FALSE
);
brush_rect
(
pdev
,
&
rect
,
GetROP2
(
dev
->
hdc
)
);
brush_rect
(
pdev
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
}
release_wine_region
(
rgn
);
...
...
@@ -603,9 +603,7 @@ BOOL dibdrv_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
rect
.
right
-=
(
pdev
->
pen_width
+
2
)
/
2
;
rect
.
bottom
-=
(
pdev
->
pen_width
+
2
)
/
2
;
brush_rect
(
pdev
,
&
rect
,
GetROP2
(
dev
->
hdc
)
);
return
TRUE
;
return
brush_rect
(
pdev
,
&
rect
,
pdev
->
clip
,
GetROP2
(
dev
->
hdc
)
);
}
/***********************************************************************
...
...
dlls/gdi32/dibdrv/objects.c
View file @
9b8d920c
...
...
@@ -1227,22 +1227,11 @@ static HRGN get_wide_lines_region( dibdrv_physdev *pdev, int num, POINT *pts, BO
static
BOOL
wide_pen_lines
(
dibdrv_physdev
*
pdev
,
int
num
,
POINT
*
pts
,
BOOL
close
)
{
struct
clipped_rects
clipped_rects
;
rop_mask
color
;
HRGN
region
;
DWORD
pen_color
=
get_pixel_color
(
pdev
,
pdev
->
pen_colorref
,
TRUE
);
calc_rop_masks
(
GetROP2
(
pdev
->
dev
.
hdc
),
pen_color
,
&
color
);
region
=
get_wide_lines_region
(
pdev
,
num
,
pts
,
close
);
if
(
pdev
->
clip
)
CombineRgn
(
region
,
region
,
pdev
->
clip
,
RGN_AND
);
if
(
get_clipped_rects
(
&
pdev
->
dib
,
NULL
,
region
,
&
clipped_rects
))
{
pdev
->
dib
.
funcs
->
solid_rects
(
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
color
.
and
,
color
.
xor
);
free_clipped_rects
(
&
clipped_rects
);
}
pen_rect
(
pdev
,
NULL
,
region
,
GetROP2
(
pdev
->
dev
.
hdc
)
);
DeleteObject
(
region
);
return
TRUE
;
}
...
...
@@ -1715,13 +1704,28 @@ COLORREF dibdrv_SetDCBrushColor( PHYSDEV dev, COLORREF color )
return
next
->
funcs
->
pSetDCBrushColor
(
next
,
color
);
}
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
INT
rop
)
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
{
struct
clipped_rects
clipped_rects
;
BOOL
ret
;
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
rect
,
pdev
->
clip
,
&
clipped_rects
))
return
TRUE
;
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
rect
,
clip
,
&
clipped_rects
))
return
TRUE
;
ret
=
pdev
->
brush_rects
(
pdev
,
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
rop
);
free_clipped_rects
(
&
clipped_rects
);
return
ret
;
}
BOOL
pen_rect
(
dibdrv_physdev
*
pdev
,
const
RECT
*
rect
,
HRGN
clip
,
INT
rop
)
{
struct
clipped_rects
clipped_rects
;
rop_mask
color
;
DWORD
pen_color
=
get_pixel_color
(
pdev
,
pdev
->
pen_colorref
,
TRUE
);
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
rect
,
clip
,
&
clipped_rects
))
return
TRUE
;
calc_rop_masks
(
rop
,
pen_color
,
&
color
);
pdev
->
dib
.
funcs
->
solid_rects
(
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
color
.
and
,
color
.
xor
);
free_clipped_rects
(
&
clipped_rects
);
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