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
f2c92c68
Commit
f2c92c68
authored
Feb 23, 2024
by
Esme Povirk
Committed by
Alexandre Julliard
Feb 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Switch to a struct for gdip_format_string callback args.
parent
8a8d1ded
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
20 deletions
+26
-20
gdiplus_private.h
dlls/gdiplus/gdiplus_private.h
+16
-6
graphics.c
dlls/gdiplus/graphics.c
+0
-0
graphicspath.c
dlls/gdiplus/graphicspath.c
+10
-14
No files found.
dlls/gdiplus/gdiplus_private.h
View file @
f2c92c68
...
...
@@ -619,12 +619,22 @@ struct gdip_font_link_info {
struct
list
sections
;
};
typedef
GpStatus
(
*
gdip_format_string_callback
)(
GpGraphics
*
graphics
,
GDIPCONST
WCHAR
*
string
,
INT
index
,
INT
length
,
struct
gdip_font_link_info
*
sections
,
GDIPCONST
RectF
*
rect
,
GDIPCONST
GpStringFormat
*
format
,
INT
lineno
,
const
RectF
*
bounds
,
INT
*
underlined_indexes
,
INT
underlined_index_count
,
void
*
user_data
);
struct
gdip_format_string_info
{
GpGraphics
*
graphics
;
GDIPCONST
WCHAR
*
string
;
INT
index
;
INT
length
;
struct
gdip_font_link_info
font_link_info
;
GDIPCONST
RectF
*
rect
;
GDIPCONST
GpStringFormat
*
format
;
INT
lineno
;
const
RectF
*
bounds
;
INT
*
underlined_indexes
;
INT
underlined_index_count
;
void
*
user_data
;
};
typedef
GpStatus
(
*
gdip_format_string_callback
)(
struct
gdip_format_string_info
*
info
);
GpStatus
gdip_format_string
(
GpGraphics
*
graphics
,
GDIPCONST
WCHAR
*
string
,
INT
length
,
GDIPCONST
GpFont
*
font
,
...
...
dlls/gdiplus/graphics.c
View file @
f2c92c68
This diff is collapsed.
Click to expand it.
dlls/gdiplus/graphicspath.c
View file @
f2c92c68
...
...
@@ -997,33 +997,29 @@ struct format_string_args
float
ascent
;
};
static
GpStatus
format_string_callback
(
GpGraphics
*
graphics
,
GDIPCONST
WCHAR
*
string
,
INT
index
,
INT
length
,
struct
gdip_font_link_info
*
font_link_info
,
GDIPCONST
RectF
*
rect
,
GDIPCONST
GpStringFormat
*
format
,
INT
lineno
,
const
RectF
*
bounds
,
INT
*
underlined_indexes
,
INT
underlined_index_count
,
void
*
priv
)
static
GpStatus
format_string_callback
(
struct
gdip_format_string_info
*
info
)
{
static
const
MAT2
identity
=
{
{
0
,
1
},
{
0
,
0
},
{
0
,
0
},
{
0
,
1
}
};
struct
format_string_args
*
args
=
priv
;
struct
format_string_args
*
args
=
info
->
user_data
;
GpPath
*
path
=
args
->
path
;
GpStatus
status
=
Ok
;
float
x
=
rect
->
X
+
(
bounds
->
X
-
rect
->
X
)
*
args
->
scale
;
float
y
=
rect
->
Y
+
(
bounds
->
Y
-
rect
->
Y
)
*
args
->
scale
;
float
x
=
info
->
rect
->
X
+
(
info
->
bounds
->
X
-
info
->
rect
->
X
)
*
args
->
scale
;
float
y
=
info
->
rect
->
Y
+
(
info
->
bounds
->
Y
-
info
->
rect
->
Y
)
*
args
->
scale
;
int
i
;
if
(
underlined_index_count
)
if
(
info
->
underlined_index_count
)
FIXME
(
"hotkey underlines not drawn yet
\n
"
);
if
(
y
+
bounds
->
Height
*
args
->
scale
>
args
->
maxY
)
args
->
maxY
=
y
+
bounds
->
Height
*
args
->
scale
;
if
(
y
+
info
->
bounds
->
Height
*
args
->
scale
>
args
->
maxY
)
args
->
maxY
=
y
+
info
->
bounds
->
Height
*
args
->
scale
;
for
(
i
=
in
dex
;
i
<
length
+
index
;
++
i
)
for
(
i
=
in
fo
->
index
;
i
<
info
->
length
+
info
->
index
;
++
i
)
{
GLYPHMETRICS
gm
;
TTPOLYGONHEADER
*
ph
=
NULL
,
*
origph
;
char
*
start
;
DWORD
len
,
ofs
=
0
;
len
=
GetGlyphOutlineW
(
graphics
->
hdc
,
string
[
i
],
GGO_BEZIER
,
&
gm
,
0
,
NULL
,
&
identity
);
len
=
GetGlyphOutlineW
(
info
->
graphics
->
hdc
,
info
->
string
[
i
],
GGO_BEZIER
,
&
gm
,
0
,
NULL
,
&
identity
);
if
(
len
==
GDI_ERROR
)
{
status
=
GenericError
;
...
...
@@ -1037,7 +1033,7 @@ static GpStatus format_string_callback(GpGraphics *graphics,
status
=
OutOfMemory
;
break
;
}
GetGlyphOutlineW
(
graphics
->
hdc
,
string
[
i
],
GGO_BEZIER
,
&
gm
,
len
,
start
,
&
identity
);
GetGlyphOutlineW
(
info
->
graphics
->
hdc
,
info
->
string
[
i
],
GGO_BEZIER
,
&
gm
,
len
,
start
,
&
identity
);
ofs
=
0
;
while
(
ofs
<
len
)
...
...
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