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
908a2abe
Commit
908a2abe
authored
Aug 17, 2002
by
Huw D M Davies
Committed by
Alexandre Julliard
Aug 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement simple ExtTextOut for enhmfdrv.
parent
09570eda
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
2 deletions
+61
-2
enhmetafiledrv.h
dlls/gdi/enhmfdrv/enhmetafiledrv.h
+1
-1
graphics.c
dlls/gdi/enhmfdrv/graphics.c
+59
-0
init.c
dlls/gdi/enhmfdrv/init.c
+1
-1
No files found.
dlls/gdi/enhmfdrv/enhmetafiledrv.h
View file @
908a2abe
...
...
@@ -66,7 +66,7 @@ extern INT EMFDRV_ExcludeClipRect( PHYSDEV dev, INT left, INT top, INT righ
extern
BOOL
EMFDRV_ExtFloodFill
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
COLORREF
color
,
UINT
fillType
);
extern
INT
EMFDRV_ExtSelectClipRgn
(
PHYSDEV
dev
,
HRGN
hrgn
,
INT
mode
);
extern
BOOL
EMFDRV_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprect
,
LPCSTR
str
,
UINT
flags
,
const
RECT
*
lprect
,
LPC
W
STR
str
,
UINT
count
,
const
INT
*
lpDx
);
extern
BOOL
EMFDRV_FillPath
(
PHYSDEV
dev
);
extern
BOOL
EMFDRV_FillRgn
(
PHYSDEV
dev
,
HRGN
hrgn
,
HBRUSH
hbrush
);
...
...
dlls/gdi/enhmfdrv/graphics.c
View file @
908a2abe
...
...
@@ -627,3 +627,62 @@ EMFDRV_SetTextColor( PHYSDEV dev, COLORREF color )
return
EMFDRV_WriteRecord
(
dev
,
&
emr
.
emr
)
?
color
:
CLR_INVALID
;
}
/**********************************************************************
* EMFDRV_ExtTextOut
*/
BOOL
EMFDRV_ExtTextOut
(
PHYSDEV
dev
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
{
EMREXTTEXTOUTW
*
pemr
;
DWORD
nSize
;
BOOL
ret
;
EMFDRV_PDEVICE
*
physDev
=
(
EMFDRV_PDEVICE
*
)
dev
;
nSize
=
sizeof
(
*
pemr
)
+
(
count
+
1
)
/
2
*
2
*
sizeof
(
WCHAR
)
+
(
lpDx
?
count
*
sizeof
(
INT
)
:
0
);
TRACE
(
"%s count %d nSize = %ld
\n
"
,
debugstr_wn
(
str
,
count
),
count
,
nSize
);
pemr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nSize
);
pemr
->
emr
.
iType
=
EMR_EXTTEXTOUTW
;
pemr
->
emr
.
nSize
=
nSize
;
/* FIXME: Calculation of these requires honouring alignment mode, escapement etc. */
pemr
->
rclBounds
.
left
=
pemr
->
rclBounds
.
right
=
x
;
pemr
->
rclBounds
.
top
=
pemr
->
rclBounds
.
bottom
=
y
;
pemr
->
iGraphicsMode
=
GetGraphicsMode
(
physDev
->
hdc
);
pemr
->
exScale
=
pemr
->
eyScale
=
1
.
0
;
/* FIXME */
pemr
->
emrtext
.
ptlReference
.
x
=
x
;
pemr
->
emrtext
.
ptlReference
.
y
=
y
;
pemr
->
emrtext
.
nChars
=
count
;
pemr
->
emrtext
.
offString
=
sizeof
(
*
pemr
);
memcpy
((
char
*
)
pemr
+
pemr
->
emrtext
.
offString
,
str
,
count
*
sizeof
(
WCHAR
));
pemr
->
emrtext
.
fOptions
=
flags
;
if
(
!
lprect
)
{
pemr
->
emrtext
.
rcl
.
left
=
pemr
->
emrtext
.
rcl
.
top
=
0
;
pemr
->
emrtext
.
rcl
.
right
=
pemr
->
emrtext
.
rcl
.
bottom
=
-
1
;
}
else
{
pemr
->
emrtext
.
rcl
.
left
=
lprect
->
left
;
pemr
->
emrtext
.
rcl
.
top
=
lprect
->
top
;
pemr
->
emrtext
.
rcl
.
right
=
lprect
->
right
;
pemr
->
emrtext
.
rcl
.
bottom
=
lprect
->
bottom
;
}
if
(
lpDx
)
{
pemr
->
emrtext
.
offDx
=
sizeof
(
*
pemr
)
+
(
count
+
1
)
/
2
*
2
*
sizeof
(
WCHAR
);
memcpy
((
char
*
)
pemr
+
pemr
->
emrtext
.
offDx
,
lpDx
,
count
*
sizeof
(
INT
));
}
else
pemr
->
emrtext
.
offDx
=
0
;
/* FIXME: actually Windows fills out the array
using GetCharWidth in this case */
ret
=
EMFDRV_WriteRecord
(
dev
,
&
pemr
->
emr
);
if
(
ret
)
EMFDRV_UpdateBBox
(
dev
,
&
pemr
->
rclBounds
);
HeapFree
(
GetProcessHeap
(),
0
,
pemr
);
return
ret
;
}
dlls/gdi/enhmfdrv/init.c
View file @
908a2abe
...
...
@@ -57,7 +57,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
NULL
,
/* pExtEscape */
EMFDRV_ExtFloodFill
,
/* pExtFloodFill */
EMFDRV_ExtSelectClipRgn
,
/* pExtSelectClipRgn */
NULL
,
/* pExtTextOut */
EMFDRV_ExtTextOut
,
/* pExtTextOut */
EMFDRV_FillPath
,
/* pFillPath */
EMFDRV_FillRgn
,
/* pFillRgn */
EMFDRV_FlattenPath
,
/* 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