gdi32: Add a placeholder function for DIB stretching.
This commit is contained in:
parent
d685a07f22
commit
7696168dce
|
@ -230,8 +230,21 @@ BOOL nulldrv_StretchBlt( PHYSDEV dst_dev, struct bitblt_coords *dst,
|
|||
if (err == ERROR_TRANSFORM_NOT_SUPPORTED &&
|
||||
((src->width != dst->width) || (src->height != dst->height)))
|
||||
{
|
||||
FIXME( "should stretch %dx%d -> %dx%d\n",
|
||||
src->width, src->height, dst->width, dst->height );
|
||||
memcpy( src_info, dst_info, FIELD_OFFSET( BITMAPINFO, bmiColors[256] ));
|
||||
dst_info->bmiHeader.biWidth = dst->visrect.right - dst->visrect.left;
|
||||
dst_info->bmiHeader.biHeight = dst->visrect.bottom - dst->visrect.top;
|
||||
if (src_info->bmiHeader.biHeight < 0) dst_info->bmiHeader.biHeight = -dst_info->bmiHeader.biHeight;
|
||||
if ((ptr = HeapAlloc( GetProcessHeap(), 0, get_dib_image_size( dst_info ))))
|
||||
{
|
||||
err = stretch_bitmapinfo( src_info, bits.ptr, src, dst_info, ptr, dst,
|
||||
GetStretchBltMode( dst_dev->hdc ) );
|
||||
if (bits.free) bits.free( &bits );
|
||||
bits.ptr = ptr;
|
||||
bits.is_copy = TRUE;
|
||||
bits.free = free_heap_bits;
|
||||
if (!err) err = dst_dev->funcs->pPutImage( dst_dev, 0, 0, dst_info, &bits, src, dst, rop );
|
||||
}
|
||||
else err = ERROR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
if (bits.free) bits.free( &bits );
|
||||
|
|
|
@ -793,3 +793,17 @@ done:
|
|||
|
||||
return ret;
|
||||
}
|
||||
|
||||
DWORD stretch_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
|
||||
const BITMAPINFO *dst_info, void *dst_bits, const struct bitblt_coords *dst,
|
||||
INT mode )
|
||||
{
|
||||
FIXME( "should stretch %dx%d -> %dx%d\n", src->width, src->height, dst->width, dst->height );
|
||||
|
||||
/* update coordinates, the destination rectangle is always stored at 0,0 */
|
||||
*src = *dst;
|
||||
src->x -= src->visrect.left;
|
||||
src->y -= src->visrect.top;
|
||||
offset_rect( &src->visrect, -src->visrect.left, -src->visrect.top );
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -254,6 +254,9 @@ extern int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) DECLSPEC_H
|
|||
extern DWORD convert_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
|
||||
const BITMAPINFO *dst_info, void *dst_bits ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern DWORD stretch_bitmapinfo( const BITMAPINFO *src_info, void *src_bits, struct bitblt_coords *src,
|
||||
const BITMAPINFO *dst_info, void *dst_bits, const struct bitblt_coords *dst,
|
||||
INT mode ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* driver.c */
|
||||
extern const DC_FUNCTIONS null_driver DECLSPEC_HIDDEN;
|
||||
|
|
Loading…
Reference in New Issue