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
3f35a114
Commit
3f35a114
authored
Aug 27, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Aug 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: get_log_fontW helper requires a valid graphics object.
parent
2e31f7a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
8 deletions
+23
-8
graphicspath.c
dlls/gdiplus/graphicspath.c
+23
-8
No files found.
dlls/gdiplus/graphicspath.c
View file @
3f35a114
...
...
@@ -946,6 +946,7 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT
LOGFONTW
lfw
;
HANDLE
hfont
;
HDC
dc
;
GpGraphics
*
graphics
;
GpPath
*
backup
;
struct
format_string_args
args
;
int
i
;
...
...
@@ -966,26 +967,40 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT
scaled_layout_rect
.
Width
=
layoutRect
->
Width
*
native_height
/
emSize
;
scaled_layout_rect
.
Height
=
layoutRect
->
Height
*
native_height
/
emSize
;
if
((
status
=
GdipClonePath
(
path
,
&
backup
))
!=
Ok
)
return
status
;
dc
=
CreateCompatibleDC
(
0
);
status
=
GdipCreateFromHDC
(
dc
,
&
graphics
);
if
(
status
!=
Ok
)
{
DeleteDC
(
dc
);
GdipDeletePath
(
backup
);
return
status
;
}
status
=
GdipCreateFont
(
family
,
native_height
,
style
,
UnitPixel
,
&
font
);
if
(
status
!=
Ok
)
{
GdipDeleteGraphics
(
graphics
);
DeleteDC
(
dc
);
GdipDeletePath
(
backup
);
return
status
;
}
get_log_fontW
(
font
,
NULL
,
&
lfw
);
get_log_fontW
(
font
,
graphics
,
&
lfw
);
GdipDeleteFont
(
font
);
GdipDeleteGraphics
(
graphics
);
hfont
=
CreateFontIndirectW
(
&
lfw
);
if
(
!
hfont
)
{
WARN
(
"Failed to create font
\n
"
);
DeleteDC
(
dc
);
GdipDeletePath
(
backup
);
return
GenericError
;
}
if
((
status
=
GdipClonePath
(
path
,
&
backup
))
!=
Ok
)
{
DeleteObject
(
hfont
);
return
status
;
}
dc
=
CreateCompatibleDC
(
0
);
SelectObject
(
dc
,
hfont
);
GetTextMetricsW
(
dc
,
&
textmetric
);
...
...
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