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
a90a6086
Commit
a90a6086
authored
Nov 19, 2004
by
Huw Davies
Committed by
Alexandre Julliard
Nov 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fallback to some sensible default values when underlining and striking
out bitmap fonts. Rotate the strikeout line if the escapement is non-zero.
parent
4b5a5868
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
19 deletions
+35
-19
xrender.c
dlls/x11drv/xrender.c
+35
-19
No files found.
dlls/x11drv/xrender.c
View file @
a90a6086
...
...
@@ -1472,42 +1472,58 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
LeaveCriticalSection
(
&
xrender_cs
);
if
(
lf
.
lfUnderline
||
lf
.
lfStrikeOut
)
{
int
line
Pos
;
unsigned
int
line
Width
;
int
underlinePos
,
strikeout
Pos
;
int
underlineWidth
,
strikeout
Width
;
UINT
nMetricsSize
=
GetOutlineTextMetricsW
(
hdc
,
0
,
NULL
);
OUTLINETEXTMETRICW
*
otm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nMetricsSize
);
if
(
!
otm
)
goto
done
;
GetOutlineTextMetricsW
(
hdc
,
nMetricsSize
,
otm
);
OUTLINETEXTMETRICW
*
otm
=
NULL
;
if
(
!
nMetricsSize
)
{
underlinePos
=
0
;
underlineWidth
=
tm
.
tmAscent
/
20
+
1
;
strikeoutPos
=
tm
.
tmAscent
/
2
;
strikeoutWidth
=
underlineWidth
;
}
else
{
otm
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nMetricsSize
);
if
(
!
otm
)
goto
done
;
GetOutlineTextMetricsW
(
hdc
,
nMetricsSize
,
otm
);
underlinePos
=
otm
->
otmsUnderscorePosition
;
underlineWidth
=
otm
->
otmsUnderscoreSize
;
strikeoutPos
=
otm
->
otmsStrikeoutPosition
;
strikeoutWidth
=
otm
->
otmsStrikeoutSize
;
}
wine_tsx11_lock
();
XSetForeground
(
gdi_display
,
physDev
->
gc
,
physDev
->
textPixel
);
if
(
lf
.
lfUnderline
)
{
linePos
=
X11DRV_YWStoDS
(
physDev
,
otm
->
otmsUnderscorePosition
);
lineWidth
=
X11DRV_YWStoDS
(
physDev
,
otm
->
otmsUnderscoreSize
);
underlinePos
=
X11DRV_YWStoDS
(
physDev
,
underlinePos
);
underlineWidth
=
X11DRV_YWStoDS
(
physDev
,
underlineWidth
);
XSetLineAttributes
(
gdi_display
,
physDev
->
gc
,
lineWidth
,
XSetLineAttributes
(
gdi_display
,
physDev
->
gc
,
under
lineWidth
,
LineSolid
,
CapProjecting
,
JoinBevel
);
XDrawLine
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
physDev
->
org
.
x
+
x
-
linePos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
linePos
*
cosEsc
,
physDev
->
org
.
x
+
x
+
width
*
cosEsc
-
linePos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
width
*
sinEsc
-
linePos
*
cosEsc
);
physDev
->
org
.
x
+
x
-
under
linePos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
under
linePos
*
cosEsc
,
physDev
->
org
.
x
+
x
+
width
*
cosEsc
-
under
linePos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
width
*
sinEsc
-
under
linePos
*
cosEsc
);
}
if
(
lf
.
lfStrikeOut
)
{
linePos
=
X11DRV_YWStoDS
(
physDev
,
otm
->
otmsStrikeoutPosition
);
lineWidth
=
X11DRV_YWStoDS
(
physDev
,
otm
->
otmsStrikeoutSize
);
strikeoutPos
=
X11DRV_YWStoDS
(
physDev
,
strikeoutPos
);
strikeoutWidth
=
X11DRV_YWStoDS
(
physDev
,
strikeoutWidth
);
XSetLineAttributes
(
gdi_display
,
physDev
->
gc
,
line
Width
,
XSetLineAttributes
(
gdi_display
,
physDev
->
gc
,
strikeout
Width
,
LineSolid
,
CapProjecting
,
JoinBevel
);
XDrawLine
(
gdi_display
,
physDev
->
drawable
,
physDev
->
gc
,
physDev
->
org
.
x
+
x
,
physDev
->
org
.
y
+
y
-
linePos
,
physDev
->
org
.
x
+
x
+
width
,
physDev
->
org
.
y
+
y
-
linePos
);
physDev
->
org
.
x
+
x
-
strikeoutPos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
strikeoutPos
*
cosEsc
,
physDev
->
org
.
x
+
x
+
width
*
cosEsc
-
strikeoutPos
*
sinEsc
,
physDev
->
org
.
y
+
y
-
width
*
sinEsc
-
strikeoutPos
*
cosEsc
);
}
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
if
(
otm
)
HeapFree
(
GetProcessHeap
(),
0
,
otm
);
}
if
(
deltas
&&
deltas
!=
lpDx
)
...
...
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