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
49ae7360
Commit
49ae7360
authored
Dec 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetNearestColor in the DIB driver.
parent
cae4ef81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
1 deletion
+18
-1
dc.c
dlls/gdi32/dibdrv/dc.c
+1
-1
dibdrv.h
dlls/gdi32/dibdrv/dibdrv.h
+1
-0
graphics.c
dlls/gdi32/dibdrv/graphics.c
+14
-0
bitmap.c
dlls/gdi32/tests/bitmap.c
+2
-0
No files found.
dlls/gdi32/dibdrv/dc.c
View file @
49ae7360
...
...
@@ -530,7 +530,7 @@ const struct gdi_dc_funcs dib_driver =
NULL
,
/* pGetICMProfile */
dibdrv_GetImage
,
/* pGetImage */
NULL
,
/* pGetKerningPairs */
NULL
,
/* pGetNearestColor */
dibdrv_GetNearestColor
,
/* pGetNearestColor */
NULL
,
/* pGetOutlineTextMetrics */
dibdrv_GetPixel
,
/* pGetPixel */
NULL
,
/* pGetPixelFormat */
...
...
dlls/gdi32/dibdrv/dibdrv.h
View file @
49ae7360
...
...
@@ -124,6 +124,7 @@ extern BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
const
RECT
*
rect
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
DECLSPEC_HIDDEN
;
extern
DWORD
dibdrv_GetImage
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
BITMAPINFO
*
info
,
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
)
DECLSPEC_HIDDEN
;
extern
COLORREF
dibdrv_GetNearestColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
dibdrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_LineTo
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
dibdrv_PatBlt
(
PHYSDEV
dev
,
struct
bitblt_coords
*
dst
,
DWORD
rop
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/dibdrv/graphics.c
View file @
49ae7360
...
...
@@ -392,6 +392,20 @@ BOOL dibdrv_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
}
/***********************************************************************
* dibdrv_GetNearestColor
*/
COLORREF
dibdrv_GetNearestColor
(
PHYSDEV
dev
,
COLORREF
color
)
{
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DWORD
pixel
;
TRACE
(
"(%p, %08x)
\n
"
,
dev
,
color
);
pixel
=
get_pixel_color
(
pdev
,
color
,
FALSE
);
return
pdev
->
dib
.
funcs
->
pixel_to_colorref
(
&
pdev
->
dib
,
pixel
);
}
/***********************************************************************
* dibdrv_GetPixel
*/
COLORREF
dibdrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
...
...
dlls/gdi32/tests/bitmap.c
View file @
49ae7360
...
...
@@ -346,6 +346,8 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER
ok(c == exp, "SetPixel failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \
c = GetPixel(hdc, 0, 0); \
ok(c == exp, "GetPixel failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \
c = GetNearestColor(hdc, color); \
ok(c == exp, "GetNearestColor failed: got 0x%06x expected 0x%06x\n", c, (UINT)exp); \
}
static
void
test_dib_bits_access
(
HBITMAP
hdib
,
void
*
bits
)
...
...
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