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
eb3904d0
Commit
eb3904d0
authored
Jun 04, 2009
by
Stephan Rose
Committed by
Alexandre Julliard
Jun 05, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add support for vertical string alignment to GdipDrawString.
parent
f01bfea6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
graphics.c
dlls/gdiplus/graphics.c
+17
-4
No files found.
dlls/gdiplus/graphics.c
View file @
eb3904d0
...
...
@@ -2089,7 +2089,7 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
POINT
corners
[
4
];
WCHAR
*
stringdup
;
REAL
angle
,
ang_cos
,
ang_sin
,
rel_width
,
rel_height
;
INT
sum
=
0
,
height
=
0
,
fit
,
fitcpy
,
save_state
,
i
,
j
,
lret
,
nwidth
,
INT
sum
=
0
,
height
=
0
,
offsety
=
0
,
fit
,
fitcpy
,
save_state
,
i
,
j
,
lret
,
nwidth
,
nheight
;
SIZE
size
;
RECT
drawcoord
;
...
...
@@ -2105,9 +2105,22 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
return
NotImplemented
;
}
if
(
format
)
if
(
format
)
{
TRACE
(
"may be ignoring some format flags: attr %x
\n
"
,
format
->
attr
);
/* Should be no need to explicitly test for StringAlignmentNear as
* that is default behavior if no alignment is passed. */
if
(
format
->
vertalign
!=
StringAlignmentNear
){
RectF
bounds
;
GdipMeasureString
(
graphics
,
string
,
length
,
font
,
rect
,
format
,
&
bounds
,
0
,
0
);
if
(
format
->
vertalign
==
StringAlignmentCenter
)
offsety
=
(
rect
->
Height
-
bounds
.
Height
)
/
2
;
else
if
(
format
->
vertalign
==
StringAlignmentFar
)
offsety
=
(
rect
->
Height
-
bounds
.
Height
);
}
}
if
(
length
==
-
1
)
length
=
lstrlenW
(
string
);
stringdup
=
GdipAlloc
(
length
*
sizeof
(
WCHAR
));
...
...
@@ -2118,9 +2131,9 @@ GpStatus WINGDIPAPI GdipDrawString(GpGraphics *graphics, GDIPCONST WCHAR *string
SetTextColor
(
graphics
->
hdc
,
brush
->
lb
.
lbColor
);
rectcpy
[
3
].
X
=
rectcpy
[
0
].
X
=
rect
->
X
;
rectcpy
[
1
].
Y
=
rectcpy
[
0
].
Y
=
rect
->
Y
;
rectcpy
[
1
].
Y
=
rectcpy
[
0
].
Y
=
rect
->
Y
+
offsety
;
rectcpy
[
2
].
X
=
rectcpy
[
1
].
X
=
rect
->
X
+
rect
->
Width
;
rectcpy
[
3
].
Y
=
rectcpy
[
2
].
Y
=
rect
->
Y
+
rect
->
Height
;
rectcpy
[
3
].
Y
=
rectcpy
[
2
].
Y
=
rect
->
Y
+
offsety
+
rect
->
Height
;
transform_and_round_points
(
graphics
,
corners
,
rectcpy
,
4
);
if
(
roundr
(
rect
->
Width
)
==
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