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
9f410413
Commit
9f410413
authored
Dec 12, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement GetPixel in the null driver using GetImage.
parent
0c194895
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
11 deletions
+46
-11
bitblt.c
dlls/gdi32/bitblt.c
+29
-0
bitblt.c
dlls/gdi32/dibdrv/bitblt.c
+13
-0
driver.c
dlls/gdi32/driver.c
+0
-5
gdi_private.h
dlls/gdi32/gdi_private.h
+2
-0
painting.c
dlls/gdi32/painting.c
+2
-6
No files found.
dlls/gdi32/bitblt.c
View file @
9f410413
...
...
@@ -472,6 +472,35 @@ done:
return
ret
;
}
COLORREF
nulldrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
{
DC
*
dc
=
get_nulldrv_dc
(
dev
);
char
buffer
[
FIELD_OFFSET
(
BITMAPINFO
,
bmiColors
[
256
]
)];
BITMAPINFO
*
info
=
(
BITMAPINFO
*
)
buffer
;
struct
bitblt_coords
src
;
struct
gdi_image_bits
bits
;
COLORREF
ret
;
src
.
visrect
.
left
=
x
;
src
.
visrect
.
top
=
y
;
LPtoDP
(
dev
->
hdc
,
(
POINT
*
)
&
src
.
visrect
,
1
);
src
.
visrect
.
right
=
src
.
visrect
.
left
+
1
;
src
.
visrect
.
bottom
=
src
.
visrect
.
top
+
1
;
src
.
x
=
src
.
visrect
.
left
;
src
.
y
=
src
.
visrect
.
top
;
src
.
width
=
src
.
height
=
1
;
if
(
!
clip_visrect
(
dc
,
&
src
.
visrect
,
&
src
.
visrect
))
return
CLR_INVALID
;
dev
=
GET_DC_PHYSDEV
(
dc
,
pGetImage
);
if
(
dev
->
funcs
->
pGetImage
(
dev
,
0
,
info
,
&
bits
,
&
src
))
return
CLR_INVALID
;
ret
=
get_pixel_bitmapinfo
(
info
,
bits
.
ptr
,
&
src
);
if
(
bits
.
free
)
bits
.
free
(
&
bits
);
return
ret
;
}
/***********************************************************************
* PatBlt (GDI32.@)
*/
...
...
dlls/gdi32/dibdrv/bitblt.c
View file @
9f410413
...
...
@@ -1372,6 +1372,19 @@ DWORD gradient_bitmapinfo( const BITMAPINFO *info, void *bits, TRIVERTEX *vert_a
return
ret
;
}
COLORREF
get_pixel_bitmapinfo
(
const
BITMAPINFO
*
info
,
void
*
bits
,
struct
bitblt_coords
*
src
)
{
dib_info
dib
;
POINT
pt
;
DWORD
pixel
;
init_dib_info_from_bitmapinfo
(
&
dib
,
info
,
bits
,
default_color_table
);
pt
.
x
=
src
->
x
;
pt
.
y
=
src
->
y
;
pixel
=
dib
.
funcs
->
get_pixel
(
&
dib
,
&
pt
);
return
dib
.
funcs
->
pixel_to_colorref
(
&
dib
,
pixel
);
}
/***********************************************************************
* dibdrv_StretchBlt
*/
...
...
dlls/gdi32/driver.c
View file @
9f410413
...
...
@@ -394,11 +394,6 @@ static UINT nulldrv_GetOutlineTextMetrics( PHYSDEV dev, UINT size, LPOUTLINETEXT
return
0
;
}
static
COLORREF
nulldrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
{
return
CLR_INVALID
;
}
static
INT
nulldrv_GetPixelFormat
(
PHYSDEV
dev
)
{
return
0
;
...
...
dlls/gdi32/gdi_private.h
View file @
9f410413
...
...
@@ -250,6 +250,7 @@ extern DWORD blend_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struc
BLENDFUNCTION
blend
)
DECLSPEC_HIDDEN
;
extern
DWORD
gradient_bitmapinfo
(
const
BITMAPINFO
*
info
,
void
*
bits
,
TRIVERTEX
*
vert_array
,
ULONG
nvert
,
void
*
grad_array
,
ULONG
ngrad
,
ULONG
mode
,
const
POINT
*
dev_pts
,
HRGN
rgn
)
DECLSPEC_HIDDEN
;
extern
COLORREF
get_pixel_bitmapinfo
(
const
BITMAPINFO
*
info
,
void
*
bits
,
struct
bitblt_coords
*
src
)
DECLSPEC_HIDDEN
;
extern
BOOL
render_aa_text_bitmapinfo
(
HDC
hdc
,
BITMAPINFO
*
info
,
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
,
INT
x
,
INT
y
,
UINT
flags
,
UINT
aa_flags
,
LPCWSTR
str
,
UINT
count
,
const
INT
*
dx
)
DECLSPEC_HIDDEN
;
...
...
@@ -356,6 +357,7 @@ extern BOOL nulldrv_FrameRgn( PHYSDEV dev, HRGN rgn, HBRUSH brush, INT width, IN
extern
LONG
nulldrv_GetBitmapBits
(
HBITMAP
bitmap
,
void
*
bits
,
LONG
size
)
DECLSPEC_HIDDEN
;
extern
DWORD
nulldrv_GetImage
(
PHYSDEV
dev
,
HBITMAP
hbitmap
,
BITMAPINFO
*
info
,
struct
gdi_image_bits
*
bits
,
struct
bitblt_coords
*
src
)
DECLSPEC_HIDDEN
;
extern
COLORREF
nulldrv_GetNearestColor
(
PHYSDEV
dev
,
COLORREF
color
)
DECLSPEC_HIDDEN
;
extern
COLORREF
nulldrv_GetPixel
(
PHYSDEV
dev
,
INT
x
,
INT
y
)
DECLSPEC_HIDDEN
;
extern
BOOL
nulldrv_GradientFill
(
PHYSDEV
dev
,
TRIVERTEX
*
vert_array
,
ULONG
nvert
,
void
*
grad_array
,
ULONG
ngrad
,
ULONG
mode
)
DECLSPEC_HIDDEN
;
extern
INT
nulldrv_IntersectClipRect
(
PHYSDEV
dev
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/painting.c
View file @
9f410413
...
...
@@ -476,13 +476,9 @@ COLORREF WINAPI GetPixel( HDC hdc, INT x, INT y )
if
(
dc
)
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetPixel
);
update_dc
(
dc
);
/* FIXME: should this be in the graphics driver? */
if
(
PtVisible
(
hdc
,
x
,
y
))
{
PHYSDEV
physdev
=
GET_DC_PHYSDEV
(
dc
,
pGetPixel
);
ret
=
physdev
->
funcs
->
pGetPixel
(
physdev
,
x
,
y
);
}
ret
=
physdev
->
funcs
->
pGetPixel
(
physdev
,
x
,
y
);
release_dc_ptr
(
dc
);
}
return
ret
;
...
...
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