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
c441d574
Commit
c441d574
authored
Oct 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement the ExtTextOut entry point in the path driver.
parent
613972ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
55 deletions
+29
-55
font.c
dlls/gdi32/font.c
+12
-28
gdi_private.h
dlls/gdi32/gdi_private.h
+0
-9
path.c
dlls/gdi32/path.c
+17
-18
No files found.
dlls/gdi32/font.c
View file @
c441d574
...
...
@@ -1822,7 +1822,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
rc
.
top
>
rc
.
bottom
)
{
INT
tmp
=
rc
.
top
;
rc
.
top
=
rc
.
bottom
;
rc
.
bottom
=
tmp
;}
}
if
(
(
flags
&
ETO_OPAQUE
)
&&
!
PATH_IsPathOpen
(
dc
->
path
)
)
if
(
flags
&
ETO_OPAQUE
)
physdev
->
funcs
->
pExtTextOut
(
physdev
,
0
,
0
,
ETO_OPAQUE
,
&
rc
,
NULL
,
0
,
NULL
);
if
(
count
==
0
)
...
...
@@ -1963,7 +1963,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
break
;
}
if
(
GetBkMode
(
hdc
)
!=
TRANSPARENT
&&
!
PATH_IsPathOpen
(
dc
->
path
)
)
if
(
GetBkMode
(
hdc
)
!=
TRANSPARENT
)
{
if
(
!
((
flags
&
ETO_CLIPPED
)
&&
(
flags
&
ETO_OPAQUE
)))
{
...
...
@@ -2030,15 +2030,10 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
}
if
(
span
)
{
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_ExtTextOut
(
dc
,
x
+
offsets
[
i
-
span
].
x
,
y
+
offsets
[
i
-
span
].
y
,
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
i
-
span
))
:
NULL
);
else
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
offsets
[
i
-
span
].
x
,
y
+
offsets
[
i
-
span
].
y
,
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
i
-
span
))
:
NULL
);
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
offsets
[
i
-
span
].
x
,
y
+
offsets
[
i
-
span
].
y
,
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
i
-
span
))
:
NULL
);
span
=
0
;
}
SelectObject
(
hdc
,
cur_font
);
...
...
@@ -2047,16 +2042,10 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
i
==
count
-
1
)
{
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_ExtTextOut
(
dc
,
x
+
(
offsets
?
offsets
[
count
-
span
].
x
:
0
),
y
+
(
offsets
?
offsets
[
count
-
span
].
y
:
0
),
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
count
-
span
))
:
NULL
);
else
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
(
offsets
?
offsets
[
count
-
span
].
x
:
0
),
y
+
(
offsets
?
offsets
[
count
-
span
].
y
:
0
),
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
count
-
span
))
:
NULL
);
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
+
(
offsets
?
offsets
[
count
-
span
].
x
:
0
),
y
+
(
offsets
?
offsets
[
count
-
span
].
y
:
0
),
(
flags
&
~
ETO_OPAQUE
)
|
ETO_GLYPH_INDEX
,
&
rc
,
glyphs
,
span
,
deltas
?
(
INT
*
)(
deltas
+
(
count
-
span
))
:
NULL
);
SelectObject
(
hdc
,
orig_font
);
HeapFree
(
GetProcessHeap
(),
0
,
offsets
);
}
...
...
@@ -2070,13 +2059,8 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
GetGlyphIndicesW
(
hdc
,
reordered_str
,
count
,
glyphs
,
0
);
flags
|=
ETO_GLYPH_INDEX
;
}
if
(
PATH_IsPathOpen
(
dc
->
path
))
ret
=
PATH_ExtTextOut
(
dc
,
x
,
y
,
(
flags
&
~
ETO_OPAQUE
),
&
rc
,
glyphs
?
glyphs
:
reordered_str
,
count
,
(
INT
*
)
deltas
);
else
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
,
y
,
(
flags
&
~
ETO_OPAQUE
),
&
rc
,
glyphs
?
glyphs
:
reordered_str
,
count
,
(
INT
*
)
deltas
);
ret
=
physdev
->
funcs
->
pExtTextOut
(
physdev
,
x
,
y
,
(
flags
&
~
ETO_OPAQUE
),
&
rc
,
glyphs
?
glyphs
:
reordered_str
,
count
,
(
INT
*
)
deltas
);
}
done:
...
...
dlls/gdi32/gdi_private.h
View file @
c441d574
...
...
@@ -314,20 +314,11 @@ extern METAHEADER *MF_CreateMetaHeaderDisk(METAHEADER *mr, LPCVOID filename, BOO
/* path.c */
#define PATH_IsPathOpen(path) ((path).state==PATH_Open)
/* Returns TRUE if the specified path is in the open state, i.e. in the
* state where points will be added to the path, or FALSE otherwise. This
* function is implemented as a macro for performance reasons.
*/
extern
void
PATH_InitGdiPath
(
GdiPath
*
pPath
)
DECLSPEC_HIDDEN
;
extern
void
PATH_DestroyGdiPath
(
GdiPath
*
pPath
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_SavePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_RestorePath
(
DC
*
dst
,
DC
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
PATH_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprc
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
DECLSPEC_HIDDEN
;
/* painting.c */
extern
POINT
*
GDI_Bezier
(
const
POINT
*
Points
,
INT
count
,
INT
*
nPtsOut
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/path.c
View file @
c441d574
...
...
@@ -1470,9 +1470,9 @@ static void PATH_BezierTo(GdiPath *pPath, POINT *lppt, INT n)
}
}
static
BOOL
PATH_add_outline
(
DC
*
dc
,
INT
x
,
INT
y
,
TTPOLYGONHEADER
*
header
,
DWORD
size
)
static
BOOL
PATH_add_outline
(
struct
path_physdev
*
physdev
,
INT
x
,
INT
y
,
TTPOLYGONHEADER
*
header
,
DWORD
size
)
{
GdiPath
*
pPath
=
&
dc
->
path
;
TTPOLYGONHEADER
*
start
;
POINT
pt
;
...
...
@@ -1490,7 +1490,7 @@ static BOOL PATH_add_outline(DC *dc, INT x, INT y, TTPOLYGONHEADER *header, DWOR
pt
.
x
=
x
+
int_from_fixed
(
header
->
pfxStart
.
x
);
pt
.
y
=
y
-
int_from_fixed
(
header
->
pfxStart
.
y
);
PATH_AddEntry
(
p
P
ath
,
&
pt
,
PT_MOVETO
);
PATH_AddEntry
(
p
hysdev
->
p
ath
,
&
pt
,
PT_MOVETO
);
curve
=
(
TTPOLYCURVE
*
)(
header
+
1
);
...
...
@@ -1508,7 +1508,7 @@ static BOOL PATH_add_outline(DC *dc, INT x, INT y, TTPOLYGONHEADER *header, DWOR
{
pt
.
x
=
x
+
int_from_fixed
(
curve
->
apfx
[
i
].
x
);
pt
.
y
=
y
-
int_from_fixed
(
curve
->
apfx
[
i
].
y
);
PATH_AddEntry
(
p
P
ath
,
&
pt
,
PT_LINETO
);
PATH_AddEntry
(
p
hysdev
->
p
ath
,
&
pt
,
PT_LINETO
);
}
break
;
}
...
...
@@ -1533,7 +1533,7 @@ static BOOL PATH_add_outline(DC *dc, INT x, INT y, TTPOLYGONHEADER *header, DWOR
pts
[
i
+
1
].
y
=
y
-
int_from_fixed
(
curve
->
apfx
[
i
].
y
);
}
PATH_BezierTo
(
p
P
ath
,
pts
,
curve
->
cpfx
+
1
);
PATH_BezierTo
(
p
hysdev
->
p
ath
,
pts
,
curve
->
cpfx
+
1
);
HeapFree
(
GetProcessHeap
(),
0
,
pts
);
break
;
...
...
@@ -1550,22 +1550,19 @@ static BOOL PATH_add_outline(DC *dc, INT x, INT y, TTPOLYGONHEADER *header, DWOR
header
=
(
TTPOLYGONHEADER
*
)((
char
*
)
header
+
header
->
cb
);
}
return
CloseFigure
(
dc
->
hSelf
);
return
CloseFigure
(
physdev
->
dev
.
hdc
);
}
/*************************************************************
*********
*
PATH
_ExtTextOut
/*************************************************************
*
pathdrv
_ExtTextOut
*/
BOOL
PATH_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprc
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
static
BOOL
pathdrv_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprc
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
{
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
unsigned
int
idx
;
HDC
hdc
=
dc
->
hSelf
;
POINT
offset
=
{
0
,
0
};
TRACE
(
"%p, %d, %d, %08x, %s, %s, %d, %p)
\n
"
,
hdc
,
x
,
y
,
flags
,
wine_dbgstr_rect
(
lprc
),
debugstr_wn
(
str
,
count
),
count
,
dx
);
if
(
!
count
)
return
TRUE
;
for
(
idx
=
0
;
idx
<
count
;
idx
++
)
...
...
@@ -1575,7 +1572,8 @@ BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc,
DWORD
dwSize
;
void
*
outline
;
dwSize
=
GetGlyphOutlineW
(
hdc
,
str
[
idx
],
GGO_GLYPH_INDEX
|
GGO_NATIVE
,
&
gm
,
0
,
NULL
,
&
identity
);
dwSize
=
GetGlyphOutlineW
(
dev
->
hdc
,
str
[
idx
],
GGO_GLYPH_INDEX
|
GGO_NATIVE
,
&
gm
,
0
,
NULL
,
&
identity
);
if
(
dwSize
==
GDI_ERROR
)
return
FALSE
;
/* add outline only if char is printable */
...
...
@@ -1584,9 +1582,10 @@ BOOL PATH_ExtTextOut(DC *dc, INT x, INT y, UINT flags, const RECT *lprc,
outline
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
if
(
!
outline
)
return
FALSE
;
GetGlyphOutlineW
(
hdc
,
str
[
idx
],
GGO_GLYPH_INDEX
|
GGO_NATIVE
,
&
gm
,
dwSize
,
outline
,
&
identity
);
GetGlyphOutlineW
(
dev
->
hdc
,
str
[
idx
],
GGO_GLYPH_INDEX
|
GGO_NATIVE
,
&
gm
,
dwSize
,
outline
,
&
identity
);
PATH_add_outline
(
dc
,
x
+
offset
.
x
,
y
+
offset
.
y
,
outline
,
dwSize
);
PATH_add_outline
(
physdev
,
x
+
offset
.
x
,
y
+
offset
.
y
,
outline
,
dwSize
);
HeapFree
(
GetProcessHeap
(),
0
,
outline
);
}
...
...
@@ -2300,7 +2299,7 @@ const struct gdi_dc_funcs path_driver =
NULL
,
/* pExtEscape */
NULL
,
/* pExtFloodFill */
NULL
,
/* pExtSelectClipRgn */
NULL
,
/* pExtTextOut */
pathdrv_ExtTextOut
,
/* pExtTextOut */
NULL
,
/* pFillPath */
NULL
,
/* pFillRgn */
NULL
,
/* pFlattenPath */
...
...
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