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
b3dd2070
Commit
b3dd2070
authored
Jul 29, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Fix the positioning of some graphics primitives on mirrored contexts.
parent
1b337698
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
28 deletions
+35
-28
graphics.c
dlls/winex11.drv/graphics.c
+35
-28
No files found.
dlls/winex11.drv/graphics.c
View file @
b3dd2070
...
...
@@ -73,6 +73,37 @@ const int X11DRV_XROPfunction[16] =
};
/* get the rectangle in device coordinates, with optional mirroring */
static
RECT
get_device_rect
(
HDC
hdc
,
int
left
,
int
top
,
int
right
,
int
bottom
)
{
RECT
rect
;
rect
.
left
=
left
;
rect
.
top
=
top
;
rect
.
right
=
right
;
rect
.
bottom
=
bottom
;
LPtoDP
(
hdc
,
(
POINT
*
)
&
rect
,
2
);
if
(
GetLayout
(
hdc
)
&
LAYOUT_RTL
)
{
int
tmp
=
rect
.
left
;
rect
.
left
=
rect
.
right
+
1
;
rect
.
right
=
tmp
+
1
;
}
if
(
rect
.
left
>
rect
.
right
)
{
int
tmp
=
rect
.
left
;
rect
.
left
=
rect
.
right
;
rect
.
right
=
tmp
;
}
if
(
rect
.
top
>
rect
.
bottom
)
{
int
tmp
=
rect
.
top
;
rect
.
top
=
rect
.
bottom
;
rect
.
bottom
=
tmp
;
}
return
rect
;
}
/***********************************************************************
* X11DRV_GetRegionData
*
...
...
@@ -483,19 +514,15 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
XPoint
points
[
4
];
BOOL
update
=
FALSE
;
POINT
start
,
end
;
RECT
rc
;
RECT
rc
=
get_device_rect
(
physDev
->
hdc
,
left
,
top
,
right
,
bottom
)
;
SetRect
(
&
rc
,
left
,
top
,
right
,
bottom
);
start
.
x
=
xstart
;
start
.
y
=
ystart
;
end
.
x
=
xend
;
end
.
y
=
yend
;
LPtoDP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
LPtoDP
(
physDev
->
hdc
,
&
start
,
1
);
LPtoDP
(
physDev
->
hdc
,
&
end
,
1
);
if
(
rc
.
right
<
rc
.
left
)
{
INT
tmp
=
rc
.
right
;
rc
.
right
=
rc
.
left
;
rc
.
left
=
tmp
;
}
if
(
rc
.
bottom
<
rc
.
top
)
{
INT
tmp
=
rc
.
bottom
;
rc
.
bottom
=
rc
.
top
;
rc
.
top
=
tmp
;
}
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
)
||
(
lines
&&
((
rc
.
right
-
rc
.
left
==
1
)
||
(
rc
.
bottom
-
rc
.
top
==
1
))))
return
TRUE
;
...
...
@@ -673,16 +700,10 @@ X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT botto
{
INT
width
,
oldwidth
;
BOOL
update
=
FALSE
;
RECT
rc
;
SetRect
(
&
rc
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
RECT
rc
=
get_device_rect
(
physDev
->
hdc
,
left
,
top
,
right
,
bottom
);
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
))
return
TRUE
;
if
(
rc
.
right
<
rc
.
left
)
{
INT
tmp
=
rc
.
right
;
rc
.
right
=
rc
.
left
;
rc
.
left
=
tmp
;
}
if
(
rc
.
bottom
<
rc
.
top
)
{
INT
tmp
=
rc
.
bottom
;
rc
.
bottom
=
rc
.
top
;
rc
.
top
=
tmp
;
}
oldwidth
=
width
=
physDev
->
pen
.
width
;
if
(
!
width
)
width
=
1
;
if
(
physDev
->
pen
.
style
==
PS_NULL
)
width
=
0
;
...
...
@@ -737,18 +758,12 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
{
INT
width
,
oldwidth
,
oldjoinstyle
;
BOOL
update
=
FALSE
;
RECT
rc
;
RECT
rc
=
get_device_rect
(
physDev
->
hdc
,
left
,
top
,
right
,
bottom
)
;
TRACE
(
"(%d %d %d %d)
\n
"
,
left
,
top
,
right
,
bottom
);
SetRect
(
&
rc
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
))
return
TRUE
;
if
(
rc
.
right
<
rc
.
left
)
{
INT
tmp
=
rc
.
right
;
rc
.
right
=
rc
.
left
;
rc
.
left
=
tmp
;
}
if
(
rc
.
bottom
<
rc
.
top
)
{
INT
tmp
=
rc
.
bottom
;
rc
.
bottom
=
rc
.
top
;
rc
.
top
=
tmp
;
}
oldwidth
=
width
=
physDev
->
pen
.
width
;
if
(
!
width
)
width
=
1
;
if
(
physDev
->
pen
.
style
==
PS_NULL
)
width
=
0
;
...
...
@@ -811,15 +826,12 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
{
INT
width
,
oldwidth
,
oldendcap
;
BOOL
update
=
FALSE
;
RECT
rc
;
POINT
pts
[
2
];
RECT
rc
=
get_device_rect
(
physDev
->
hdc
,
left
,
top
,
right
,
bottom
);
TRACE
(
"(%d %d %d %d %d %d
\n
"
,
left
,
top
,
right
,
bottom
,
ell_width
,
ell_height
);
SetRect
(
&
rc
,
left
,
top
,
right
,
bottom
);
LPtoDP
(
physDev
->
hdc
,
(
POINT
*
)
&
rc
,
2
);
if
((
rc
.
left
==
rc
.
right
)
||
(
rc
.
top
==
rc
.
bottom
))
return
TRUE
;
...
...
@@ -832,11 +844,6 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
ell_width
=
max
(
abs
(
pts
[
1
].
x
-
pts
[
0
].
x
),
1
);
ell_height
=
max
(
abs
(
pts
[
1
].
y
-
pts
[
0
].
y
),
1
);
/* Fix the coordinates */
if
(
rc
.
right
<
rc
.
left
)
{
INT
tmp
=
rc
.
right
;
rc
.
right
=
rc
.
left
;
rc
.
left
=
tmp
;
}
if
(
rc
.
bottom
<
rc
.
top
)
{
INT
tmp
=
rc
.
bottom
;
rc
.
bottom
=
rc
.
top
;
rc
.
top
=
tmp
;
}
oldwidth
=
width
=
physDev
->
pen
.
width
;
oldendcap
=
physDev
->
pen
.
endcap
;
if
(
!
width
)
width
=
1
;
...
...
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