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
2fed6479
Commit
2fed6479
authored
Jan 25, 2006
by
Michael Kaufmann
Committed by
Alexandre Julliard
Jan 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi: Fix the EMF bounding box calculation.
parent
201cdcc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
init.c
dlls/gdi/enhmfdrv/init.c
+26
-8
No files found.
dlls/gdi/enhmfdrv/init.c
View file @
2fed6479
...
...
@@ -225,16 +225,34 @@ void EMFDRV_UpdateBBox( PHYSDEV dev, RECTL *rect )
RECTL
vportRect
=
*
rect
;
LPtoDP
(
physDev
->
hdc
,
(
LPPOINT
)
&
vportRect
,
2
);
/* The coordinate systems may be mirrored
(LPtoDP handles points, not rectangles) */
if
(
vportRect
.
left
>
vportRect
.
right
)
{
LONG
temp
=
vportRect
.
right
;
vportRect
.
right
=
vportRect
.
left
;
vportRect
.
left
=
temp
;
}
if
(
vportRect
.
top
>
vportRect
.
bottom
)
{
LONG
temp
=
vportRect
.
bottom
;
vportRect
.
bottom
=
vportRect
.
top
;
vportRect
.
top
=
temp
;
}
if
(
bounds
->
left
>
bounds
->
right
)
{
/* first rect */
*
bounds
=
vportRect
;
return
;
if
(
bounds
->
left
>
bounds
->
right
)
{
/* first bounding rectangle */
*
bounds
=
vportRect
;
}
else
{
bounds
->
left
=
min
(
bounds
->
left
,
vportRect
.
left
);
bounds
->
top
=
min
(
bounds
->
top
,
vportRect
.
top
);
bounds
->
right
=
max
(
bounds
->
right
,
vportRect
.
right
);
bounds
->
bottom
=
max
(
bounds
->
bottom
,
vportRect
.
bottom
);
}
bounds
->
left
=
min
(
bounds
->
left
,
vportRect
.
left
);
bounds
->
top
=
min
(
bounds
->
top
,
vportRect
.
top
);
bounds
->
right
=
max
(
bounds
->
right
,
vportRect
.
right
);
bounds
->
bottom
=
max
(
bounds
->
bottom
,
vportRect
.
bottom
);
return
;
}
/**********************************************************************
...
...
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