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
5118d131
Commit
5118d131
authored
Jul 28, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Access a few more properties directly from the DC in the dib driver.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d8e353f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
graphics.c
dlls/gdi32/dibdrv/graphics.c
+2
-1
objects.c
dlls/gdi32/dibdrv/objects.c
+12
-12
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
5118d131
...
...
@@ -68,12 +68,13 @@ static CRITICAL_SECTION font_cache_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
static
BOOL
brush_rect
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
const
RECT
*
rect
,
HRGN
clip
)
{
DC
*
dc
=
get_physdev_dc
(
&
pdev
->
dev
);
struct
clipped_rects
clipped_rects
;
BOOL
ret
;
if
(
!
get_clipped_rects
(
&
pdev
->
dib
,
rect
,
clip
,
&
clipped_rects
))
return
TRUE
;
ret
=
brush
->
rects
(
pdev
,
brush
,
&
pdev
->
dib
,
clipped_rects
.
count
,
clipped_rects
.
rects
,
GetROP2
(
pdev
->
dev
.
hdc
)
);
dc
->
ROPmode
);
free_clipped_rects
(
&
clipped_rects
);
return
ret
;
}
...
...
dlls/gdi32/dibdrv/objects.c
View file @
5118d131
...
...
@@ -1291,10 +1291,10 @@ static void add_cap( dibdrv_physdev *pdev, HRGN region, HRGN round_cap, const PO
static
HRGN
create_miter_region
(
dibdrv_physdev
*
pdev
,
const
POINT
*
pt
,
const
struct
face
*
face_1
,
const
struct
face
*
face_2
)
{
DC
*
dc
=
get_physdev_dc
(
&
pdev
->
dev
);
int
det
=
face_1
->
dx
*
face_2
->
dy
-
face_1
->
dy
*
face_2
->
dx
;
POINT
pt_1
,
pt_2
,
pts
[
5
];
double
a
,
b
,
x
,
y
;
FLOAT
limit
;
if
(
det
==
0
)
return
0
;
...
...
@@ -1315,9 +1315,8 @@ static HRGN create_miter_region( dibdrv_physdev *pdev, const POINT *pt,
x
=
a
*
face_1
->
dx
-
b
*
face_2
->
dx
;
y
=
a
*
face_1
->
dy
-
b
*
face_2
->
dy
;
GetMiterLimit
(
pdev
->
dev
.
hdc
,
&
limit
);
if
(((
x
-
pt
->
x
)
*
(
x
-
pt
->
x
)
+
(
y
-
pt
->
y
)
*
(
y
-
pt
->
y
))
*
4
>
limit
*
limit
*
pdev
->
pen_width
*
pdev
->
pen_width
)
if
(((
x
-
pt
->
x
)
*
(
x
-
pt
->
x
)
+
(
y
-
pt
->
y
)
*
(
y
-
pt
->
y
))
*
4
>
dc
->
miterLimit
*
dc
->
miterLimit
*
pdev
->
pen_width
*
pdev
->
pen_width
)
return
0
;
pts
[
0
]
=
face_2
->
start
;
...
...
@@ -1746,8 +1745,9 @@ static inline int get_pen_device_width( DC *dc, int width )
COLORREF
dibdrv_SetDCPenColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DC
*
dc
=
get_physdev_dc
(
dev
);
if
(
GetCurrentObject
(
dev
->
hdc
,
OBJ_PEN
)
==
GetStockObject
(
DC_PEN
))
if
(
dc
->
hPen
==
GetStockObject
(
DC_PEN
))
pdev
->
pen_brush
.
colorref
=
color
;
return
color
;
...
...
@@ -1996,7 +1996,7 @@ static BOOL select_pattern_brush( dibdrv_physdev *pdev, dib_brush *brush, BOOL *
static
BOOL
pattern_brush
(
dibdrv_physdev
*
pdev
,
dib_brush
*
brush
,
dib_info
*
dib
,
int
num
,
const
RECT
*
rects
,
INT
rop
)
{
POINT
origin
;
DC
*
dc
=
get_physdev_dc
(
&
pdev
->
dev
)
;
BOOL
needs_reselect
=
FALSE
;
if
(
rop
!=
brush
->
rop
)
...
...
@@ -2032,9 +2032,7 @@ static BOOL pattern_brush(dibdrv_physdev *pdev, dib_brush *brush, dib_info *dib,
}
}
GetBrushOrgEx
(
pdev
->
dev
.
hdc
,
&
origin
);
dib
->
funcs
->
pattern_rects
(
dib
,
num
,
rects
,
&
origin
,
&
brush
->
dib
,
&
brush
->
masks
);
dib
->
funcs
->
pattern_rects
(
dib
,
num
,
rects
,
&
dc
->
brush_org
,
&
brush
->
dib
,
&
brush
->
masks
);
if
(
needs_reselect
)
free_pattern_brush
(
brush
);
return
TRUE
;
...
...
@@ -2098,6 +2096,7 @@ static void select_brush( dibdrv_physdev *pdev, dib_brush *brush,
HBRUSH
dibdrv_SelectBrush
(
PHYSDEV
dev
,
HBRUSH
hbrush
,
const
struct
brush_pattern
*
pattern
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DC
*
dc
=
get_physdev_dc
(
dev
);
LOGBRUSH
logbrush
;
TRACE
(
"(%p, %p)
\n
"
,
dev
,
hbrush
);
...
...
@@ -2105,7 +2104,7 @@ HBRUSH dibdrv_SelectBrush( PHYSDEV dev, HBRUSH hbrush, const struct brush_patter
GetObjectW
(
hbrush
,
sizeof
(
logbrush
),
&
logbrush
);
if
(
hbrush
==
GetStockObject
(
DC_BRUSH
))
logbrush
.
lbColor
=
GetDCBrushColor
(
dev
->
hdc
)
;
logbrush
.
lbColor
=
dc
->
dcBrushColor
;
select_brush
(
pdev
,
&
pdev
->
brush
,
&
logbrush
,
pattern
);
return
hbrush
;
...
...
@@ -2155,7 +2154,7 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
pdev
->
pen_width
=
get_pen_device_width
(
dc
,
logpen
.
lopnWidth
.
x
);
if
(
hpen
==
GetStockObject
(
DC_PEN
))
logbrush
.
lbColor
=
GetDCPenColor
(
dev
->
hdc
)
;
logbrush
.
lbColor
=
dc
->
dcPenColor
;
set_dash_pattern
(
&
pdev
->
pen_pattern
,
0
,
NULL
);
select_brush
(
pdev
,
&
pdev
->
pen_brush
,
&
logbrush
,
pattern
);
...
...
@@ -2220,8 +2219,9 @@ HPEN dibdrv_SelectPen( PHYSDEV dev, HPEN hpen, const struct brush_pattern *patte
COLORREF
dibdrv_SetDCBrushColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DC
*
dc
=
get_physdev_dc
(
dev
);
if
(
GetCurrentObject
(
dev
->
hdc
,
OBJ_BRUSH
)
==
GetStockObject
(
DC_BRUSH
))
if
(
dc
->
hBrush
==
GetStockObject
(
DC_BRUSH
))
{
LOGBRUSH
logbrush
=
{
BS_SOLID
,
color
,
0
};
select_brush
(
pdev
,
&
pdev
->
brush
,
&
logbrush
,
NULL
);
...
...
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