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
4a4b5d40
Commit
4a4b5d40
authored
Feb 02, 2004
by
Kevin Koltzau
Committed by
Alexandre Julliard
Feb 02, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementation of gdi32.GdiTransparentBlt and msimg32.TransparentBlt.
parent
2fba6872
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
89 additions
and
16 deletions
+89
-16
gdi32.spec
dlls/gdi/gdi32.spec
+1
-0
Makefile.in
dlls/msimg32/Makefile.in
+1
-1
msimg32.spec
dlls/msimg32/msimg32.spec
+1
-1
msimg32_main.c
dlls/msimg32/msimg32_main.c
+0
-14
bitblt.c
graphics/bitblt.c
+86
-0
No files found.
dlls/gdi/gdi32.spec
View file @
4a4b5d40
...
...
@@ -167,6 +167,7 @@
@ stub GdiSetAttrs
@ stdcall GdiSetBatchLimit(long)
@ stub GdiSetServerAttr
@ stdcall GdiTransparentBlt(long long long long long long long long long long long)
@ stub GdiWinWatchClose
@ stub GdiWinWatchDidStatusChange
@ stub GdiWinWatchGetClipList
...
...
dlls/msimg32/Makefile.in
View file @
4a4b5d40
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
msimg32.dll
IMPORTS
=
kernel32
IMPORTS
=
gdi32
kernel32
C_SRCS
=
msimg32_main.c
...
...
dlls/msimg32/msimg32.spec
View file @
4a4b5d40
@ stdcall AlphaBlend(long long long long long long long long long long long)
@ stub DllInitialize
@ stdcall GradientFill(long ptr long ptr long long) gdi32.GdiGradientFill
@ stdcall TransparentBlt(long long long long long long long long long long long)
@ stdcall TransparentBlt(long long long long long long long long long long long)
gdi32.GdiTransparentBlt
@ stdcall vSetDdrawflag()
dlls/msimg32/msimg32_main.c
View file @
4a4b5d40
...
...
@@ -38,20 +38,6 @@ BOOL WINAPI AlphaBlend( HDC hdcDest, int xDest, int yDest, int widthDest, int he
return
FALSE
;
}
/******************************************************************************
* TransparentBlt (MSIMG32.@)
*/
BOOL
WINAPI
TransparentBlt
(
HDC
hdcDest
,
int
xDest
,
int
yDest
,
int
widthDest
,
int
heightDst
,
HDC
hdcSrc
,
int
xSrc
,
int
ySrc
,
int
widthSrc
,
int
heightSrc
,
UINT
crTransparent
)
{
FIXME
(
"stub: TransparentBlt from %p to %p
\n
"
,
hdcSrc
,
hdcDest
);
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
FALSE
;
}
/******************************************************************************
* vSetDdrawflag (MSIMG32.@)
*/
...
...
graphics/bitblt.c
View file @
4a4b5d40
...
...
@@ -309,6 +309,92 @@ BOOL WINAPI MaskBlt(HDC hdcDest, INT nXDest, INT nYDest,
return
TRUE
;
}
/******************************************************************************
* GdiTransparentBlt [GDI32.@]
*/
BOOL
WINAPI
GdiTransparentBlt
(
HDC
hdcDest
,
int
xDest
,
int
yDest
,
int
widthDest
,
int
heightDest
,
HDC
hdcSrc
,
int
xSrc
,
int
ySrc
,
int
widthSrc
,
int
heightSrc
,
UINT
crTransparent
)
{
BOOL
ret
=
FALSE
;
HDC
hdcWork
;
HBITMAP
bmpWork
;
HGDIOBJ
oldWork
;
HDC
hdcMask
=
NULL
;
HBITMAP
bmpMask
=
NULL
;
HBITMAP
oldMask
=
NULL
;
COLORREF
oldBackground
;
COLORREF
oldForeground
;
int
oldStretchMode
;
if
(
widthDest
<
0
||
heightDest
<
0
||
widthSrc
<
0
||
heightSrc
<
0
)
{
TRACE
(
"Can not mirror
\n
"
);
return
FALSE
;
}
oldBackground
=
SetBkColor
(
hdcDest
,
RGB
(
255
,
255
,
255
));
oldForeground
=
SetTextColor
(
hdcDest
,
RGB
(
0
,
0
,
0
));
/* Stretch bitmap */
oldStretchMode
=
GetStretchBltMode
(
hdcSrc
);
if
(
oldStretchMode
==
BLACKONWHITE
||
oldStretchMode
==
WHITEONBLACK
)
SetStretchBltMode
(
hdcSrc
,
COLORONCOLOR
);
hdcWork
=
CreateCompatibleDC
(
hdcDest
);
bmpWork
=
CreateCompatibleBitmap
(
hdcDest
,
widthDest
,
heightDest
);
oldWork
=
SelectObject
(
hdcWork
,
bmpWork
);
if
(
!
StretchBlt
(
hdcWork
,
0
,
0
,
widthDest
,
heightDest
,
hdcSrc
,
xSrc
,
ySrc
,
widthSrc
,
heightSrc
,
SRCCOPY
))
{
TRACE
(
"Failed to stretch
\n
"
);
goto
error
;
}
SetBkColor
(
hdcWork
,
crTransparent
);
/* Create mask */
hdcMask
=
CreateCompatibleDC
(
hdcDest
);
bmpMask
=
CreateCompatibleBitmap
(
hdcMask
,
widthDest
,
heightDest
);
oldMask
=
SelectObject
(
hdcMask
,
bmpMask
);
if
(
!
BitBlt
(
hdcMask
,
0
,
0
,
widthDest
,
heightDest
,
hdcWork
,
0
,
0
,
SRCCOPY
))
{
TRACE
(
"Failed to create mask
\n
"
);
goto
error
;
}
/* Replace transparent color with black */
SetBkColor
(
hdcWork
,
RGB
(
0
,
0
,
0
));
SetTextColor
(
hdcWork
,
RGB
(
255
,
255
,
255
));
if
(
!
BitBlt
(
hdcWork
,
0
,
0
,
widthDest
,
heightDest
,
hdcMask
,
0
,
0
,
SRCAND
))
{
TRACE
(
"Failed to mask out background
\n
"
);
goto
error
;
}
/* Replace non-transparent area on destination with black */
if
(
!
BitBlt
(
hdcDest
,
0
,
0
,
widthDest
,
heightDest
,
hdcMask
,
0
,
0
,
SRCAND
))
{
TRACE
(
"Failed to clear destination area
\n
"
);
goto
error
;
}
/* Draw the image */
if
(
!
BitBlt
(
hdcDest
,
xDest
,
yDest
,
widthDest
,
heightDest
,
hdcWork
,
0
,
0
,
SRCPAINT
))
{
TRACE
(
"Failed to paint image
\n
"
);
goto
error
;
}
ret
=
TRUE
;
error:
SetStretchBltMode
(
hdcSrc
,
oldStretchMode
);
SetBkColor
(
hdcDest
,
oldBackground
);
SetTextColor
(
hdcDest
,
oldForeground
);
if
(
hdcWork
)
{
SelectObject
(
hdcWork
,
oldWork
);
DeleteDC
(
hdcWork
);
}
if
(
bmpWork
)
DeleteObject
(
bmpWork
);
if
(
hdcMask
)
{
SelectObject
(
hdcMask
,
oldMask
);
DeleteDC
(
hdcMask
);
}
if
(
bmpMask
)
DeleteObject
(
bmpMask
);
return
ret
;
}
/*********************************************************************
* PlgBlt [GDI32.@]
*
...
...
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