Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
8a390c86
Commit
8a390c86
authored
Mar 28, 2015
by
Thomas Faber
Committed by
Alexandre Julliard
Mar 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Avoid uninitialized variable use in EnumEnhMetaFile (MSVC).
parent
966c5dff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
62 deletions
+61
-62
enhmetafile.c
dlls/gdi32/enhmetafile.c
+61
-62
No files found.
dlls/gdi32/enhmetafile.c
View file @
8a390c86
...
...
@@ -2288,6 +2288,7 @@ BOOL WINAPI EnumEnhMetaFile(
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
FALSE
;
}
info
->
state
.
mode
=
MM_TEXT
;
info
->
state
.
wndOrgX
=
0
;
info
->
state
.
wndOrgY
=
0
;
info
->
state
.
wndExtX
=
1
;
...
...
@@ -2338,71 +2339,69 @@ BOOL WINAPI EnumEnhMetaFile(
old_arcdir
=
SetArcDirection
(
hdc
,
AD_COUNTERCLOCKWISE
);
old_polyfill
=
SetPolyFillMode
(
hdc
,
ALTERNATE
);
old_stretchblt
=
SetStretchBltMode
(
hdc
,
BLACKONWHITE
);
}
info
->
state
.
mode
=
MM_TEXT
;
if
(
IS_WIN9X
()
)
{
/* Win95 leaves the vp/win ext/org info alone */
info
->
init_transform
.
eM11
=
1
.
0
;
info
->
init_transform
.
eM12
=
0
.
0
;
info
->
init_transform
.
eM21
=
0
.
0
;
info
->
init_transform
.
eM22
=
1
.
0
;
info
->
init_transform
.
eDx
=
0
.
0
;
info
->
init_transform
.
eDy
=
0
.
0
;
}
else
{
/* WinNT combines the vp/win ext/org info into a transform */
double
xscale
,
yscale
;
xscale
=
(
double
)
vp_size
.
cx
/
(
double
)
win_size
.
cx
;
yscale
=
(
double
)
vp_size
.
cy
/
(
double
)
win_size
.
cy
;
info
->
init_transform
.
eM11
=
xscale
;
info
->
init_transform
.
eM12
=
0
.
0
;
info
->
init_transform
.
eM21
=
0
.
0
;
info
->
init_transform
.
eM22
=
yscale
;
info
->
init_transform
.
eDx
=
(
double
)
vp_org
.
x
-
xscale
*
(
double
)
win_org
.
x
;
info
->
init_transform
.
eDy
=
(
double
)
vp_org
.
y
-
yscale
*
(
double
)
win_org
.
y
;
CombineTransform
(
&
info
->
init_transform
,
&
savedXform
,
&
info
->
init_transform
);
}
if
(
IS_WIN9X
()
)
{
/* Win95 leaves the vp/win ext/org info alone */
info
->
init_transform
.
eM11
=
1
.
0
;
info
->
init_transform
.
eM12
=
0
.
0
;
info
->
init_transform
.
eM21
=
0
.
0
;
info
->
init_transform
.
eM22
=
1
.
0
;
info
->
init_transform
.
eDx
=
0
.
0
;
info
->
init_transform
.
eDy
=
0
.
0
;
}
else
{
/* WinNT combines the vp/win ext/org info into a transform */
double
xscale
,
yscale
;
xscale
=
(
double
)
vp_size
.
cx
/
(
double
)
win_size
.
cx
;
yscale
=
(
double
)
vp_size
.
cy
/
(
double
)
win_size
.
cy
;
info
->
init_transform
.
eM11
=
xscale
;
info
->
init_transform
.
eM12
=
0
.
0
;
info
->
init_transform
.
eM21
=
0
.
0
;
info
->
init_transform
.
eM22
=
yscale
;
info
->
init_transform
.
eDx
=
(
double
)
vp_org
.
x
-
xscale
*
(
double
)
win_org
.
x
;
info
->
init_transform
.
eDy
=
(
double
)
vp_org
.
y
-
yscale
*
(
double
)
win_org
.
y
;
CombineTransform
(
&
info
->
init_transform
,
&
savedXform
,
&
info
->
init_transform
);
}
if
(
lpRect
&&
WIDTH
(
emh
->
rclFrame
)
&&
HEIGHT
(
emh
->
rclFrame
)
)
{
double
xSrcPixSize
,
ySrcPixSize
,
xscale
,
yscale
;
XFORM
xform
;
TRACE
(
"rect: %d,%d - %d,%d. rclFrame: %d,%d - %d,%d
\n
"
,
lpRect
->
left
,
lpRect
->
top
,
lpRect
->
right
,
lpRect
->
bottom
,
emh
->
rclFrame
.
left
,
emh
->
rclFrame
.
top
,
emh
->
rclFrame
.
right
,
emh
->
rclFrame
.
bottom
);
xSrcPixSize
=
(
double
)
emh
->
szlMillimeters
.
cx
/
emh
->
szlDevice
.
cx
;
ySrcPixSize
=
(
double
)
emh
->
szlMillimeters
.
cy
/
emh
->
szlDevice
.
cy
;
xscale
=
(
double
)
WIDTH
(
*
lpRect
)
*
100
.
0
/
WIDTH
(
emh
->
rclFrame
)
*
xSrcPixSize
;
yscale
=
(
double
)
HEIGHT
(
*
lpRect
)
*
100
.
0
/
HEIGHT
(
emh
->
rclFrame
)
*
ySrcPixSize
;
TRACE
(
"xscale = %f, yscale = %f
\n
"
,
xscale
,
yscale
);
xform
.
eM11
=
xscale
;
xform
.
eM12
=
0
;
xform
.
eM21
=
0
;
xform
.
eM22
=
yscale
;
xform
.
eDx
=
(
double
)
lpRect
->
left
-
(
double
)
WIDTH
(
*
lpRect
)
/
WIDTH
(
emh
->
rclFrame
)
*
emh
->
rclFrame
.
left
;
xform
.
eDy
=
(
double
)
lpRect
->
top
-
(
double
)
HEIGHT
(
*
lpRect
)
/
HEIGHT
(
emh
->
rclFrame
)
*
emh
->
rclFrame
.
top
;
CombineTransform
(
&
info
->
init_transform
,
&
xform
,
&
info
->
init_transform
);
}
if
(
lpRect
&&
WIDTH
(
emh
->
rclFrame
)
&&
HEIGHT
(
emh
->
rclFrame
)
)
{
double
xSrcPixSize
,
ySrcPixSize
,
xscale
,
yscale
;
XFORM
xform
;
TRACE
(
"rect: %d,%d - %d,%d. rclFrame: %d,%d - %d,%d
\n
"
,
lpRect
->
left
,
lpRect
->
top
,
lpRect
->
right
,
lpRect
->
bottom
,
emh
->
rclFrame
.
left
,
emh
->
rclFrame
.
top
,
emh
->
rclFrame
.
right
,
emh
->
rclFrame
.
bottom
);
xSrcPixSize
=
(
double
)
emh
->
szlMillimeters
.
cx
/
emh
->
szlDevice
.
cx
;
ySrcPixSize
=
(
double
)
emh
->
szlMillimeters
.
cy
/
emh
->
szlDevice
.
cy
;
xscale
=
(
double
)
WIDTH
(
*
lpRect
)
*
100
.
0
/
WIDTH
(
emh
->
rclFrame
)
*
xSrcPixSize
;
yscale
=
(
double
)
HEIGHT
(
*
lpRect
)
*
100
.
0
/
HEIGHT
(
emh
->
rclFrame
)
*
ySrcPixSize
;
TRACE
(
"xscale = %f, yscale = %f
\n
"
,
xscale
,
yscale
);
xform
.
eM11
=
xscale
;
xform
.
eM12
=
0
;
xform
.
eM21
=
0
;
xform
.
eM22
=
yscale
;
xform
.
eDx
=
(
double
)
lpRect
->
left
-
(
double
)
WIDTH
(
*
lpRect
)
/
WIDTH
(
emh
->
rclFrame
)
*
emh
->
rclFrame
.
left
;
xform
.
eDy
=
(
double
)
lpRect
->
top
-
(
double
)
HEIGHT
(
*
lpRect
)
/
HEIGHT
(
emh
->
rclFrame
)
*
emh
->
rclFrame
.
top
;
CombineTransform
(
&
info
->
init_transform
,
&
xform
,
&
info
->
init_transform
);
}
/* WinNT resets the current vp/win org/ext */
if
(
!
IS_WIN9X
()
&&
hdc
)
{
SetMapMode
(
hdc
,
MM_TEXT
);
SetWindowOrgEx
(
hdc
,
0
,
0
,
NULL
);
SetViewportOrgEx
(
hdc
,
0
,
0
,
NULL
);
EMF_Update_MF_Xform
(
hdc
,
info
);
/* WinNT resets the current vp/win org/ext */
if
(
!
IS_WIN9X
()
)
{
SetMapMode
(
hdc
,
MM_TEXT
);
SetWindowOrgEx
(
hdc
,
0
,
0
,
NULL
);
SetViewportOrgEx
(
hdc
,
0
,
0
,
NULL
);
EMF_Update_MF_Xform
(
hdc
,
info
);
}
}
ret
=
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