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
000facfb
Commit
000facfb
authored
Apr 14, 2000
by
Huw D M Davies
Committed by
Alexandre Julliard
Apr 14, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few corrections to bounding boxes.
parent
e5b3a693
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
8 deletions
+38
-8
graphics.c
graphics/enhmetafiledrv/graphics.c
+16
-8
init.c
graphics/enhmetafiledrv/init.c
+22
-0
No files found.
graphics/enhmetafiledrv/graphics.c
View file @
000facfb
...
...
@@ -77,8 +77,10 @@ EMFDRV_ArcChordPie( DC *dc, INT left, INT top, INT right, INT bottom,
if
(
left
>
right
)
{
temp
=
left
;
left
=
right
;
right
=
temp
;}
if
(
top
>
bottom
)
{
temp
=
top
;
top
=
bottom
;
bottom
=
temp
;}
right
--
;
bottom
--
;
if
(
dc
->
w
.
GraphicsMode
==
GM_COMPATIBLE
)
{
right
--
;
bottom
--
;
}
emr
.
emr
.
iType
=
iType
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
...
...
@@ -210,8 +212,10 @@ EMFDRV_Ellipse( DC *dc, INT left, INT top, INT right, INT bottom )
if
(
left
>
right
)
{
temp
=
left
;
left
=
right
;
right
=
temp
;}
if
(
top
>
bottom
)
{
temp
=
top
;
top
=
bottom
;
bottom
=
temp
;}
right
--
;
bottom
--
;
if
(
dc
->
w
.
GraphicsMode
==
GM_COMPATIBLE
)
{
right
--
;
bottom
--
;
}
emr
.
emr
.
iType
=
EMR_ELLIPSE
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
...
...
@@ -240,8 +244,10 @@ EMFDRV_Rectangle(DC *dc, INT left, INT top, INT right, INT bottom)
if
(
left
>
right
)
{
temp
=
left
;
left
=
right
;
right
=
temp
;}
if
(
top
>
bottom
)
{
temp
=
top
;
top
=
bottom
;
bottom
=
temp
;}
right
--
;
bottom
--
;
if
(
dc
->
w
.
GraphicsMode
==
GM_COMPATIBLE
)
{
right
--
;
bottom
--
;
}
emr
.
emr
.
iType
=
EMR_RECTANGLE
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
...
...
@@ -269,8 +275,10 @@ EMFDRV_RoundRect( DC *dc, INT left, INT top, INT right,
if
(
left
>
right
)
{
temp
=
left
;
left
=
right
;
right
=
temp
;}
if
(
top
>
bottom
)
{
temp
=
top
;
top
=
bottom
;
bottom
=
temp
;}
right
--
;
bottom
--
;
if
(
dc
->
w
.
GraphicsMode
==
GM_COMPATIBLE
)
{
right
--
;
bottom
--
;
}
emr
.
emr
.
iType
=
EMR_ROUNDRECT
;
emr
.
emr
.
nSize
=
sizeof
(
emr
);
...
...
graphics/enhmetafiledrv/init.c
View file @
000facfb
...
...
@@ -283,6 +283,16 @@ HDC WINAPI CreateEnhMetaFileW(
physDev
->
emh
->
rclBounds
.
left
=
physDev
->
emh
->
rclBounds
.
top
=
0
;
physDev
->
emh
->
rclBounds
.
right
=
physDev
->
emh
->
rclBounds
.
bottom
=
-
1
;
if
(
rect
)
{
physDev
->
emh
->
rclFrame
.
left
=
rect
->
left
;
physDev
->
emh
->
rclFrame
.
top
=
rect
->
top
;
physDev
->
emh
->
rclFrame
.
right
=
rect
->
right
;
physDev
->
emh
->
rclFrame
.
bottom
=
rect
->
bottom
;
}
else
{
/* Set this to {0,0 - -1,-1} and update it at the end */
physDev
->
emh
->
rclFrame
.
left
=
physDev
->
emh
->
rclFrame
.
top
=
0
;
physDev
->
emh
->
rclFrame
.
right
=
physDev
->
emh
->
rclFrame
.
bottom
=
-
1
;
}
physDev
->
emh
->
dSignature
=
ENHMETA_SIGNATURE
;
physDev
->
emh
->
nVersion
=
0x10000
;
physDev
->
emh
->
nBytes
=
physDev
->
emh
->
nSize
;
...
...
@@ -351,6 +361,18 @@ HENHMETAFILE WINAPI CloseEnhMetaFile( HDC hdc /* metafile DC */ )
emr
.
nSizeLast
=
emr
.
emr
.
nSize
;
EMFDRV_WriteRecord
(
dc
,
&
emr
.
emr
);
/* Update rclFrame if not initialized in CreateEnhMetaFile */
if
(
physDev
->
emh
->
rclFrame
.
left
>
physDev
->
emh
->
rclFrame
.
right
)
{
physDev
->
emh
->
rclFrame
.
left
=
physDev
->
emh
->
rclBounds
.
left
*
physDev
->
emh
->
szlMillimeters
.
cx
*
100
/
physDev
->
emh
->
szlDevice
.
cx
;
physDev
->
emh
->
rclFrame
.
top
=
physDev
->
emh
->
rclBounds
.
top
*
physDev
->
emh
->
szlMillimeters
.
cy
*
100
/
physDev
->
emh
->
szlDevice
.
cy
;
physDev
->
emh
->
rclFrame
.
right
=
physDev
->
emh
->
rclBounds
.
right
*
physDev
->
emh
->
szlMillimeters
.
cx
*
100
/
physDev
->
emh
->
szlDevice
.
cx
;
physDev
->
emh
->
rclFrame
.
bottom
=
physDev
->
emh
->
rclBounds
.
bottom
*
physDev
->
emh
->
szlMillimeters
.
cy
*
100
/
physDev
->
emh
->
szlDevice
.
cy
;
}
if
(
physDev
->
hFile
)
/* disk based metafile */
{
if
(
SetFilePointer
(
physDev
->
hFile
,
0
,
NULL
,
FILE_BEGIN
)
!=
0
)
{
...
...
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