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
e0d9d175
Commit
e0d9d175
authored
Jul 24, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Aug 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Do not draw line-breaking spaces.
parent
b330ebfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
graphics.c
dlls/gdiplus/graphics.c
+18
-6
No files found.
dlls/gdiplus/graphics.c
View file @
e0d9d175
...
...
@@ -2233,7 +2233,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
WCHAR
*
stringdup
;
REAL
angle
,
ang_cos
,
ang_sin
,
rel_width
,
rel_height
;
INT
sum
=
0
,
height
=
0
,
offsety
=
0
,
fit
,
fitcpy
,
save_state
,
i
,
j
,
lret
,
nwidth
,
nheight
;
nheight
,
lineend
;
SIZE
size
;
POINT
drawbase
;
UINT
drawflags
;
...
...
@@ -2384,7 +2384,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
/* Line break code (may look strange, but it imitates windows). */
if
(
lret
<
fit
)
fit
=
lret
;
/* this is not an off-by-one error */
lineend
=
fit
=
lret
;
/* this is not an off-by-one error */
else
if
(
fit
<
(
length
-
sum
)){
if
(
*
(
stringdup
+
sum
+
fit
)
==
' '
)
while
(
*
(
stringdup
+
sum
+
fit
)
==
' '
)
...
...
@@ -2401,8 +2401,14 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
break
;
}
}
lineend
=
fit
;
while
(
*
(
stringdup
+
sum
+
lineend
-
1
)
==
' '
||
*
(
stringdup
+
sum
+
lineend
-
1
)
==
'\t'
)
lineend
--
;
}
DrawTextW
(
graphics
->
hdc
,
stringdup
+
sum
,
min
(
length
-
sum
,
fit
),
else
lineend
=
fit
;
DrawTextW
(
graphics
->
hdc
,
stringdup
+
sum
,
min
(
length
-
sum
,
lineend
),
&
drawcoord
,
drawflags
);
sum
+=
fit
+
(
lret
<
fitcpy
?
1
:
0
);
...
...
@@ -3207,7 +3213,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
HFONT
oldfont
;
WCHAR
*
stringdup
;
INT
sum
=
0
,
height
=
0
,
fit
,
fitcpy
,
max_width
=
0
,
i
,
j
,
lret
,
nwidth
,
nheight
;
nheight
,
lineend
;
SIZE
size
;
TRACE
(
"(%p, %s, %i, %p, %s, %p, %p, %p, %p)
\n
"
,
graphics
,
...
...
@@ -3260,7 +3266,7 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
/* Line break code (may look strange, but it imitates windows). */
if
(
lret
<
fit
)
fit
=
lret
;
/* this is not an off-by-one error */
lineend
=
fit
=
lret
;
/* this is not an off-by-one error */
else
if
(
fit
<
(
length
-
sum
)){
if
(
*
(
stringdup
+
sum
+
fit
)
==
' '
)
while
(
*
(
stringdup
+
sum
+
fit
)
==
' '
)
...
...
@@ -3277,9 +3283,15 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
break
;
}
}
lineend
=
fit
;
while
(
*
(
stringdup
+
sum
+
lineend
-
1
)
==
' '
||
*
(
stringdup
+
sum
+
lineend
-
1
)
==
'\t'
)
lineend
--
;
}
else
lineend
=
fit
;
GetTextExtentExPointW
(
graphics
->
hdc
,
stringdup
+
sum
,
fit
,
GetTextExtentExPointW
(
graphics
->
hdc
,
stringdup
+
sum
,
lineend
,
nwidth
,
&
j
,
NULL
,
&
size
);
sum
+=
fit
+
(
lret
<
fitcpy
?
1
:
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