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
56166a6f
Commit
56166a6f
authored
Apr 19, 1999
by
Huw D M Davies
Committed by
Alexandre Julliard
Apr 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented recording of StretchDIBits and SetDIBitsToDevice and
playback of SetDIBitsToDevice. Cleaned up PlayMetaFileRecord a bit.
parent
94bb5bb1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
95 additions
and
4 deletions
+95
-4
bitblt.c
graphics/metafiledrv/bitblt.c
+82
-0
init.c
graphics/metafiledrv/init.c
+2
-2
bitmap.h
include/bitmap.h
+1
-1
metafiledrv.h
include/metafiledrv.h
+9
-0
dib.c
objects/dib.c
+1
-1
metafile.c
objects/metafile.c
+0
-0
No files found.
graphics/metafiledrv/bitblt.c
View file @
56166a6f
...
...
@@ -8,6 +8,7 @@
#include "metafiledrv.h"
#include "heap.h"
#include "debug.h"
#include "bitmap.h"
DEFAULT_DEBUG_CHANNEL
(
metafile
)
...
...
@@ -150,3 +151,84 @@ BOOL MFDRV_StretchBlt( DC *dcDst, INT xDst, INT yDst, INT widthDst,
}
/***********************************************************************
* MFDRV_StretchDIBits
*/
INT
MFDRV_StretchDIBits
(
DC
*
dc
,
INT
xDst
,
INT
yDst
,
INT
widthDst
,
INT
heightDst
,
INT
xSrc
,
INT
ySrc
,
INT
widthSrc
,
INT
heightSrc
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
wUsage
,
DWORD
dwRop
)
{
DWORD
len
,
infosize
,
imagesize
;
METARECORD
*
mr
;
infosize
=
DIB_BitmapInfoSize
(
info
,
wUsage
);
imagesize
=
DIB_GetDIBImageBytes
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biHeight
,
info
->
bmiHeader
.
biBitCount
);
len
=
sizeof
(
METARECORD
)
+
10
*
sizeof
(
WORD
)
+
infosize
+
imagesize
;
mr
=
(
METARECORD
*
)
HeapAlloc
(
SystemHeap
,
0
,
len
);
if
(
!
mr
)
return
0
;
mr
->
rdSize
=
len
/
2
;
mr
->
rdFunction
=
META_STRETCHDIB
;
mr
->
rdParm
[
0
]
=
LOWORD
(
dwRop
);
mr
->
rdParm
[
1
]
=
HIWORD
(
dwRop
);
mr
->
rdParm
[
2
]
=
wUsage
;
mr
->
rdParm
[
3
]
=
(
INT16
)
heightSrc
;
mr
->
rdParm
[
4
]
=
(
INT16
)
widthSrc
;
mr
->
rdParm
[
5
]
=
(
INT16
)
ySrc
;
mr
->
rdParm
[
6
]
=
(
INT16
)
xSrc
;
mr
->
rdParm
[
7
]
=
(
INT16
)
heightDst
;
mr
->
rdParm
[
8
]
=
(
INT16
)
widthDst
;
mr
->
rdParm
[
9
]
=
(
INT16
)
yDst
;
mr
->
rdParm
[
10
]
=
(
INT16
)
xDst
;
memcpy
(
mr
->
rdParm
+
11
,
info
,
infosize
);
memcpy
(
mr
->
rdParm
+
11
+
infosize
/
2
,
bits
,
imagesize
);
MFDRV_WriteRecord
(
dc
,
mr
,
mr
->
rdSize
*
2
);
HeapFree
(
SystemHeap
,
0
,
mr
);
return
heightSrc
;
}
/***********************************************************************
* MFDRV_SetDIBitsToDeivce
*/
INT
MFDRV_SetDIBitsToDevice
(
DC
*
dc
,
INT
xDst
,
INT
yDst
,
DWORD
cx
,
DWORD
cy
,
INT
xSrc
,
INT
ySrc
,
UINT
startscan
,
UINT
lines
,
LPCVOID
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
)
{
DWORD
len
,
infosize
,
imagesize
;
METARECORD
*
mr
;
infosize
=
DIB_BitmapInfoSize
(
info
,
coloruse
);
imagesize
=
DIB_GetDIBImageBytes
(
info
->
bmiHeader
.
biWidth
,
info
->
bmiHeader
.
biHeight
,
info
->
bmiHeader
.
biBitCount
);
len
=
sizeof
(
METARECORD
)
+
8
*
sizeof
(
WORD
)
+
infosize
+
imagesize
;
mr
=
(
METARECORD
*
)
HeapAlloc
(
SystemHeap
,
0
,
len
);
if
(
!
mr
)
return
0
;
mr
->
rdSize
=
len
/
2
;
mr
->
rdFunction
=
META_SETDIBTODEV
;
mr
->
rdParm
[
0
]
=
coloruse
;
mr
->
rdParm
[
1
]
=
lines
;
mr
->
rdParm
[
2
]
=
startscan
;
mr
->
rdParm
[
3
]
=
(
INT16
)
ySrc
;
mr
->
rdParm
[
4
]
=
(
INT16
)
xSrc
;
mr
->
rdParm
[
5
]
=
(
INT16
)
cy
;
mr
->
rdParm
[
6
]
=
(
INT16
)
cx
;
mr
->
rdParm
[
7
]
=
(
INT16
)
yDst
;
mr
->
rdParm
[
8
]
=
(
INT16
)
xDst
;
memcpy
(
mr
->
rdParm
+
9
,
info
,
infosize
);
memcpy
(
mr
->
rdParm
+
9
+
infosize
/
2
,
bits
,
imagesize
);
MFDRV_WriteRecord
(
dc
,
mr
,
mr
->
rdSize
*
2
);
HeapFree
(
SystemHeap
,
0
,
mr
);
return
lines
;
}
graphics/metafiledrv/init.c
View file @
56166a6f
...
...
@@ -69,7 +69,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetBkColor
,
/* pSetBkColor */
NULL
,
/* pSetBkMode */
NULL
,
/* pSetDeviceClipping */
NULL
,
/* pSetDIBitsToDevice */
MFDRV_SetDIBitsToDevice
,
/* pSetDIBitsToDevice */
MFDRV_SetMapMode
,
/* pSetMapMode */
NULL
,
/* pSetMapperFlags */
MFDRV_SetPixel
,
/* pSetPixel */
...
...
@@ -86,7 +86,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_SetWindowExt
,
/* pSetWindowExt */
MFDRV_SetWindowOrg
,
/* pSetWindowOrg */
MFDRV_StretchBlt
,
/* pStretchBlt */
NULL
/* pStretchDIBits */
MFDRV_StretchDIBits
/* pStretchDIBits */
};
...
...
include/bitmap.h
View file @
56166a6f
...
...
@@ -56,7 +56,7 @@ extern HBITMAP BITMAP_CopyBitmap( HBITMAP hbitmap );
/* objects/dib.c */
extern
int
DIB_GetDIBWidthBytes
(
int
width
,
int
depth
);
extern
int
DIB_GetDIBImageBytes
(
int
width
,
int
height
,
int
depth
);
extern
int
DIB_BitmapInfoSize
(
BITMAPINFO
*
info
,
WORD
coloruse
);
extern
int
DIB_BitmapInfoSize
(
const
BITMAPINFO
*
info
,
WORD
coloruse
);
extern
int
DIB_GetBitmapInfo
(
const
BITMAPINFOHEADER
*
header
,
DWORD
*
width
,
int
*
height
,
WORD
*
bpp
,
WORD
*
compr
);
extern
void
DIB_UpdateDIBSection
(
DC
*
dc
,
BOOL
toDIB
);
...
...
include/metafiledrv.h
View file @
56166a6f
...
...
@@ -86,5 +86,14 @@ extern BOOL MFDRV_ExtTextOut( struct tagDC *dc, INT x, INT y,
UINT
flags
,
const
RECT
*
lprect
,
LPCSTR
str
,
UINT
count
,
const
INT
*
lpDx
);
extern
BOOL
MFDRV_PaintRgn
(
DC
*
dc
,
HRGN
hrgn
);
extern
INT
MFDRV_SetDIBitsToDevice
(
DC
*
dc
,
INT
xDest
,
INT
yDest
,
DWORD
cx
,
DWORD
cy
,
INT
xSrc
,
INT
ySrc
,
UINT
startscan
,
UINT
lines
,
LPCVOID
bits
,
const
BITMAPINFO
*
info
,
UINT
coloruse
);
extern
INT
MFDRV_StretchDIBits
(
DC
*
dc
,
INT
xDst
,
INT
yDst
,
INT
widthDst
,
INT
heightDst
,
INT
xSrc
,
INT
ySrc
,
INT
widthSrc
,
INT
heightSrc
,
const
void
*
bits
,
const
BITMAPINFO
*
info
,
UINT
wUsage
,
DWORD
dwRop
);
#endif
/* __WINE_METAFILEDRV_H */
objects/dib.c
View file @
56166a6f
...
...
@@ -58,7 +58,7 @@ int DIB_GetDIBImageBytes( int width, int height, int depth )
*
* Return the size of the bitmap info structure including color table.
*/
int
DIB_BitmapInfoSize
(
BITMAPINFO
*
info
,
WORD
coloruse
)
int
DIB_BitmapInfoSize
(
const
BITMAPINFO
*
info
,
WORD
coloruse
)
{
int
colors
;
...
...
objects/metafile.c
View file @
56166a6f
This diff is collapsed.
Click to expand it.
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