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
e6c349d6
Commit
e6c349d6
authored
Oct 19, 2012
by
Huw Davies
Committed by
Alexandre Julliard
Oct 19, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use the helper to draw the glyphs.
parent
3e751732
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
18 deletions
+6
-18
graphics.c
dlls/gdi32/dibdrv/graphics.c
+6
-18
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
e6c349d6
...
...
@@ -453,7 +453,7 @@ static void draw_glyph( dib_info *dib, int x, int y, const GLYPHMETRICS *metrics
rect
.
top
=
y
-
metrics
->
gmptGlyphOrigin
.
y
;
rect
.
right
=
rect
.
left
+
metrics
->
gmBlackBoxX
;
rect
.
bottom
=
rect
.
top
+
metrics
->
gmBlackBoxY
;
add_bounds_rect
(
bounds
,
&
rect
);
if
(
bounds
)
add_bounds_rect
(
bounds
,
&
rect
);
for
(
i
=
0
;
i
<
clipped_rects
->
count
;
i
++
)
{
...
...
@@ -564,11 +564,15 @@ BOOL render_aa_text_bitmapinfo( HDC hdc, BITMAPINFO *info, struct gdi_image_bits
COLORREF
fg
,
bg
;
DWORD
fg_pixel
,
bg_pixel
;
struct
intensity_range
glyph_intensities
[
17
];
struct
clipped_rects
visrect
;
assert
(
info
->
bmiHeader
.
biBitCount
>
8
);
/* mono and indexed formats don't support anti-aliasing */
init_dib_info_from_bitmapinfo
(
&
dib
,
info
,
bits
->
ptr
);
visrect
.
count
=
1
;
visrect
.
rects
=
&
src
->
visrect
;
fg
=
make_rgb_colorref
(
hdc
,
&
dib
,
GetTextColor
(
hdc
),
&
got_pixel
,
&
fg_pixel
);
if
(
!
got_pixel
)
fg_pixel
=
dib
.
funcs
->
colorref_to_pixel
(
&
dib
,
fg
);
...
...
@@ -595,24 +599,8 @@ BOOL render_aa_text_bitmapinfo( HDC hdc, BITMAPINFO *info, struct gdi_image_bits
if
(
err
)
continue
;
if
(
glyph_dib
.
bits
.
ptr
)
{
RECT
rect
,
clipped_rect
;
POINT
src_origin
;
rect
.
left
=
x
+
metrics
.
gmptGlyphOrigin
.
x
;
rect
.
top
=
y
-
metrics
.
gmptGlyphOrigin
.
y
;
rect
.
right
=
rect
.
left
+
metrics
.
gmBlackBoxX
;
rect
.
bottom
=
rect
.
top
+
metrics
.
gmBlackBoxY
;
draw_glyph
(
&
dib
,
x
,
y
,
&
metrics
,
&
glyph_dib
,
fg_pixel
,
glyph_intensities
,
&
visrect
,
NULL
);
if
(
intersect_rect
(
&
clipped_rect
,
&
rect
,
&
src
->
visrect
))
{
src_origin
.
x
=
clipped_rect
.
left
-
rect
.
left
;
src_origin
.
y
=
clipped_rect
.
top
-
rect
.
top
;
dib
.
funcs
->
draw_glyph
(
&
dib
,
&
clipped_rect
,
&
glyph_dib
,
&
src_origin
,
fg_pixel
,
glyph_intensities
);
}
}
free_dib_info
(
&
glyph_dib
);
if
(
dx
)
...
...
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