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
81bc9dfb
Commit
81bc9dfb
authored
Oct 13, 1999
by
Luc Tourangeau
Committed by
Alexandre Julliard
Oct 13, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some adjustments to ExtTextOut.
parent
62efee23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
6 deletions
+63
-6
text.c
graphics/psdrv/text.c
+63
-6
No files found.
graphics/psdrv/text.c
View file @
81bc9dfb
...
@@ -11,20 +11,71 @@
...
@@ -11,20 +11,71 @@
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
DEFAULT_DEBUG_CHANNEL
(
psdrv
)
static
BOOL
PSDRV_Text
(
DC
*
dc
,
INT
x
,
INT
y
,
LPCSTR
str
,
UINT
count
);
/***********************************************************************
/***********************************************************************
* PSDRV_ExtTextOut
* PSDRV_ExtTextOut
*/
*/
BOOL
PSDRV_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
BOOL
PSDRV_ExtTextOut
(
DC
*
dc
,
INT
x
,
INT
y
,
UINT
flags
,
const
RECT
*
lprect
,
LPCSTR
str
,
UINT
count
,
const
RECT
*
lprect
,
LPCSTR
str
,
UINT
count
,
const
INT
*
lpDx
)
const
INT
*
lpDx
)
{
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
char
*
strbuf
;
BOOL
bResult
=
TRUE
;
SIZE
sz
;
RECT
rect
;
TRACE
(
"(x=%d, y=%d, flags=0x%08x, str='%.*s', count=%d)
\n
"
,
x
,
y
,
TRACE
(
"(x=%d, y=%d, flags=0x%08x, str='%.*s', count=%d)
\n
"
,
x
,
y
,
flags
,
(
int
)
count
,
str
,
count
);
flags
,
(
int
)
count
,
str
,
count
);
/* write font if not already written */
PSDRV_SetFont
(
dc
);
/* set clipping and/or draw background */
if
((
flags
&
(
ETO_OPAQUE
|
ETO_CLIPPED
))
&&
(
lprect
!=
NULL
))
{
rect
.
left
=
XLPTODP
(
dc
,
lprect
->
left
);
rect
.
right
=
XLPTODP
(
dc
,
lprect
->
right
);
rect
.
top
=
YLPTODP
(
dc
,
lprect
->
top
);
rect
.
bottom
=
YLPTODP
(
dc
,
lprect
->
bottom
);
PSDRV_WriteGSave
(
dc
);
PSDRV_WriteRectangle
(
dc
,
rect
.
left
,
rect
.
top
,
rect
.
right
-
rect
.
left
,
rect
.
bottom
-
rect
.
top
);
if
(
flags
&
ETO_OPAQUE
)
{
PSDRV_WriteGSave
(
dc
);
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
bkColor
);
PSDRV_WriteFill
(
dc
);
PSDRV_WriteGRestore
(
dc
);
}
if
(
flags
&
ETO_CLIPPED
)
{
PSDRV_WriteClip
(
dc
);
}
bResult
=
PSDRV_Text
(
dc
,
x
,
y
,
str
,
count
);
PSDRV_WriteGRestore
(
dc
);
}
else
{
bResult
=
PSDRV_Text
(
dc
,
x
,
y
,
str
,
count
);
}
return
bResult
;
}
/***********************************************************************
* PSDRV_Text
*/
static
BOOL
PSDRV_Text
(
DC
*
dc
,
INT
x
,
INT
y
,
LPCSTR
str
,
UINT
count
)
{
PSDRV_PDEVICE
*
physDev
=
(
PSDRV_PDEVICE
*
)
dc
->
physDev
;
char
*
strbuf
;
SIZE
sz
;
POINT
pt
;
strbuf
=
(
char
*
)
HeapAlloc
(
PSDRV_Heap
,
0
,
count
+
1
);
strbuf
=
(
char
*
)
HeapAlloc
(
PSDRV_Heap
,
0
,
count
+
1
);
if
(
!
strbuf
)
{
if
(
!
strbuf
)
{
WARN
(
"HeapAlloc failed
\n
"
);
WARN
(
"HeapAlloc failed
\n
"
);
...
@@ -36,8 +87,8 @@ BOOL PSDRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
...
@@ -36,8 +87,8 @@ BOOL PSDRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
y
=
dc
->
w
.
CursPosY
;
y
=
dc
->
w
.
CursPosY
;
}
}
x
=
XLPTODP
(
dc
,
x
);
pt
.
x
=
x
=
XLPTODP
(
dc
,
x
);
y
=
YLPTODP
(
dc
,
y
);
pt
.
y
=
y
=
YLPTODP
(
dc
,
y
);
GetTextExtentPoint32A
(
dc
->
hSelf
,
str
,
count
,
&
sz
);
GetTextExtentPoint32A
(
dc
->
hSelf
,
str
,
count
,
&
sz
);
sz
.
cx
=
XLSTODS
(
dc
,
sz
.
cx
);
sz
.
cx
=
XLSTODS
(
dc
,
sz
.
cx
);
...
@@ -78,6 +129,12 @@ BOOL PSDRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
...
@@ -78,6 +129,12 @@ BOOL PSDRV_ExtTextOut( DC *dc, INT x, INT y, UINT flags,
PSDRV_SetFont
(
dc
);
PSDRV_SetFont
(
dc
);
PSDRV_WriteGSave
(
dc
);
PSDRV_WriteNewPath
(
dc
);
PSDRV_WriteRectangle
(
dc
,
pt
.
x
,
pt
.
y
,
sz
.
cx
,
sz
.
cy
);
PSDRV_WriteSetColor
(
dc
,
&
physDev
->
bkColor
);
PSDRV_WriteFill
(
dc
);
PSDRV_WriteGRestore
(
dc
);
PSDRV_WriteMoveTo
(
dc
,
x
,
y
);
PSDRV_WriteMoveTo
(
dc
,
x
,
y
);
PSDRV_WriteShow
(
dc
,
strbuf
,
strlen
(
strbuf
));
PSDRV_WriteShow
(
dc
,
strbuf
,
strlen
(
strbuf
));
...
...
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