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
c26d15f8
Commit
c26d15f8
authored
Nov 22, 2004
by
Glenn Wurster
Committed by
Alexandre Julliard
Nov 22, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use physDev->textPixel instead of GetTextColor for ExtTextOut.
parent
d23f5ef2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
22 deletions
+25
-22
xrender.c
dlls/x11drv/xrender.c
+25
-22
No files found.
dlls/x11drv/xrender.c
View file @
c26d15f8
...
...
@@ -882,7 +882,7 @@ static DWORD PutField (DWORD pixel, int shift, int len)
}
static
void
SmoothGlyphGray
(
XImage
*
image
,
int
x
,
int
y
,
void
*
bitmap
,
XGlyphInfo
*
gi
,
COLORREF
color
)
int
color
)
{
int
r_shift
,
r_len
;
int
g_shift
,
g_len
;
...
...
@@ -894,10 +894,6 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf
int
w
,
tx
;
BYTE
src_r
,
src_g
,
src_b
;
src_r
=
GetRValue
(
color
);
src_g
=
GetGValue
(
color
);
src_b
=
GetBValue
(
color
);
x
-=
gi
->
x
;
y
-=
gi
->
y
;
width
=
gi
->
width
;
...
...
@@ -909,6 +905,11 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf
ExamineBitfield
(
image
->
red_mask
,
&
r_shift
,
&
r_len
);
ExamineBitfield
(
image
->
green_mask
,
&
g_shift
,
&
g_len
);
ExamineBitfield
(
image
->
blue_mask
,
&
b_shift
,
&
b_len
);
src_r
=
GetField
(
color
,
r_shift
,
r_len
);
src_g
=
GetField
(
color
,
g_shift
,
g_len
);
src_b
=
GetField
(
color
,
b_shift
,
b_len
);
for
(;
height
--
;
y
++
)
{
mask
=
maskLine
;
...
...
@@ -927,12 +928,7 @@ static void SmoothGlyphGray(XImage *image, int x, int y, void *bitmap, XGlyphInf
if
(
tx
<
0
)
continue
;
if
(
m
==
0xff
)
{
pixel
=
(
PutField
((
src_r
),
r_shift
,
r_len
)
|
PutField
((
src_g
),
g_shift
,
g_len
)
|
PutField
((
src_b
),
b_shift
,
b_len
));
XPutPixel
(
image
,
tx
,
y
,
pixel
);
}
XPutPixel
(
image
,
tx
,
y
,
color
);
else
if
(
m
)
{
BYTE
r
,
g
,
b
;
...
...
@@ -989,7 +985,6 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
INT
char_extra
;
HRGN
saved_region
=
0
;
UINT
align
=
GetTextAlign
(
hdc
);
COLORREF
textColor
=
GetTextColor
(
hdc
);
TRACE
(
"%p, %d, %d, %08x, %p, %s, %d, %p)
\n
"
,
hdc
,
x
,
y
,
flags
,
lprect
,
debugstr_wn
(
wstr
,
count
),
count
,
lpDx
);
...
...
@@ -1056,7 +1051,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
X11DRV_LockDIBSection
(
physDev
,
DIB_Status_GdiMod
,
FALSE
);
if
(
physDev
->
depth
==
1
)
{
if
((
textColor
&
0xffffff
)
==
0
)
{
if
((
physDev
->
textPixel
&
0xffffff
)
==
0
)
{
textPixel
=
0
;
backgroundPixel
=
1
;
}
else
{
...
...
@@ -1241,19 +1236,27 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
CPRepeat
,
&
pa
);
wine_tsx11_unlock
();
TRACE
(
"Created pixmap of depth %d
\n
"
,
format
->
depth
);
/* init lastTextColor to something different from text
Color
*/
physDev
->
xrender
->
lastTextColor
=
~
textColor
;
/* init lastTextColor to something different from text
Pixel
*/
physDev
->
xrender
->
lastTextColor
=
~
physDev
->
textPixel
;
}
if
(
textColor
!=
physDev
->
xrender
->
lastTextColor
)
{
if
(
physDev
->
textPixel
!=
physDev
->
xrender
->
lastTextColor
)
{
if
(
physDev
->
depth
!=
1
)
{
/* Map 0 -- 0xff onto 0 -- 0xffff */
col
.
red
=
GetRValue
(
textColor
);
/* Map 0 -- 0xff onto 0 -- 0xffff */
int
r_shift
,
r_len
;
int
g_shift
,
g_len
;
int
b_shift
,
b_len
;
ExamineBitfield
(
visual
->
red_mask
,
&
r_shift
,
&
r_len
);
ExamineBitfield
(
visual
->
green_mask
,
&
g_shift
,
&
g_len
);
ExamineBitfield
(
visual
->
blue_mask
,
&
b_shift
,
&
b_len
);
col
.
red
=
GetField
(
physDev
->
textPixel
,
r_shift
,
r_len
);
col
.
red
|=
col
.
red
<<
8
;
col
.
green
=
Get
GValue
(
textColor
);
col
.
green
=
Get
Field
(
physDev
->
textPixel
,
g_shift
,
g_len
);
col
.
green
|=
col
.
green
<<
8
;
col
.
blue
=
Get
BValue
(
textColor
);
col
.
blue
=
Get
Field
(
physDev
->
textPixel
,
b_shift
,
b_len
);
col
.
blue
|=
col
.
blue
<<
8
;
col
.
alpha
=
0x0
;
}
else
{
/* for a 1bpp bitmap we always need a 1 in the tile */
...
...
@@ -1265,7 +1268,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
physDev
->
xrender
->
tile_pict
,
&
col
,
0
,
0
,
1
,
1
);
wine_tsx11_unlock
();
physDev
->
xrender
->
lastTextColor
=
textColor
;
physDev
->
xrender
->
lastTextColor
=
physDev
->
textPixel
;
}
/* FIXME the mapping of Text/BkColor onto 1 or 0 needs investigation.
...
...
@@ -1451,7 +1454,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
yoff
+
image_off_y
-
extents
.
top
,
entry
->
bitmaps
[
glyphs
[
idx
]],
&
entry
->
gis
[
glyphs
[
idx
]],
textColor
);
physDev
->
textPixel
);
if
(
deltas
)
{
offset
+=
X11DRV_XWStoDS
(
physDev
,
deltas
[
idx
]);
xoff
=
offset
*
cosEsc
;
...
...
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