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
7f45ed2c
Commit
7f45ed2c
authored
May 19, 2003
by
Huw Davies
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of text align modes for rotated text.
parent
686a9f90
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
text.c
dlls/wineps/text.c
+22
-6
No files found.
dlls/wineps/text.c
View file @
7f45ed2c
...
...
@@ -100,10 +100,20 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
UINT
align
=
GetTextAlign
(
physDev
->
hdc
);
INT
char_extra
;
INT
*
deltas
=
NULL
;
double
cosEsc
,
sinEsc
;
LOGFONTW
lf
;
if
(
!
count
)
return
TRUE
;
GetObjectW
(
GetCurrentObject
(
physDev
->
hdc
,
OBJ_FONT
),
sizeof
(
lf
),
&
lf
);
if
(
lf
.
lfEscapement
!=
0
)
{
cosEsc
=
cos
(
lf
.
lfEscapement
*
M_PI
/
1800
);
sinEsc
=
sin
(
lf
.
lfEscapement
*
M_PI
/
1800
);
}
else
{
cosEsc
=
1
;
sinEsc
=
0
;
}
if
(
physDev
->
font
.
fontloc
==
Download
)
{
if
(
flags
&
ETO_GLYPH_INDEX
)
...
...
@@ -176,19 +186,22 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
if
(
align
&
TA_UPDATECP
)
{
POINT
pt
;
pt
.
x
=
x
+
sz
.
cx
;
pt
.
y
=
y
;
pt
.
x
=
x
+
sz
.
cx
*
cosEsc
;
pt
.
y
=
y
-
sz
.
cx
*
sinEsc
;
DPtoLP
(
physDev
->
hdc
,
&
pt
,
1
);
dc
->
CursPosX
=
pt
.
x
;
dc
->
CursPosY
=
pt
.
y
;
}
break
;
case
TA_CENTER
:
x
-=
sz
.
cx
/
2
;
x
-=
sz
.
cx
*
cosEsc
/
2
;
y
+=
sz
.
cx
*
sinEsc
/
2
;
break
;
case
TA_RIGHT
:
x
-=
sz
.
cx
;
x
-=
sz
.
cx
*
cosEsc
;
y
+=
sz
.
cx
*
sinEsc
;
if
(
align
&
TA_UPDATECP
)
{
POINT
pt
;
...
...
@@ -196,20 +209,23 @@ static BOOL PSDRV_Text(PSDRV_PDEVICE *physDev, INT x, INT y, UINT flags, LPCWSTR
pt
.
y
=
y
;
DPtoLP
(
physDev
->
hdc
,
&
pt
,
1
);
dc
->
CursPosX
=
pt
.
x
;
dc
->
CursPosY
=
pt
.
y
;
}
break
;
}
switch
(
align
&
(
TA_TOP
|
TA_BASELINE
|
TA_BOTTOM
)
)
{
case
TA_TOP
:
y
+=
ascent
;
y
+=
ascent
*
cosEsc
;
x
+=
ascent
*
sinEsc
;
break
;
case
TA_BASELINE
:
break
;
case
TA_BOTTOM
:
y
-=
descent
;
y
-=
descent
*
cosEsc
;
x
-=
descent
*
sinEsc
;
break
;
}
...
...
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